SAP RSTR_OPEN_FILE Function Module for









RSTR_OPEN_FILE is a standard rstr open file SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 rstr open file FM, simply by entering the name RSTR_OPEN_FILE into the relevant SAP transaction such as SE37 or SE38.

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



Function RSTR_OPEN_FILE 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 'RSTR_OPEN_FILE'"
EXPORTING
* FILENAME = "
* WPID = "
* MIN_DURATION = "
* TABLELIST = "
* READ_SQL = "
* READ_AUTH = "
* READ_ENQUE = "
* READ_RFC = "
* READ_CMOD = "
* READ_USER = "
* READ_TBUF = "
* DATE = "
* EPP_ROOT_ID = "
* EPP_CONNECTION_ID = "
* READ_HTTP = "
* TIME = "
* ENDDATE = "
* ENDTIME = "
* USERNAME = "
* CLIENT = "
* TCODE = "
* TRANS_ID = "

EXCEPTIONS
OPEN_ERROR = 1 INVALID_PARAMETER = 2 PARAMETER_MISSING = 3 INTERNAL_ERROR = 4 NO_MEMORY = 5 ALREADY_OPEN = 6 END_OF_FILE = 7
.



IMPORTING Parameters details for RSTR_OPEN_FILE

FILENAME -

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

WPID -

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

MIN_DURATION -

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

TABLELIST -

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

READ_SQL -

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

READ_AUTH -

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

READ_ENQUE -

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

READ_RFC -

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

READ_CMOD -

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

READ_USER -

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

READ_TBUF -

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

DATE -

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

EPP_ROOT_ID -

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

EPP_CONNECTION_ID -

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

READ_HTTP -

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

TIME -

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

ENDDATE -

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

ENDTIME -

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

USERNAME -

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

CLIENT -

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

TCODE -

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

TRANS_ID -

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

EXCEPTIONS details

OPEN_ERROR -

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

INVALID_PARAMETER -

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

PARAMETER_MISSING -

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

INTERNAL_ERROR - An internal error has occurred

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

NO_MEMORY -

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

ALREADY_OPEN -

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

END_OF_FILE -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RSTR_OPEN_FILE 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:
lv_filename  TYPE CHAR100, "   
lv_open_error  TYPE CHAR100, "   
lv_wpid  TYPE CHAR3, "   
lv_min_duration  TYPE INT4, "   
lv_tablelist  TYPE TRTABLIST, "   
lv_read_sql  TYPE CHAR1, "   
lv_read_auth  TYPE CHAR1, "   
lv_read_enque  TYPE CHAR1, "   
lv_read_rfc  TYPE CHAR1, "   
lv_read_cmod  TYPE CHAR1, "   
lv_read_user  TYPE CHAR1, "   
lv_read_tbuf  TYPE CHAR1, "   
lv_date  TYPE DATS, "   
lv_invalid_parameter  TYPE DATS, "   
lv_epp_root_id  TYPE CHAR32, "   
lv_epp_connection_id  TYPE CHAR32, "   
lv_read_http  TYPE CHAR1, "   
lv_time  TYPE TIMS, "   
lv_parameter_missing  TYPE TIMS, "   
lv_enddate  TYPE DATS, "   
lv_internal_error  TYPE DATS, "   
lv_endtime  TYPE TIMS, "   
lv_no_memory  TYPE TIMS, "   
lv_username  TYPE SY-UNAME, "   
lv_already_open  TYPE SY, "   
lv_client  TYPE SY-MANDT, "   
lv_end_of_file  TYPE SY, "   
lv_tcode  TYPE SY-TCODE, "   
lv_trans_id  TYPE RSTR_TRANSID. "   

  CALL FUNCTION 'RSTR_OPEN_FILE'  "
    EXPORTING
         FILENAME = lv_filename
         WPID = lv_wpid
         MIN_DURATION = lv_min_duration
         TABLELIST = lv_tablelist
         READ_SQL = lv_read_sql
         READ_AUTH = lv_read_auth
         READ_ENQUE = lv_read_enque
         READ_RFC = lv_read_rfc
         READ_CMOD = lv_read_cmod
         READ_USER = lv_read_user
         READ_TBUF = lv_read_tbuf
         DATE = lv_date
         EPP_ROOT_ID = lv_epp_root_id
         EPP_CONNECTION_ID = lv_epp_connection_id
         READ_HTTP = lv_read_http
         TIME = lv_time
         ENDDATE = lv_enddate
         ENDTIME = lv_endtime
         USERNAME = lv_username
         CLIENT = lv_client
         TCODE = lv_tcode
         TRANS_ID = lv_trans_id
    EXCEPTIONS
        OPEN_ERROR = 1
        INVALID_PARAMETER = 2
        PARAMETER_MISSING = 3
        INTERNAL_ERROR = 4
        NO_MEMORY = 5
        ALREADY_OPEN = 6
        END_OF_FILE = 7
. " RSTR_OPEN_FILE




ABAP code using 7.40 inline data declarations to call FM RSTR_OPEN_FILE

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 UNAME FROM SY INTO @DATA(ld_username).
 
 
"SELECT single MANDT FROM SY INTO @DATA(ld_client).
 
 
"SELECT single TCODE FROM SY INTO @DATA(ld_tcode).
 
 


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!