Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8526

Re: HI THIS IS ATUL. I WRITE ONE CODE FOR FETCHING DATA FROM NOTEPAD BUT ITS NOT WORKING PLEASE HELP ME. CODE IS AND NOTEPAD FILE IS HERE

$
0
0

Atul,

 

First to all, this FM (gui_upload) is obsolete, use the method cl_gui_frontend_services=>gui_upload.

 

Second, you need split values recovered from data_tab into a new itab, like this:

 

REPORT z_test
TYPES: BEGIN OF ytab,                  sno      TYPE string,                  name  TYPE string,                  gender TYPE string,              END OF ytab.
DATA: t_up TYPE STANDARD TABLE OF string WITH HEADER LINE,           itab  TYPE TABLE OF ytab.
CALL METHOD cl_gui_frontend_services=>gui_upload     EXPORTING          filename = path          filetype  = 'ASC'          has_field_separator = ','    CHANGING          data_tab = t_up[]
IF NOT sy-subrc IS INITIAL.
" Message here
ENDIF.
LOOP AT t_up.     SPLIT t_up AT ',' INTO itab-sno                                          itab-name                                         itab-gender.     APPEND itab.
ENDLOOP.

Viewing all articles
Browse latest Browse all 8526

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>