10-13-2008 9:58 AM
Hi Experts, i have the request to upload local file to sap sever in the custom dialog program. Any one have experence on this?
10-13-2008 10:00 AM
Hi,
You have to use Dataset operations, to upload data in application server.
Thanks & Regards,
Navneeth K.
10-13-2008 10:01 AM
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.
10-13-2008 10:12 AM
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?
10-13-2008 10:16 AM
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.
10-13-2008 10:12 AM
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.