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

loading csv file from application server

Former Member
0 Likes
1,401

Hi All,

I need to download a csv file from application server and.So anyone please provide me a reference source code for the same.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,027

Hi Anuj,

You can take help from the below sample code.

DATA: wa_file LIKE rlgrap-filename.

wa_file = p_file.

OPEN DATASET wa_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc = 8.

MESSAGE E714

WITH text-m01 p_file text-m02.

ELSE.

CLOSE DATASET

Award point if useful..

rgds

Sandeep

6 REPLIES 6
Read only

Former Member
0 Likes
1,027

Any suggestions guys??

its very urgent..

Read only

Former Member
0 Likes
1,028

Hi Anuj,

You can take help from the below sample code.

DATA: wa_file LIKE rlgrap-filename.

wa_file = p_file.

OPEN DATASET wa_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc = 8.

MESSAGE E714

WITH text-m01 p_file text-m02.

ELSE.

CLOSE DATASET

Award point if useful..

rgds

Sandeep

Read only

0 Likes
1,027

Thanks for your reply..But could you please provide me code to upload csv file...i guess you have given the code for text file

Read only

0 Likes
1,027

Hello Anuj

Read the file into an itab like described above. Next you can run function module TEXT_CONVERT_CSV_TO_SAP to convert the .csv data into your SAP data.

Regards

Uwe

Read only

Former Member
0 Likes
1,027

Hi Anuj,

You want to donwload file from Application server or upload the file on application server.

As in your question you have asked to download file from application server.

If you want to dowload file from app server then there are two ways one is a text and other is a binary.

I believe you must be looking for a readable file in presentation server which seems to be in text format..

It will download in text format in your internal table. And you can use it way you want.

rgds

Sandeep

Read only

0 Likes
1,027

Hi ,

I have a csv file at application server. Say test.csv. it is having data in the following format :

asdfsdf;sadasdf;123;sadf;asfasdf;

i.e seperated by semicolon.

i need the data of this file in a internal table of my own,for example

itab-field1=asdfsdf itab-field2=sadasdf and so on....

Then i am supposed to carry out some operations on the same followed by writing another modified file on application server.

and there is no such function module like *TEXTCONVERT_CSV_TO_SAP* ._