![]() |
|
||||||
File Upload with ws_upload Current Release for article: 4.6b This article describes creating a workstation upload to SAP. The WS_UPLOAD function replaces the old GUI_UPLOAD. GUI_UPLOAD should no longer be used. Upload a file from a workstation, or a "presentation server" as it is known in the SAP world, to an ABAP program is a relatively simple procedure requiring a call to the BAPI WS_UPLOAD. The BAPI processes the request and returns an internal table containing the uploaded file. Let's begin by defining the itab that will hold the input file from the workstation.. data: begin of plant occurs 200, .Next, lets define the input file name and tell the program to prompt for input: parameters: wsfile(132) lower case. start-of-selection. Alternates for the parameters option: parameters: wsfile(132) default 'C:\input.txt' Importing the raw pattern:
CALL FUNCTION 'WS_UPLOAD' What you need in to call the function: CALL FUNCTION 'WS_UPLOAD' The call is very simple. The filename is the name of the variable that holds the user selection for the file on the presentation server. Filetype is a little tricky. There are a number of different values available, including
Check the function module documentation for a complete list of values. Datatab is the ITAB name created in the first step of this procedure. If the procedue completes normally, the upload information will be in this table. |
|||||||
[Perl help] [ABAP help] [MySQL help] [TCP/IP troubleshooting] [HTML help] [Feedback] [Humor] Advertise on Golden Ink's Georgia Network
|
|||||||