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

CSV.file upload

Former Member
0 Likes
739

Actually I am using GUI_upload but as i know this is for fronted loading.I want  to create one ABAP upload program to read Csv.file and then store the data in custom table . The ABAP program will be scheduled as batch program to run periodically to upload the csv.file and store the data in our custom table.

the path can be saved as program variant

Moderator message: very frequently discussed, please search for information before posting.

Message was edited by: Thomas Zloch

4 REPLIES 4
Read only

Former Member
0 Likes
663

Hi,

Ok, what is the question? Upload in background processing works only via dataset statement. I'm not sure whether csv format is suitable for that. Check it out!

Regards

Robert

Read only

0 Likes
663

Hi,

I have to write a pgm to upload a csv file and then store data from csv to our custom table.

This ABAP program will be scheduled as batch program to run periodically to upload the csv.file and store the data in our custom table.

Read only

0 Likes
663

Thanks robert for your response!!

Rgards,

Prashant

Read only

0 Likes
663

Prashant,

It means you have to perform two task in program.

         1. upload the *.CSV :

OPEN DATASET lv_filename

         FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

 

    IF sy-subrc = 0.

  *     Write  file records into file on application server

      LOOP AT gt_datatab INTO gs_datatab.

        TRANSFER gs_datatab TO lv_filename.

      ENDLOOP.

CLOSE DATASET lv_filename.

and    2. update the Ztable.: 

create one internal table with all the fields which you have to update in ztable.

transfer the value into work area and then update the table.

Regards,

Sujeet