# Creating STSE EDI segments

**URL:** <https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [March 13, 2003, 6:35pm UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087 "2003-03-13T18:35:16Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthony\_c\_ehret.35332](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@anthony\_c\_ehret.35332](https://techcommunity.softwareag.com/u/anthony_c_ehret.35332)\
**Post date:** [March 13, 2003, 6:35pm UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/1 "2003-03-13T18:35:16Z")

</div>

I am relatively new to the webMethods world. I have performed all the mappings for an ANSI x12 outbound 810 and would like to wrap it with the ST/SE segments. It is my understanding that I can call validate then convertToString for this but for some reason after calling this service I don’t have a valid ST/SE structure. Am I missing something? Thanks in advance

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 13, 2003, 6:39pm UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/2 "2003-03-13T18:39:15Z")

</div>

It would be helpful if you could paste your sample edi file here.  
Thanks

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 13, 2003, 7:01pm UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/3 "2003-03-13T19:01:49Z")

</div>

Did you do an envelope process at the beginning? I tried to recreate your issue and was successful. I got the record structure until GE and then there was undefData.

I think it could be something about setting the delimiters for the EDI file.

Good Luck and if we dont find out the solution soon, the experts will help us for sure.  
Thanks

---

<div class="post-metadata">

**Author:** ![reamon](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@reamon](https://techcommunity.softwareag.com/u/reamon)\
**Post date:** [March 13, 2003, 9:29pm UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/4 "2003-03-13T21:29:29Z")

</div>

ST/SE isn’t considered part of the envelope. It’s part of the transaction set. Therefore it is part of the 810 record definition. You need to set a value for ST01 (in this case, to 810). Set SE01 to an empty string and convertToString will plug-in the segment count. You can either set ST02 and SE02 yourself, using wm.b2b.edi.util:controlNumber, or set them as an empty string and convertToString will add in the control number.

HTH

---

<div class="post-metadata">

**Author:** ![anthony\_c\_ehret.35332](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@anthony\_c\_ehret.35332](https://techcommunity.softwareag.com/u/anthony_c_ehret.35332)\
**Post date:** [March 13, 2003, 9:48pm UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/5 "2003-03-13T21:48:34Z")

</div>

Worked like a charm Rob. Thanks for your help!!!

---

<div class="post-metadata">

**Author:** ![reamon](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@reamon](https://techcommunity.softwareag.com/u/reamon)\
**Post date:** [March 13, 2003, 10:17pm UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/6 "2003-03-13T22:17:32Z")

</div>

Glad to be of help. Perhaps you can “Pay It Forward”. 🙂

---

<div class="post-metadata">

**Author:** ![wMusers.Com1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/wmusers.com1/32/170_2.png) [@wMusers.Com1](https://techcommunity.softwareag.com/u/wMusers.Com1)\
**Post date:** [March 13, 2003, 11:08pm UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/7 "2003-03-13T23:08:59Z")

</div>

“Pay It Forward”… great concept, depressing movie. My daughter has it on her list of “movies I will never see again”.

😉

Mark

---

<div class="post-metadata">

**Author:** ![suda1234](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@suda1234](https://techcommunity.softwareag.com/u/suda1234)\
**Post date:** [August 21, 2003, 10:34pm UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/8 "2003-08-21T22:34:12Z")

</div>

Hi,  
i am doing mapping from delimited flatfile to 835 EDI mapping in 6.0.1.  
i am done with segment mapping , and when i do converttoString service i am getting NullPointer exception.  
i am passing the EDI document as input and ns record as actual EDI document.  
what could be the problem here?  
when i look into the EDI document from my mapping , only i see ST01 as 835 and ST02, SE01 and SE02 all are blanks.  
any help is appreciated.its some what urgent.

Thanks,  
Rao.

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [August 21, 2003, 11:57pm UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/9 "2003-08-21T23:57:08Z")

</div>

Make sure your mapping of segments are perfect(IData Values).

And Instead of giving nsRecord,try with passing the ffschema param(EDIFFSchema.X12.V4010:T835)of convertToString,This should work.

Above mentioned schema will be stored in EDIforTN Package.

HTH.

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [April 21, 2005, 3:02am UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/10 "2005-04-21T03:02:16Z")

</div>

Version 6.1 My 850 SE is not counting my records correctly. Consistantly I have 4 extra items in my se count. I am sending a group of ST/SEs in one ISA envelope. It seems like it is counting my ISA GS IEA and GE in every ST Loop.

I am using  
wm.b2b.editn.TAP:getEDITPAData  
Looping over the values  
wm.b2b.edi:convertToString  
wm.b2b.edi.util:addGroupEnvelope  
wm.b2b.edi.util:addICEnvelope  
wm.tn.doc.xml:routeXML

Any suggestions.  
Below an example of 850 Outbound

ISA_00 __00__ ZZ_MAN _12_1111875441 _050420_1606_U_00401_201606170_0_T_|  
GS_PO_MAN_1111875441_20050420_1606_201606169**004010  
ST_850_50114100  
BEG_00_SA\*36-50114100**20050114  
PER_BD_PURCHASING DEPARTMENT_EM_[Maryjo.Holman@man.com](mailto:Maryjo.Holman@man.com)  
PER_BD_PURCHASING DEPARTMENT_FX_918/461-5376  
PER_BD_PURCHASING DEPARTMENT_TE_918/250-8541  
DTM_002_20050117  
TD5_ZZFULL FRT ALLWD  
N9PO36-50114100  
MSG_BOX & TAG MIDLANDSHIP W/35-50114-107 TO ODESSA  
N1_ST_MAN PIPE AND SUPPLY CO.**0805929670001  
N3_2206 GARDEN CITY HIGHWAY  
N4_MIDLAND_TX_79702  
N1_BT_MAN PIPE AND SUPPLY**0805929670001  
N3_P.O.BOX 35632_PURCHASING DEPARTMENT  
N4_TULSA_OK_74153  
N1_VN_OKLAHOMA RIG & SUPPLY CO.  
N3_2348 EAST SHAWNEE  
N4_MUSKOGEE_OK  
PO1_001_36.0_EA_1.65**BP_3723445  
PID_F_0947-12 GOJO NATURAL ORANGE HAND CLEANER14 OZ GRIPPIT BTL W/NAIL BRUSH  
PO100212.0EA_8.08**BP_3726455  
PID_F_422.072 ROUGH TOUGH SCRUBS IN A BUCKET(72/BUCKET)  
PO100324.0EA_0.57**BP_3728940  
PID_F_1/2 X 520 ROLL TFE THD TAPE  
PO100472.0EA_2.23**BP_3729010  
PID_F_1 X 1296 ROLL TFE THD TAPE  
PO100520.0EA_0.5**BP_3843330  
PID_F_025-1627-B ALEMITE HYD FTG STR 7/8X 1/4 PT  
PO10066.0EA_8.46**BP_3921080  
PID_F_197-K437 CORBIN SESAMEE LG SHANK KEYLESSPADLOCK  
PO100710.0EA_0.87**BP_3990300  
PID_F_1-3/16 X 150 FT HIGH VISIBILITY ORANGLOVINYL FLAGGING TAPE  
PO1008100.0EA_0.01**BP_4107150  
PID_F_CT-4B 4 BLK TYWRAP (PKG/100)  
PO10093.0EA_7.43**BP_4296403  
PID_F_278G PROTO PLIERS  
PO10101.0EA_8.38**BP_4296430  
PID_F_292R PROTO 10 LEV WRENCH PLIERS W/QUICKRELEASE  
PO10111.0EA_19.17**BP_4378830  
PID_F_023-56026 ALLEN HEX KEY SET  
PO10123.0EA_3.86**BP_4381170  
PID_F_4103 1-1/2 RED DEVIL STIFF PUTTY KNIFE630-4103  
PO10132.0EA_11.4**BP_4446100  
PID_F_8 RIDGID HD PIPE WRENCH 31005  
PO10141.0EA_44.4**BP_4446150  
PID_F_24 RIDGID HD PIPE WRENCH 31030  
PO10153.0EA_9.26**BP_4451247  
PID_F_708 PROTO 8 ADJ CR WRENCH  
PO10163.0EA_11.79**BP_4451250  
PID_F_710 PROTO 10 ADJ WRENCH FULL FINISH  
PO101712.0EA_2.89**BP_5278710  
PID_F**\*&

---

<div class="post-metadata">

**Author:** ![Yemi\_Bedu](https://avatars.discourse-cdn.com/v4/letter/y/7993a0/32.png) [@Yemi\_Bedu](https://techcommunity.softwareag.com/u/Yemi_Bedu)\
**Post date:** [April 21, 2005, 3:24am UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/11 "2005-04-21T03:24:04Z")

</div>

Hello,  
What exactly is happening in your "Looping over the values " section? And, are you manually setting the segment count or letting convertToString do it for you? Have you tried it with only less than or greater four transaction sets? Have you tried to set this up with a minimal amount of data like 1 shipping request on one transaction? Good day.

Yemi Bedu

---

<div class="post-metadata">

**Author:** ![Ramesh\_Sambandan](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@Ramesh\_Sambandan](https://techcommunity.softwareag.com/u/Ramesh_Sambandan)\
**Post date:** [April 21, 2005, 4:15am UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/12 "2005-04-21T04:15:25Z")

</div>

Hi Cheryl,

ST/SE isn’t considered part of the envelope. It’s part of the transaction set. Therefore it is part of the 810 record definition. You need to set a value for ST01 (in this case, to 810). Set SE01 to an empty string and convertToString will plug-in the segment count. You can either set ST02 and SE02 yourself, using wm.b2b.edi.util:controlNumber, or set them as an empty string and convertToString will add in the control number.  
Hope This helps

---

<div class="post-metadata">

**Author:** ![Ramesh\_Sambandan](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@Ramesh\_Sambandan](https://techcommunity.softwareag.com/u/Ramesh_Sambandan)\
**Post date:** [April 21, 2005, 4:17am UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/13 "2005-04-21T04:17:09Z")

</div>

Sorry i mentioned wrong in the previous post.  
Set the ST01 to 850 for your case.

Ramesh

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [April 21, 2005, 5:55am UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/14 "2005-04-21T05:55:20Z")

</div>

Cheryll,

Please follow as Ramesh suggested,just set empty value to SE01 using setValue and convertToString will do all the rest gives exact count of segments.

HTH,  
RMG.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [April 21, 2005, 6:01am UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/15 "2005-04-21T06:01:16Z")

</div>

Cheryll,

One small suggesstion please do not disclose your EDI document data to outsiders,its always advised to maintain data confidential.Even if you put also just put some xyz test data etc…

Regards,

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:05pm UTC](https://techcommunity.softwareag.com/t/creating-stse-edi-segments/108087/16 "2021-04-02T15:05:03Z")

</div>


