SAP TERM_UPLOAD Function Module for NOTRANSL: Download zum Frontend









TERM_UPLOAD is a standard term upload SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Download zum Frontend processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for term upload FM, simply by entering the name TERM_UPLOAD into the relevant SAP transaction such as SE37 or SE38.

Function Group: STERM_MULTI
Program Name: SAPLSTERM_MULTI
Main Program: SAPLSTERM_MULTI
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TERM_UPLOAD pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'TERM_UPLOAD'"NOTRANSL: Download zum Frontend
EXPORTING
FILENAME = "Local file for upload/download
FILETYPE = "Local file for upload/download
* WITH_DIALOG = 'X' "Flag (X or blank)

IMPORTING
ACT_FILENAME = "Local file for upload/download
ACT_FILETYPE = "Transfer File Format (Upload/Download)
CANCEL = "

TABLES
DATA_TAB = "

EXCEPTIONS
FILE_WRITE_ERROR = 1 NO_BATCH = 2 GUI_REFUSE_FILETRANSFER = 3 INVALID_TYPE = 4 NO_AUTHORITY = 5 UNKNOWN_ERROR = 6 USER_CANCELLED = 7
.



IMPORTING Parameters details for TERM_UPLOAD

FILENAME - Local file for upload/download

Data type: RLGRAP-FILENAME
Optional: No
Call by Reference: Yes

FILETYPE - Local file for upload/download

Data type: RLGRAP-FILETYPE
Optional: No
Call by Reference: Yes

WITH_DIALOG - Flag (X or blank)

Data type: AS4FLAG
Default: 'X'
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for TERM_UPLOAD

ACT_FILENAME - Local file for upload/download

Data type: RLGRAP-FILENAME
Optional: No
Call by Reference: No ( called with pass by value option)

ACT_FILETYPE - Transfer File Format (Upload/Download)

Data type: RLGRAP-FILETYPE
Optional: No
Call by Reference: No ( called with pass by value option)

CANCEL -

Data type:
Optional: No
Call by Reference: Yes

TABLES Parameters details for TERM_UPLOAD

DATA_TAB -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

FILE_WRITE_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_BATCH -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

GUI_REFUSE_FILETRANSFER -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INVALID_TYPE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_AUTHORITY -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

UNKNOWN_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

USER_CANCELLED -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for TERM_UPLOAD Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lt_data_tab  TYPE STANDARD TABLE OF STRING, "   
lv_filename  TYPE RLGRAP-FILENAME, "   
lv_act_filename  TYPE RLGRAP-FILENAME, "   
lv_file_write_error  TYPE RLGRAP, "   
lv_filetype  TYPE RLGRAP-FILETYPE, "   
lv_no_batch  TYPE RLGRAP, "   
lv_act_filetype  TYPE RLGRAP-FILETYPE, "   
lv_cancel  TYPE RLGRAP, "   
lv_with_dialog  TYPE AS4FLAG, "   'X'
lv_gui_refuse_filetransfer  TYPE AS4FLAG, "   
lv_invalid_type  TYPE AS4FLAG, "   
lv_no_authority  TYPE AS4FLAG, "   
lv_unknown_error  TYPE AS4FLAG, "   
lv_user_cancelled  TYPE AS4FLAG. "   

  CALL FUNCTION 'TERM_UPLOAD'  "NOTRANSL: Download zum Frontend
    EXPORTING
         FILENAME = lv_filename
         FILETYPE = lv_filetype
         WITH_DIALOG = lv_with_dialog
    IMPORTING
         ACT_FILENAME = lv_act_filename
         ACT_FILETYPE = lv_act_filetype
         CANCEL = lv_cancel
    TABLES
         DATA_TAB = lt_data_tab
    EXCEPTIONS
        FILE_WRITE_ERROR = 1
        NO_BATCH = 2
        GUI_REFUSE_FILETRANSFER = 3
        INVALID_TYPE = 4
        NO_AUTHORITY = 5
        UNKNOWN_ERROR = 6
        USER_CANCELLED = 7
. " TERM_UPLOAD




ABAP code using 7.40 inline data declarations to call FM TERM_UPLOAD

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single FILENAME FROM RLGRAP INTO @DATA(ld_filename).
 
"SELECT single FILENAME FROM RLGRAP INTO @DATA(ld_act_filename).
 
 
"SELECT single FILETYPE FROM RLGRAP INTO @DATA(ld_filetype).
 
 
"SELECT single FILETYPE FROM RLGRAP INTO @DATA(ld_act_filetype).
 
 
DATA(ld_with_dialog) = 'X'.
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!