‎2008 May 09 8:46 AM
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.
‎2008 May 09 10:54 AM
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
‎2008 May 09 10:36 AM
‎2008 May 09 10:54 AM
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
‎2008 May 09 10:57 AM
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
‎2008 May 09 11:07 AM
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
‎2008 May 09 11:06 AM
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
‎2008 May 09 11:14 AM
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* ._