Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

upload into table

Former Member
0 Likes
449

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.

2 REPLIES 2
Read only

Former Member
0 Likes
414

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.

Read only

Former Member
0 Likes
414

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.