multiple transaction sets

hii all
how can we handle multiple transaction sets in a document if
we want to publish it by using services wm.b2b.edi.envelopeprocess and
wm.b2b.edi.converttovalues.:confused:

Basically after the envelopeprocess step you have to loop on ISA/GS/ST and inside loop call getEDIString and then convertToValues(this will parse each ST trsactionset) to handle multiple trans sets…

HTH,
RMG

Hi !
below is the sample EDI doc consisting of two ST segments i’m using … plz indicate how to differentiate between multiple ST segments …with delimiter. the problem is that the second ST segments appears inside the first SE segment after running envelopeProcess, getEDIstring, & convertToValues services… (plz see text in bold to mark beginning of new ST segment; the data is same in both the ST segments)
plz suggest appropriate changes/delimiter(s)…

ISA00 00 01001325851 01050357789M 0001101425U004000000000350P<GSQM001325851050357789M200001101425767X004010
ST214000000035
B10R6514545NA00000064631MSCAC
N1
SFBig Fred and Little Al ABC Company
N2
AKA Van Artsdalen Mfg
N3800 Any Street
N4
Any TownMN55060-0000
LX1
AT7
AFNS200001101341LT
MS1Any TownMN
MS2SCAC0067291TF
L11
14781-55060SI
L11
1QN
AT8
GL168806408E960SPO202831 REPL1022PC1008L40320
SE14000000035*
ST214000000035

B10R6514545NA00000064631MSCAC
N1
SFBig Fred and Little Al ABC Company
N2
AKA Van Artsdalen Mfg
N3800 Any Street
N4
Any TownMN55060-0000
LX1
AT7
AFNS200001101341LT
MS1Any TownMN
MS2SCAC0067291TF
L11
14781-55060SI
L11
1QN
AT8
GL168806408E960SPO202831 REPL1022PC1008L40320
SE14000000035
GE135
IEA1000000035
GE135
IEA1000000035

Thanks,
Knight,
A dev guy… !

A dev guy,

ST02/SE02 elements represent transaction ID and should be different. I would expect to see

ISA00 00 01001325851 01050357789M 0001101425U004000000000350P<GSQM001325851050357789M200001101425767X004010
ST214000000001
B10R6514545NA00000064631MSCAC
N1
SFBig Fred and Little Al ABC Company
N2
AKA Van Artsdalen Mfg
N3800 Any Street
N4
Any TownMN55060-0000
LX1
AT7
AFNS200001101341LT
MS1Any TownMN
MS2SCAC0067291TF
L11
14781-55060SI
L11
1QN
AT8
GL168806408E960SPO202831 REPL1022PC1008L40320
SE14000000001*
ST214000000002
B10R6514545NA00000064631MSCAC
N1
SFBig Fred and Little Al ABC Company
N2
AKA Van Artsdalen Mfg
N3800 Any Street
N4
Any TownMN55060-0000
LX1
AT7
AFNS200001101341LT
MS1Any TownMN
MS2SCAC0067291TF
L11
14781-55060SI
L11
1QN
AT8
GL168806408E960SPO202831 REPL1022PC1008L40320
SE14000000002
GE135
IEA1000000035
GE135
IEA1000000035

Knight,
I think the reason you the second ST is getting inside the first one is, the SE segment of the first transaction set is ending with a field delimiter ‘*’.

If you take that off, envelope process would give you the output you are looking for.

So, your first SE should look like “SE14000000035”

Shubhro

Shubhro and Mary’s points address the specific problem you report. I would also add that the control numbers in your GS and (first) GE segments don’t match, the (first) GE01 should have a transaction count of 2, rather than one and you have extra GE and IEA trailers that are unnecessary/invalid.

Tim

Knight,

I agree with Tim’s comments above,please fix your EDI document accordingly as shown below and this should work.Also your GS control number is not matching with GE and i have fixed that too.

ISA00 00 01001325851 01050357789M 0001101425U004000000000350P<
GSQM001325851050357789M20000110142535X004010
ST214000000001
B10R6514545NA00000064631MSCAC
N1
SFBig Fred and Little Al ABC Company
N2
AKA Van Artsdalen Mfg
N3800 Any Street
N4
Any TownMN55060-0000
LX1
AT7
AFNS200001101341LT
MS1Any TownMN
MS2SCAC0067291TF
L11
14781-55060SI
L11
1QN
AT8
GL168806408E960SPO202831 REPL1022PC1008L40320
SE14000000001
ST214000000002
B10R6514545NA00000064631MSCAC
N1
SFBig Fred and Little Al ABC Company
N2
AKA Van Artsdalen Mfg
N3800 Any Street
N4
Any TownMN55060-0000
LX1
AT7
AFNS200001101341LT
MS1Any TownMN
MS2SCAC0067291TF
L11
14781-55060SI
L11
1QN
AT8
GL168806408E960SPO202831 REPL1022PC1008L40320
SE14000000002
GE235
IEA1000000035

Dear rmg, Tim, shubhro, mary (tilmanm) :cool: .
I’ve modified the document according to ur suggestions… many thanks for pointing out the mistakes in the EDI doc… however :
Shubhro… though i’ve removed ‘*’ at the end of SE segment, it’s not resolving the issue… i.e. the second ST is still coming under SE of first transaction… ( screenshot attached …).
could u plz suggest any other change ( apart from what’s done) to handle multiple ST segments, successfully…

Thnx,
Knight,
A Dev Guy… !:rofl:
modified_EDI214sample.txt (860 Bytes)

Knight-
I took a look at your modified EDI doc. You still have “" at the end of the ISA & GS segment. Also my question to you is, what is your segment terminator? I see that your element terminator is "” and sub-element terminator is “<”. Are you using a carriage return as the segment terminator? I know at times that TN has issues when people send carriage return/line feed as the segment termintor as their segment terminator. Try this doc that I attached and see if it works. Also I noticed that your ISA.02, ISA.04,ISA.06, ISA.08 are not the set length they need to be. Not sure if you validate the ISA but that might cause you problems, but of course some people don’t validate the ISA but only the GS.
modified_EDI214sample_2.txt (855 Bytes)

Knight,

I think we may be losing the forest for the trees here. If the goal is to get some sample EDI data to work with, and you can’t get it from the partner and there’s no EDI software available to do it consider writing a simple service in Developer to generate some. Install the 214 transaction in TN and create a flow service to put a 214 document in the pipeline, assign values to it, call convertToString followed by addGroupEnvelope and addICEnvelope and save it to a file. This should give you at least one valid EDI doc to work with and will save you the pain of trying to build it by hand in Notepad or whatever you’re currently using.

Tim

Knight,

The edi document which i have modified for you as above should also have segment terminator (ie record delimiter say carriage return or newline etc… ) once you fix it it will solve the ST/SE issue.Please try it the way users have been assisting you and let us know the result.Tim’s suggestion is the other way of creating the edi document with out asking your partner to send(else ask your partner to send valid sample 214 file)

HTH,
RMG