Hi.
I am trying to convert a flat file into a record structure, using the procedure as described in the EDI Core Component Guide
- Create XML template
- stringToDocument (XML structure → Document)
- documenttoRecord (Document → idata object)
- convertToValues (format the idata object in proper flat file format)
The flat file has 4 different segment types, but no segment id’s.
The result is that the file segments are unrecognized + classified as “unDefData”.
Is it possible to convert the file into an idata object, or do i have to somehow add segment id’s to the relevant lines?
Any help would be much appreciated.
Thanks
Mark
Hi Mark,
if the file consists of 4 different segements which can repeat why you don’t have segement-IDs? What you can also do is define only one segment like this:
then you will have all records in a list (but of course not sorted according to segments. Let me know if you need more help.
Regards,
Gunter
Hi Gunter,
I am facing problem with the EDI parser.
I am calling
stringToDocument
documentToRecord
convertToValues
after creating EDIValues, it is alsor initializing ‘unDefData’ which causes an error in parsing.
Please find the xmlTemplate I am using for the EDI856 file
Thanks in advance.
Regards,
Srinivas
mail: smudiraj@optum.com
srinivas.mudiraj@patni.com
<?xml version="1.0"?>
|
*
ISA
GS
ST,
GE
IEA
ST
BSN
DTM
HL,
CTT
SE
HL
SN1
DTM
TD1
TD4
TD5
N1
N2
N3
N4
PRF
REF,
CLD,
CLD
REF,
Hi
I mapped all the fields in EDI856 doc . i am getting fields from Database , finally i have to fill SE01 segment as well how can i calculate total no. of segments populated in EDI856 doc to put that value into the SE01 segment, as values are coming from database i can’t hardcode it as, it is changing at runtime.
Please help me out
Unnati yadav
The SE01 field is the total # of segments (not fields) from ST to SE.
This value is filled in automatically by the service wm.b2b.edi:convertToString. Just make sure that you do not specify a value for this field on the input IData.