Skip to Content
author's profile photo Former Member
Former Member

Split the records of interanl table and upload it to fields

Hi All,

I have a internal table filled with records in following format.

XXXXXXXX~~Export the invoice

2~19980501~19980531

// The first invoice:

0~00130698114000010004119980512059611000276233.350.1711076.66????321000789010005???????????????????130601000000000??????????18? 3352051????532611-3357211???~~~

0~????????176233.350.1711076.6676233.350~1510

// The second invoice:

0~00130698114000010007219980512059611000440482.000.175882.00????110108078901007?????????61? 68744479?????????????462088-07?????130601000000000??????????18? 3352051????532611-3357211???????????~~~

0~????????139780.000.175780.0039780.000~1510

0~????3.5"10702.000.17102.0070.20~1510

I want to sort this out field by field and fill it to the respective fields.

If i try to do so with work area

-


read table itgt_frmgto into waitgt_frmgto index 4.

-


i have a out put of one line that is 4th.Butbbecause these are random records,i cannot count on lines .So i have to go by fields.

Could anybody tell me how to do this with multiple lines coming in without using

index concept.

Thank you,

Priya

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 10:24 AM

    hi,

    loop the table and inside the loop split each line into other variables if the line has a fix structure or split into an another itab if not.

    SPLIT <line> AT '~~' INTO <f1> ... <fn>.

    or

    SPLIT <line> AT '~~' INTO <itab>.

    you might want to take a look at the syntax of SPLI statement.

    br

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 10:53 AM

    try like this

    loop at itab where <fieldname> like '000%'.

    now take your value here to the desired area.

    endloop.

    regards

    shiba dutta

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 10:59 AM

    loop at line.

    SPLIT <line> AT '~~' INTO <itab>.

    append itab.

    endloop.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.