SAP SAPWL_WORKLOAD_ADD_TO_DB Function Module for
SAPWL_WORKLOAD_ADD_TO_DB is a standard sapwl workload add to db 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 sapwl workload add to db FM, simply by entering the name SAPWL_WORKLOAD_ADD_TO_DB into the relevant SAP transaction such as SE37 or SE38.
Function Group: STUW
Program Name: SAPLSTUW
Main Program: SAPLSTUW
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SAPWL_WORKLOAD_ADD_TO_DB 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 'SAPWL_WORKLOAD_ADD_TO_DB'".
EXPORTING
* NO_TOTAL_SERVER = 'X' "No TOTAL server compression
* SOURCE_INST = ' ' "
COLLECTOR_PARAMETERS = "
TABLES
V2_NORMAL_RECORDS = "Version 2: Normal records
V2_SPOOL_ACTIVITY_RECORDS = "
DB_PROCEDURE_RECORDS = "
CLIENT_INFO_RECORDS = "
V2_BTC_STEP_RECORDS = "Version 2: Background records
V2_TABLE_RECORDS = "Version 2: Table records
V2_RFC_CLIENT_RECORDS = "Version 2: RFC client records
V2_RFC_SERVER_RECORDS = "Version 2: RFC server records
V2_RFC_CLIENT_DEST_RECORDS = "Version 2: RFC client destination records
V2_RFC_SERVER_DEST_RECORDS = "Version 2: RFC server destination records
NORM_SUBRECORD_INDEX = "Normal record subrecord index
V2_SPOOL_PRINT_RECORDS = "
IMPORTING Parameters details for SAPWL_WORKLOAD_ADD_TO_DB
NO_TOTAL_SERVER - No TOTAL server compression
Data type: SAPWLPSTRC-FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SOURCE_INST -
Data type: SAPWLSERV-NAMEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
COLLECTOR_PARAMETERS -
Data type: SAPWLCOLPARAMSOptional: No
Call by Reference: Yes
TABLES Parameters details for SAPWL_WORKLOAD_ADD_TO_DB
V2_NORMAL_RECORDS - Version 2: Normal records
Data type: SAPWLPFNRMOptional: No
Call by Reference: No ( called with pass by value option)
V2_SPOOL_ACTIVITY_RECORDS -
Data type: SAPWLPFSPAOptional: No
Call by Reference: No ( called with pass by value option)
DB_PROCEDURE_RECORDS -
Data type: SAPWLPFDBPOptional: No
Call by Reference: Yes
CLIENT_INFO_RECORDS -
Data type: SAPWLPFCIFOptional: No
Call by Reference: Yes
V2_BTC_STEP_RECORDS - Version 2: Background records
Data type: SAPWLPFBTCOptional: No
Call by Reference: No ( called with pass by value option)
V2_TABLE_RECORDS - Version 2: Table records
Data type: SAPWLPFTABOptional: No
Call by Reference: No ( called with pass by value option)
V2_RFC_CLIENT_RECORDS - Version 2: RFC client records
Data type: SAPWLPFRCOptional: No
Call by Reference: No ( called with pass by value option)
V2_RFC_SERVER_RECORDS - Version 2: RFC server records
Data type: SAPWLPFRSOptional: No
Call by Reference: No ( called with pass by value option)
V2_RFC_CLIENT_DEST_RECORDS - Version 2: RFC client destination records
Data type: SAPWLPFRCDOptional: No
Call by Reference: No ( called with pass by value option)
V2_RFC_SERVER_DEST_RECORDS - Version 2: RFC server destination records
Data type: SAPWLPFRSDOptional: No
Call by Reference: No ( called with pass by value option)
NORM_SUBRECORD_INDEX - Normal record subrecord index
Data type: SAPWLSRCIXOptional: No
Call by Reference: No ( called with pass by value option)
V2_SPOOL_PRINT_RECORDS -
Data type: SAPWLPFSPPOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SAPWL_WORKLOAD_ADD_TO_DB 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_no_total_server | TYPE SAPWLPSTRC-FLAG, " 'X' | |||
| lt_v2_normal_records | TYPE STANDARD TABLE OF SAPWLPFNRM, " | |||
| lt_v2_spool_activity_records | TYPE STANDARD TABLE OF SAPWLPFSPA, " | |||
| lt_db_procedure_records | TYPE STANDARD TABLE OF SAPWLPFDBP, " | |||
| lt_client_info_records | TYPE STANDARD TABLE OF SAPWLPFCIF, " | |||
| lv_source_inst | TYPE SAPWLSERV-NAME, " SPACE | |||
| lt_v2_btc_step_records | TYPE STANDARD TABLE OF SAPWLPFBTC, " | |||
| lt_v2_table_records | TYPE STANDARD TABLE OF SAPWLPFTAB, " | |||
| lv_collector_parameters | TYPE SAPWLCOLPARAMS, " | |||
| lt_v2_rfc_client_records | TYPE STANDARD TABLE OF SAPWLPFRC, " | |||
| lt_v2_rfc_server_records | TYPE STANDARD TABLE OF SAPWLPFRS, " | |||
| lt_v2_rfc_client_dest_records | TYPE STANDARD TABLE OF SAPWLPFRCD, " | |||
| lt_v2_rfc_server_dest_records | TYPE STANDARD TABLE OF SAPWLPFRSD, " | |||
| lt_norm_subrecord_index | TYPE STANDARD TABLE OF SAPWLSRCIX, " | |||
| lt_v2_spool_print_records | TYPE STANDARD TABLE OF SAPWLPFSPP. " |
|   CALL FUNCTION 'SAPWL_WORKLOAD_ADD_TO_DB' " |
| EXPORTING | ||
| NO_TOTAL_SERVER | = lv_no_total_server | |
| SOURCE_INST | = lv_source_inst | |
| COLLECTOR_PARAMETERS | = lv_collector_parameters | |
| TABLES | ||
| V2_NORMAL_RECORDS | = lt_v2_normal_records | |
| V2_SPOOL_ACTIVITY_RECORDS | = lt_v2_spool_activity_records | |
| DB_PROCEDURE_RECORDS | = lt_db_procedure_records | |
| CLIENT_INFO_RECORDS | = lt_client_info_records | |
| V2_BTC_STEP_RECORDS | = lt_v2_btc_step_records | |
| V2_TABLE_RECORDS | = lt_v2_table_records | |
| V2_RFC_CLIENT_RECORDS | = lt_v2_rfc_client_records | |
| V2_RFC_SERVER_RECORDS | = lt_v2_rfc_server_records | |
| V2_RFC_CLIENT_DEST_RECORDS | = lt_v2_rfc_client_dest_records | |
| V2_RFC_SERVER_DEST_RECORDS | = lt_v2_rfc_server_dest_records | |
| NORM_SUBRECORD_INDEX | = lt_norm_subrecord_index | |
| V2_SPOOL_PRINT_RECORDS | = lt_v2_spool_print_records | |
| . " SAPWL_WORKLOAD_ADD_TO_DB | ||
ABAP code using 7.40 inline data declarations to call FM SAPWL_WORKLOAD_ADD_TO_DB
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 FLAG FROM SAPWLPSTRC INTO @DATA(ld_no_total_server). | ||||
| DATA(ld_no_total_server) | = 'X'. | |||
| "SELECT single NAME FROM SAPWLSERV INTO @DATA(ld_source_inst). | ||||
| DATA(ld_source_inst) | = ' '. | |||
Search for further information about these or an SAP related objects