Skip to Content
avatar image
Former Member

Upload notepad into internal Table seperated by Semi colon

hi All,

I m currently using the GUI_UPLOAD FM .

but unable to get the data in proper format file

"CN06;S363201005;Non brand related(OB;CAMN107B2301 Investigator Meeting;04.05.10;04.05.11"

what is the Best way to upload the conrtent of notepad into Internal table sepreated by Semi colon.

thanks in advance .

Saurabh

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 22, 2010 at 08:27 AM

    Hi,

    Try the below code.

    CALL FUNCTION 'GUI_UPLOAD'

    EXPORTING

    FILENAME = fname

    has_field_separator = 'X'

    TABLES

    DATA_TAB = it_dummy.

    LOOP AT it_record.

    wa_string = it_dummy.

    CLEAR: wa_string, wa_uploadtxt.

    SPLIT wa_string AT ; INTO wa_uploadtxt-txt1 wa_uploadtxt-txt2 wa_uploadtxt-txt3 wa_uploadtxt-txt4.

    Thanks & Regards,

    Neela.

    Edited by: Neela M B on Sep 22, 2010 1:57 PM

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 22, 2010 at 07:31 AM

    >but unable to get the data in proper format file

    What precisely do you mean by that?

    Have you considered the ABAP "SPLIT" command? Maybe a little searching would help - like this thread asked very recently:

    Add comment
    10|10000 characters needed characters exceeded