‎2008 Nov 01 6:54 PM
Hi folks,
Please tell me how to upload flat file (txt format or application server) internal table...the data in flat file is inform of header and item data.
any sample codes will be really helpfull.
thanks in advance
‎2008 Nov 01 7:00 PM
Hi kartikey,
By using the OPEN DATASET AND GUI_UPLOAD you can upload data from flat file.
You can search SCN you can definitely find the Entire coding.
Regards
Ranga
‎2008 Nov 01 6:59 PM
hint
open dataset
read dataset
gui_upload
search on the above terms, and dont expect sample code for your work
‎2008 Nov 01 7:00 PM
Hi kartikey,
By using the OPEN DATASET AND GUI_UPLOAD you can upload data from flat file.
You can search SCN you can definitely find the Entire coding.
Regards
Ranga
‎2008 Nov 01 7:17 PM
HI Ranga,
I have header data and item level data in my file, How can i upload both level data at the same time in my internal tables, Please tell me the method how to do it
thanks in advance
‎2008 Nov 01 7:42 PM
hi Ranga,
I am trying the following code,please tel me where am I getting wrong:
opendataset p_file for input in text mode encoding default.
data: wa_file type string.
read dataset p_file into wa_file.
if sy-subrc = 0.
split wa_file at CL_ABAP_CHAR_UTILITIES=>horizontal_tab into wa_itab.
append wa_area to itab.
close dataset p_file.
‎2008 Nov 01 8:54 PM
change your code like this.
data: wa_file type rlgrap-filename.
opendataset p_file for input in text mode encoding default.
if sy-subrc = 0.
do.
read dataset p_file into wa_file.
if sy-subrc = 0.
append wa to itab.
else.
exit.
endif.
enddo.
close dataset p_file.
endif.
‎2008 Nov 01 7:45 PM
sorry i given wrong answering.
Edited by: Ranga Swamy on Nov 1, 2008 9:54 PM
‎2008 Nov 25 5:54 AM
Hi,
You can Take Header file and Line items as separate files in selection screen and you can process.
Regards,
Sudhakar.