edifact icon indicating copy to clipboard operation
edifact copied to clipboard

Trouble understanding how to get the data we need

Open vpratfr opened this issue 2 years ago • 1 comments

Hi,

Let me first thank you for this library. Looks great.

We are looking to extract accounting data from an EDI file. I read the whole README but I have trouble to understand how to read/find the values we need.

Here is an extract from the EDI file we use for testing

[...]
NAD+MS+12345635600011:100:107++SARL BOOM+5 PLACE FOOBAR:SOMEWHERE+AHETZE++64123'
[...]
SEQ++13'
IND++F-IDENTIF 1500000000KDRFF'
RFF+ZZZ:IS1'
[...]
SEQ++73'
IND++2033B     1500000000CRMOA'
MOA+ZZZ:17738,6300'

I would need to access The data both in the « header » (NAD fields) and in the sequences.

For instance, I know that I want to get value 17738,63 when I need the field at « coordinates » 2033B 1500000000CRMOA

How would I use the library to get that? I suppose I should use the Reader for that, but I could not figure out which parameters to pass to the readEdiDataValue function.

Maybe I have not seen some additional documentation you would have in another place?

vpratfr avatar Sep 09 '21 11:09 vpratfr

The available documentation is all in the repository :-) See here https://github.com/php-edifact/edifact/blob/master/EXAMPLES.md#edi-data-reading-from-extracted-group

You could also try to use the Interpreter https://github.com/php-edifact/edifact#ediinterpreter and go find data in each group..

sabas avatar Sep 09 '21 13:09 sabas

Hi,

Let me first thank you for this library. Looks great.

We are looking to extract accounting data from an EDI file. I read the whole README but I have trouble to understand how to read/find the values we need.

Here is an extract from the EDI file we use for testing

[...]
NAD+MS+12345635600011:100:107++SARL BOOM+5 PLACE FOOBAR:SOMEWHERE+AHETZE++64123'
[...]
SEQ++13'
IND++F-IDENTIF 1500000000KDRFF'
RFF+ZZZ:IS1'
[...]
SEQ++73'
IND++2033B     1500000000CRMOA'
MOA+ZZZ:17738,6300'

I would need to access The data both in the « header » (NAD fields) and in the sequences.

For instance, I know that I want to get value 17738,63 when I need the field at « coordinates » 2033B 1500000000CRMOA

How would I use the library to get that? I suppose I should use the Reader for that, but I could not figure out which parameters to pass to the readEdiDataValue function.

Maybe I have not seen some additional documentation you would have in another place?

Hello, I have the same problem. Do you find a solution ? Thanks

Alouxx avatar Dec 31 '22 17:12 Alouxx

Hi

We ended up with coding our own parser. It does not cover the whole EDI standard but it works for our restricted use-case.

Regards

vpratfr avatar Jan 01 '23 13:01 vpratfr

Bonjour,Merci pour votre retour.Je souhaite également parser une liasse fiscale au format EDI pour récupérer les informations.La bibliothèque php ne le permet pas ?Je ne pense pas avoir le temps de développer un système de parser…j’aurais aimé que la bibliothèque php nous fasses gagner du temps.Cordialement,AlexandreEnvoyé de mon iPhoneLe 1 janv. 2023 à 14:22, Vincent Prat @.***> a écrit : Hi

We ended up with coding our own parser. It does not cover the whole EDI standard but it works for our restricted use-case.

Regards

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Alouxx avatar Jan 01 '23 14:01 Alouxx

Hi, Let me first thank you for this library. Looks great. We are looking to extract accounting data from an EDI file. I read the whole README but I have trouble to understand how to read/find the values we need. Here is an extract from the EDI file we use for testing

[...]
NAD+MS+12345635600011:100:107++SARL BOOM+5 PLACE FOOBAR:SOMEWHERE+AHETZE++64123'
[...]
SEQ++13'
IND++F-IDENTIF 1500000000KDRFF'
RFF+ZZZ:IS1'
[...]
SEQ++73'
IND++2033B     1500000000CRMOA'
MOA+ZZZ:17738,6300'

I would need to access The data both in the « header » (NAD fields) and in the sequences. For instance, I know that I want to get value 17738,63 when I need the field at « coordinates » 2033B 1500000000CRMOA How would I use the library to get that? I suppose I should use the Reader for that, but I could not figure out which parameters to pass to the readEdiDataValue function. Maybe I have not seen some additional documentation you would have in another place?

Hello, I have the same problem. Do you find a solution ? Thanks

Well the solution is simple, as I said just obtain the array from the interpreter and then cycle the array to extract the data you need...

I am available also via email if you need some consultancy or some hint, but as I read the problem statement in the original issue it could be a program of less than 20 lines 😁

sabas avatar Jan 01 '23 14:01 sabas