Skip to Content
0
Former Member
Jan 28, 2010 at 03:42 PM

New to PI, text processing

42 Views

Hi all,<br>

<br>

I'm not sure how clear this question is going to be....and please forgive the formatting, the message editor isn't very helpful.<br>

<br>

I'm mapping an idoc text segment into a flat file. sounds simple enough, well there are some caveats to it.<br>

<br>

I'm working with idoc WHSORD.DELVRY03, segment E1TXTH8 and it's sub-element E1TXTP8<br>

<br>

The comment line in E1TXTP8 is 132 characters. In the flat file format I'm given, I have 25 characters to work with at a time. <br>

<br>

Any time I need more that 25 characters I have to add a new line to the flat file, increment the necessary counters, and place the next group of 25 characters out there....rinse repeat...until all the E1TXTP8-TDLINEs are processed.<br>

<br>

so my idoc may have the segment below:<br>

<br>

>E1TXTH8<br>

TDOBJECT | VBBK<br>

TDOBNAME | 123456<br>

TDID | 0012<br>

TDSPRAS | E<br>

LANGUA_ISO| EN<br>

> E1TXTP8<br>

TDFORMAT | *<br>

TDLINE |The quick red fox jumped over the lazy brown dog.<br>

> E1TXTP8<br>

TDFORMAT | *<br>

TDLINE |The quick red fox jumped over the lazy brown dog.<br>

> E1TXTP8<br>

TDFORMAT | *<br>

TDLINE |The quick red fox jumped over the lazy brown dog.<br>

> E1TXTP8<br>

TDFORMAT | *<br>

TDLINE |The quick red fox jumped over the lazy brown dog.<br>

<br>

<br>

The ideal result:<br>

<br>

> File<br>

> Header (this is fine)<br>

<br>

> HComments<br>

counter | 1<br>

COMMENT | The quick red fox jumped <br>

HComments<br>

counter | 2<br>

COMMENT | over the lazy brown dog. T<br>

HComments<br>

counter | 3<br>

COMMENT | he quick red fox jumped o <br>

HComments<br>

counter | 4<br>

COMMENT | ver the lazy brown dog. Th<br>

HComments<br>

counter | 5<br>

COMMENT | e quick red fox jumped ov<br>

HComments<br>

counter | 6<br>

COMMENT | er the lazy brown dog. The<br>

HComments<br>

counter | 7<br>

COMMENT | quick red fox jumped ove<br>

HComments<br>

counter | 8<br>

COMMENT | r the lazy brown dog.<br>

<br>

> Details (this is fine)<br>

<br>

<br>

Right now I can get the HComment to show up when needed. but only once, and the text is non-existent. <br>

<br>

Other related info, I'm new to PI, I can do the basic stuff pretty well, drag-drop mapping and such. <br>

<br>

Java coding is not something I have really ever done, been strictly ABAP till recently.<br>

<br>

I'm fairly pressed for time, as the usual requirement, but any ideas or help would be greatly appreciated<br>

<br>

Thanks,<br>

<br>

Sean