Application Development 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: 

How to upload local file to sap sever in the custom dialog program.

Former Member
0 Kudos

Hi Experts, i have the request to upload local file to sap sever in the custom dialog program. Any one have experence on this?

5 REPLIES 5

Former Member
0 Kudos

Hi,

You have to use Dataset operations, to upload data in application server.

Thanks & Regards,

Navneeth K.

Former Member
0 Kudos

Hi,

Upload the the file by using GUI_upload and then pass the internal table to SAP server by using transfer data.

Hope it helps you.

Regards

Manjari.

0 Kudos

hi manjari kotta, thanks for your information. can you give more details about about how to transfer the data. Does sap have shared folder to put the uploaded file?

0 Kudos

Hi,

The internal table data can be stored in the SAP directories which you can see in transaction AL11.

For example

DATA: file TYPE string VALUE `flights.dat`,

wa TYPE spfli.

FIELD-SYMBOLS TYPE x.

OPEN DATASET file FOR OUTPUT IN BINARY MODE.

SELECT *

FROM spfli

INTO wa.

ASSIGN wa TO CASTING.

TRANSFER TO file.

ENDSELECT.

CLOSE DATASET file.

Hope it helps you.

Regards

Manjari.

Former Member
0 Kudos

u can use tcode - cg3z for uploding data to sapserver via bdc..

or get data to internal table and use dataset..

Example :

OPEN DATASET rec FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

CALL 'SYSTEM' ID 'COMMAND' FIELD cmd

ID 'TAB' FIELD tabl-sys.