‎2008 Jan 24 6:19 AM
Hello Friends,
My internal table looks like this:
10990191XSDSA0002099090
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
Assume following records are one set and in the loop we need to read one set of records and create idoc.
I tried in this way, If T_ITAB_DATA+23(10) IS INITIAL. Then I am creating idoc. But it is not working when loop enter into 2nd st of records.
10990191XSDSA0002099090
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
Please can you help me?
Thanks,
Shreekant
‎2008 Jan 24 6:22 AM
Hi Shreekanth,
Can you pl provide the second set of records for us to clearly understand your requirment?
Thanks
Shyam
‎2008 Jan 24 6:22 AM
Hi Shreekanth,
Can you pl provide the second set of records for us to clearly understand your requirment?
Thanks
Shyam
‎2008 Jan 24 6:24 AM
Hi Shyam,
These are the internal table records:
10990191XSDSA0002099090
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
I am treating this as one set, like this we have 3 sets u can see above.
10990191XSDSA0002099090
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
10990191XSDSA0002099090 TOTAL001 0098883330
Thanks for your reply,
Shreekant
‎2008 Jan 24 6:33 AM
Hi Shreekant,
loop at itab.
If condition.
idoc creation.clear itab.
else.
continue.
endif.
endloop.
try this...
Regards,
Kaveri
‎2008 Jan 24 6:24 AM
Hi,
As you are doing with in the loop, try to clear the T_ITAB_DATA workarea every time before fetching the data from internal table.
Hope this will solve the problem.
‎2008 Jan 24 6:34 AM
Hi Shreekant,
I think at the time of execution of the program the HEADER of the internal table contains the previous value. Do one thing at the end of the loop clear the header data of internal table.
Syntax:
Clear <internal table name>.
********************************************************************reward points if it is useful***********************
THANKS,
Sayak...
‎2008 Jan 24 6:36 AM
Hi,
You can try the following condition:
if T_ITAB_DATA+25(1) eq space.
Regards,
Shyam