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

Modify iternal table data

Hi all,

l like to modify the content of my internal table before sending line to dataset, and each field separate by coma (;).

example:

000000000000000700 ;KPC;KPC; 1; 1; 1

The file will be in text mode.

Thank's

Robert

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2006 at 06:30 PM

    concatenate all the fields in each record seperated by; this should do.

    syntax concatenate f1 f2 f3... into v_str seperated by ';'.

    regards,

    Srini.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2006 at 06:25 PM

    Hi,

    Try this...

    data: v_string type string.

    DATA: begin of wa,

    FIELD1 type char10 value '10112121',

    field2 type char2 value 'ab',

    field3 type char4 value 'asdf',

    end of wa.

    DATA: itab like wa occurs 0 with header line.

    append wa to itab.

    clear: wa.

    field-symbols: <fs>.

    loop at itab into wa.

    clear: v_string.

    DO 3 times.

    ASSIGN component sy-index of structure wa

    to <fs>.

    if sy-index = 1.

    concatenate v_string <fs> into v_string.

    else.

    concatenate v_string <fs> into v_string

    separated by ';'.

    endif.

    enddo.

    write: / v_string.

    endloop.

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2006 at 06:39 PM

    Hi,

    You can you CONCATENATE Statment with SEPARETED BY ';'.

    CONCATENATE F1 F2 F3 F4 F5 ... into ITAB-LINE SEPARETED BY ';'.

    Regards

    Sudheer

    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.