‎2008 Feb 13 2:34 PM
Hi experts,
I have requirement for uploading data into a Z Table .
and my data is in Application server with .csv file.
I Want to write aprogram should pick the file , read the data and load into the table.
please send any referal program.
Thanks & Regards,
Aruna Rathod.
‎2008 Feb 13 2:39 PM
Hi aruna,
No need to write a program. SAP provided many tools to upload data. One such is SCAT.
All you need to do is goto transaction SCAT & record online for one entry. Then prepare download the txt file for the format in which the data to be given from SCAT. Prepare the file in the format and run it by giving the path of it.
You have many tutorials available online for eloborate information on step by step guide. just search in Google.
Please reward points if useful
rgds,
harikrishna.
‎2008 Feb 13 5:44 PM
PARAMETERS : p_file TYPE rlgrap-filename.
OPEN DATASET p_apspth IN TEXT MODE FOR INPUT ENCODING DEFAULT.
IF sy-subrc NE 0.
message...............like unable to open file........
EXIT.
ENDIF.
DO.
READ DATASET p_apspth INTO lv_string.
IF sy-subrc EQ 0.
split lv_string at ','
into gwa_data-field1 gwa_data-field2......etc.
APPEND gwa_data TO gt_data.
CLEAR gwa_data.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET p_apspth.
now the internal table gt_data contains the appl server data.