Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gentran 850 Mapping - MSG segment - how to split text

Status
Not open for further replies.

kainickara

Programmer
Jul 12, 2007
1
US
Hello,

I am doing an 850 inbound Mapping in gentran, ANSI x 12 4010.

Everything is working perfect, including creation of IDOcs, but with one issue.

In the MSG segment(segment for texts - all texts for the PO come thru this segment ) in gentran, the incoming field for text is a string of 264 character. That means, a text of length 264 can be send in this segment.

a sample data can be..

BEG*ABCD*
ITD**
MSG*i am the the text 1 of length 264 character*
MSG*I am another text 2 of 264 character*
MSG*I am yet another 3 of length 264...*


In SAP, a single text line can be a maximum of 72 characters. so what i did is, i added 4 custom fields on this segment, MSGLIN1, MSGLIN2, MSGLIN3, MSGLIN4.

I have added the code to split the 264 character text, into this 4 fields. ie, first 72 characters go to MSGLIN1, next 72 goes to MSGLIN2 and so on.

The splitting works perfect. But what happens is, all the MSGLIN1 texts come together, then the MSGlin2 s..and then all MSGLIN3s....

ie, the outcome will be something like,
(assuming length 72)

i am the the text 1
I am another text 2
I am yet another 3
of length 264
of 264 character
of length 264...
character


(the first 3 lines were MSGLIN1, the next 3 were MSGLIN2, and the last 1, MSGLIN3.)

Is there anyway, I could do this better ?

Please ask me, if i didn't specified it clearly.

Thanks much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top