SAP RSB_WRITE_LOCAL_FILE Function Module for Open Hub: RFC enabled module to write into the file









RSB_WRITE_LOCAL_FILE is a standard rsb write local file SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Open Hub: RFC enabled module to write into the 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 rsb write local file FM, simply by entering the name RSB_WRITE_LOCAL_FILE into the relevant SAP transaction such as SE37 or SE38.

Function Group: RSB_TASK
Program Name: SAPLRSB_TASK
Main Program: SAPLRSB_TASK
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function RSB_WRITE_LOCAL_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 'RSB_WRITE_LOCAL_FILE'"Open Hub: RFC enabled module to write into the file
EXPORTING
I_OHDEST = "Open Hub Destination
I_S_WRITE_IF = "Vector Containing an 'X' for the Column To Be Copied
* IN_NEW_TASK = ' ' "Single-Character Indicator

TABLES
DATA_TAB = "Transfer table

EXCEPTIONS
FAILED = 1
.



IMPORTING Parameters details for RSB_WRITE_LOCAL_FILE

I_OHDEST - Open Hub Destination

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

I_S_WRITE_IF - Vector Containing an 'X' for the Column To Be Copied

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

IN_NEW_TASK - Single-Character Indicator

Data type: RSBO_S_WRITE_IF-IN_NEW_TASK
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for RSB_WRITE_LOCAL_FILE

DATA_TAB - Transfer table

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

EXCEPTIONS details

FAILED -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RSB_WRITE_LOCAL_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_failed  TYPE STRING, "   
lt_data_tab  TYPE STANDARD TABLE OF RSBO_S_WRITE_DATA_IF, "   
lv_i_ohdest  TYPE RSOHDEST, "   
lv_i_s_write_if  TYPE RSBO_S_WRITE_IF, "   
lv_in_new_task  TYPE RSBO_S_WRITE_IF-IN_NEW_TASK. "   SPACE

  CALL FUNCTION 'RSB_WRITE_LOCAL_FILE'  "Open Hub: RFC enabled module to write into the file
    EXPORTING
         I_OHDEST = lv_i_ohdest
         I_S_WRITE_IF = lv_i_s_write_if
         IN_NEW_TASK = lv_in_new_task
    TABLES
         DATA_TAB = lt_data_tab
    EXCEPTIONS
        FAILED = 1
. " RSB_WRITE_LOCAL_FILE




ABAP code using 7.40 inline data declarations to call FM RSB_WRITE_LOCAL_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 IN_NEW_TASK FROM RSBO_S_WRITE_IF INTO @DATA(ld_in_new_task).
DATA(ld_in_new_task) = ' '.
 


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!