SAP HR_99S_UPLOAD Function Module for Upload a file









HR_99S_UPLOAD is a standard hr 99s 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 Upload a file 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 hr 99s upload FM, simply by entering the name HR_99S_UPLOAD into the relevant SAP transaction such as SE37 or SE38.

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



Function HR_99S_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 'HR_99S_UPLOAD'"Upload a file
EXPORTING
* P_INITIAL_DIRECTORY = 'C: TEMP ' "
* P_FILENAME = "
* DEFAULT_EXTENSION = "
* P_FILETYPE_NO_SHOW = "Characterfeld der Länge 10
* P_FILETYPE = 'ASC' "Characterfeld der Länge 10
* P_FSDIALOG = 'X' "
* P_ITEM = "Text for pop up dialog
* P_HAS_FIELD_SEPARATOR = ' ' "Boolean Variable (X=True, -=False, Space=Unknown)

IMPORTING
P_FILELENGTH = "

TABLES
DATA_TAB = "

EXCEPTIONS
UPLOAD_ERROR = 1
.



IMPORTING Parameters details for HR_99S_UPLOAD

P_INITIAL_DIRECTORY -

Data type: STRING
Default: 'C: TEMP '
Optional: Yes
Call by Reference: Yes

P_FILENAME -

Data type: STRING
Optional: Yes
Call by Reference: Yes

DEFAULT_EXTENSION -

Data type: STRING
Optional: Yes
Call by Reference: Yes

P_FILETYPE_NO_SHOW - Characterfeld der Länge 10

Data type: STRING
Optional: Yes
Call by Reference: Yes

P_FILETYPE - Characterfeld der Länge 10

Data type: CHAR10
Default: 'ASC'
Optional: Yes
Call by Reference: Yes

P_FSDIALOG -

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

P_ITEM - Text for pop up dialog

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

P_HAS_FIELD_SEPARATOR - Boolean Variable (X=True, -=False, Space=Unknown)

Data type: BOOLEAN
Default: SPACE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for HR_99S_UPLOAD

P_FILELENGTH -

Data type: I
Optional: No
Call by Reference: Yes

TABLES Parameters details for HR_99S_UPLOAD

DATA_TAB -

Data type:
Optional: No
Call by Reference: Yes

EXCEPTIONS details

UPLOAD_ERROR -

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

Copy and paste ABAP code example for HR_99S_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_p_filelength  TYPE I, "   
lv_upload_error  TYPE I, "   
lv_p_initial_directory  TYPE STRING, "   'C: TEMP '
lv_p_filename  TYPE STRING, "   
lv_default_extension  TYPE STRING, "   
lv_p_filetype_no_show  TYPE STRING, "   
lv_p_filetype  TYPE CHAR10, "   'ASC'
lv_p_fsdialog  TYPE CHAR10, "   'X'
lv_p_item  TYPE STRING, "   
lv_p_has_field_separator  TYPE BOOLEAN. "   SPACE

  CALL FUNCTION 'HR_99S_UPLOAD'  "Upload a file
    EXPORTING
         P_INITIAL_DIRECTORY = lv_p_initial_directory
         P_FILENAME = lv_p_filename
         DEFAULT_EXTENSION = lv_default_extension
         P_FILETYPE_NO_SHOW = lv_p_filetype_no_show
         P_FILETYPE = lv_p_filetype
         P_FSDIALOG = lv_p_fsdialog
         P_ITEM = lv_p_item
         P_HAS_FIELD_SEPARATOR = lv_p_has_field_separator
    IMPORTING
         P_FILELENGTH = lv_p_filelength
    TABLES
         DATA_TAB = lt_data_tab
    EXCEPTIONS
        UPLOAD_ERROR = 1
. " HR_99S_UPLOAD




ABAP code using 7.40 inline data declarations to call FM HR_99S_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.

 
 
 
DATA(ld_p_initial_directory) = 'C: TEMP '.
 
 
 
 
DATA(ld_p_filetype) = 'ASC'.
 
DATA(ld_p_fsdialog) = 'X'.
 
 
DATA(ld_p_has_field_separator) = ' '.
 


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!