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

uploading flat file from application server to internal table

Former Member
0 Likes
856

hi i am trying to upload a file from application server to internal table and then use that internal tables for bdc. i have already done the coding for uploading a file from presentation server into an internal table. i just need to take the directory and file path as one parameter for which i have used the function:

F4_DXFILENAME_TOPRECURSION

and RFC_SYSTEM_INFO

can u guys plss tell me how to do this and how to test whether the file has been successfully uploaded from the application server.

POINTS PROMISED.

5 REPLIES 5
Read only

Former Member
0 Likes
676

hi,

u have to open the application server file for reading, and then read the file into an internal table

OPEN DATASET W_FILENAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.

DO.

READ DATASET W_FILENAME INTO W_CSV.

IF SY-SUBRC <> 0.

EXIT.

ENDIF.

SPLIT W_CSV AT ',' INTO TABLE T_CSV.

ENDDO.

CLOSE DATASET W_FILENAME.

Read only

0 Likes
676

wat function do i need to call to upload the file???

Read only

0 Likes
676

For uploading the file use GUI_UPLOAD in 4.6c WS_UPLOAD.

Regards,

Kumar.

Read only

Former Member
0 Likes
676

Hi sushant,

Yes, as per sankar solution, we can do it throguh data set statements.

Hope this helps you, reply for queries, Shall post you the updates.

Regards.

Kumar. .

Read only

Former Member