Wednesday, December 29, 2010
File needs to be uploaded
=========================
CGH;6703000002;1
CGH;6707100006;1
=========================
REPORT ztest_notepad.
TYPE-POOLS:truxs.
DATA: raw_data TYPE truxs_t_text_data.
DATA: BEGIN OF it_nfal OCCURS 0,
      einri TYPE nfal-einri,
      falnr TYPE nfal-falnr,
      falar TYPE nfal-falar,
    END OF it_nfal.

START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    filename = 'C:\Documents and Settings\Administrator\Desktop\nfal.txt'
    filetype = 'ASC'
  TABLES
    data_tab = raw_data.

CALL FUNCTION 'TEXT_CONVERT_CSV_TO_SAP'
  EXPORTING
    i_field_seperator    = ';'
    i_tab_raw_data       = raw_data
  TABLES
    i_tab_converted_data = it_nfal.

LOOP AT it_nfal.
  WRITE:/ it_nfal.
ENDLOOP.

1 comment:

  1. Thank you! It worked perfectly. Prior to this I tryed the function KCD_CSV_FILE_TO_INTERN_CONVERT but the problem was the field Value with only 32 pos.
    With this approach, We have 4096 pos per row to upload.

    Regards.

    ReplyDelete

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.