SAP STUR_WRITE_TABLE Function Module for ST04 (Oracle): Write Table
STUR_WRITE_TABLE is a standard stur write table SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for ST04 (Oracle): Write Table 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 stur write table FM, simply by entering the name STUR_WRITE_TABLE into the relevant SAP transaction such as SE37 or SE38.
Function Group: STUR
Program Name: SAPLSTUR
Main Program: SAPLSTUR
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function STUR_WRITE_TABLE 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 'STUR_WRITE_TABLE'"ST04 (Oracle): Write Table.
EXPORTING
* ORASYSTABN = "
* COMPRESS = "
* MENUE_DEFAULT = 'X' "
* LINESIZE = 250 "
* CURR_TIME = "
* CURR_DATE = "
* CURR_SYSTEM = "
IMPORTING
UCOMM = "Screens, Function Code Triggered by PAI
TABLES
ORASYSTAB = "
ORASYSTABHEAD = "
EXCEPTIONS
TABLE_EMPTY = 1
IMPORTING Parameters details for STUR_WRITE_TABLE
ORASYSTABN -
Data type: EXTENTS_TI-DB_OBJECTOptional: Yes
Call by Reference: No ( called with pass by value option)
COMPRESS -
Data type: TST04HELP-FLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
MENUE_DEFAULT -
Data type: TST04HELP-FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
LINESIZE -
Data type: IDefault: 250
Optional: Yes
Call by Reference: No ( called with pass by value option)
CURR_TIME -
Data type: SY-UZEITOptional: Yes
Call by Reference: No ( called with pass by value option)
CURR_DATE -
Data type: SY-DATUMOptional: Yes
Call by Reference: No ( called with pass by value option)
CURR_SYSTEM -
Data type: TST04INST-DB_INSTANCOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for STUR_WRITE_TABLE
UCOMM - Screens, Function Code Triggered by PAI
Data type: SY-UCOMMOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for STUR_WRITE_TABLE
ORASYSTAB -
Data type: LISTEOptional: No
Call by Reference: No ( called with pass by value option)
ORASYSTABHEAD -
Data type: ORASYSTABHOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
TABLE_EMPTY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for STUR_WRITE_TABLE 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_ucomm | TYPE SY-UCOMM, " | |||
| lt_orasystab | TYPE STANDARD TABLE OF LISTE, " | |||
| lv_orasystabn | TYPE EXTENTS_TI-DB_OBJECT, " | |||
| lv_table_empty | TYPE EXTENTS_TI, " | |||
| lv_compress | TYPE TST04HELP-FLAG, " | |||
| lt_orasystabhead | TYPE STANDARD TABLE OF ORASYSTABH, " | |||
| lv_menue_default | TYPE TST04HELP-FLAG, " 'X' | |||
| lv_linesize | TYPE I, " 250 | |||
| lv_curr_time | TYPE SY-UZEIT, " | |||
| lv_curr_date | TYPE SY-DATUM, " | |||
| lv_curr_system | TYPE TST04INST-DB_INSTANC. " |
|   CALL FUNCTION 'STUR_WRITE_TABLE' "ST04 (Oracle): Write Table |
| EXPORTING | ||
| ORASYSTABN | = lv_orasystabn | |
| COMPRESS | = lv_compress | |
| MENUE_DEFAULT | = lv_menue_default | |
| LINESIZE | = lv_linesize | |
| CURR_TIME | = lv_curr_time | |
| CURR_DATE | = lv_curr_date | |
| CURR_SYSTEM | = lv_curr_system | |
| IMPORTING | ||
| UCOMM | = lv_ucomm | |
| TABLES | ||
| ORASYSTAB | = lt_orasystab | |
| ORASYSTABHEAD | = lt_orasystabhead | |
| EXCEPTIONS | ||
| TABLE_EMPTY = 1 | ||
| . " STUR_WRITE_TABLE | ||
ABAP code using 7.40 inline data declarations to call FM STUR_WRITE_TABLE
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 UCOMM FROM SY INTO @DATA(ld_ucomm). | ||||
| "SELECT single DB_OBJECT FROM EXTENTS_TI INTO @DATA(ld_orasystabn). | ||||
| "SELECT single FLAG FROM TST04HELP INTO @DATA(ld_compress). | ||||
| "SELECT single FLAG FROM TST04HELP INTO @DATA(ld_menue_default). | ||||
| DATA(ld_menue_default) | = 'X'. | |||
| DATA(ld_linesize) | = 250. | |||
| "SELECT single UZEIT FROM SY INTO @DATA(ld_curr_time). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_curr_date). | ||||
| "SELECT single DB_INSTANC FROM TST04INST INTO @DATA(ld_curr_system). | ||||
Search for further information about these or an SAP related objects