SAP SETTLUNIT_GENREAD_SWENR Function Module for
SETTLUNIT_GENREAD_SWENR is a standard settlunit genread swenr 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 settlunit genread swenr FM, simply by entering the name SETTLUNIT_GENREAD_SWENR into the relevant SAP transaction such as SE37 or SE38.
Function Group: REDB_SETTLUNIT
Program Name: SAPLREDB_SETTLUNIT
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SETTLUNIT_GENREAD_SWENR 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 'SETTLUNIT_GENREAD_SWENR'".
EXPORTING
IV_BUKRS = "
IV_SWENR = "
* IV_RESET_BUFFER = 'X' "
* IV_BYPASSING_BUFFER = "
* IV_MAX_BUFFER_SIZE = 100 "
TABLES
* ET_VIAK03 = "
EXCEPTIONS
BUFFER_INCONSISTENCY = 1 INDEX_INCONSISTENCY = 2 NOT_FOUND = 3 PARAMETER_ERROR = 4 OTHER_ERROR_INDEX_PUSH = 5
IMPORTING Parameters details for SETTLUNIT_GENREAD_SWENR
IV_BUKRS -
Data type: VIAK03-BUKRSOptional: No
Call by Reference: Yes
IV_SWENR -
Data type: VIAK03-SWENROptional: No
Call by Reference: Yes
IV_RESET_BUFFER -
Data type: XFELDDefault: 'X'
Optional: Yes
Call by Reference: Yes
IV_BYPASSING_BUFFER -
Data type: XFELDOptional: Yes
Call by Reference: Yes
IV_MAX_BUFFER_SIZE -
Data type: IDefault: 100
Optional: Yes
Call by Reference: Yes
TABLES Parameters details for SETTLUNIT_GENREAD_SWENR
ET_VIAK03 -
Data type: VIAK03Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
BUFFER_INCONSISTENCY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INDEX_INCONSISTENCY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PARAMETER_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OTHER_ERROR_INDEX_PUSH -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SETTLUNIT_GENREAD_SWENR 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_iv_bukrs | TYPE VIAK03-BUKRS, " | |||
| lt_et_viak03 | TYPE STANDARD TABLE OF VIAK03, " | |||
| lv_buffer_inconsistency | TYPE VIAK03, " | |||
| lv_iv_swenr | TYPE VIAK03-SWENR, " | |||
| lv_index_inconsistency | TYPE VIAK03, " | |||
| lv_not_found | TYPE VIAK03, " | |||
| lv_iv_reset_buffer | TYPE XFELD, " 'X' | |||
| lv_parameter_error | TYPE XFELD, " | |||
| lv_iv_bypassing_buffer | TYPE XFELD, " | |||
| lv_iv_max_buffer_size | TYPE I, " 100 | |||
| lv_other_error_index_push | TYPE I. " |
|   CALL FUNCTION 'SETTLUNIT_GENREAD_SWENR' " |
| EXPORTING | ||
| IV_BUKRS | = lv_iv_bukrs | |
| IV_SWENR | = lv_iv_swenr | |
| IV_RESET_BUFFER | = lv_iv_reset_buffer | |
| IV_BYPASSING_BUFFER | = lv_iv_bypassing_buffer | |
| IV_MAX_BUFFER_SIZE | = lv_iv_max_buffer_size | |
| TABLES | ||
| ET_VIAK03 | = lt_et_viak03 | |
| EXCEPTIONS | ||
| BUFFER_INCONSISTENCY = 1 | ||
| INDEX_INCONSISTENCY = 2 | ||
| NOT_FOUND = 3 | ||
| PARAMETER_ERROR = 4 | ||
| OTHER_ERROR_INDEX_PUSH = 5 | ||
| . " SETTLUNIT_GENREAD_SWENR | ||
ABAP code using 7.40 inline data declarations to call FM SETTLUNIT_GENREAD_SWENR
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 BUKRS FROM VIAK03 INTO @DATA(ld_iv_bukrs). | ||||
| "SELECT single SWENR FROM VIAK03 INTO @DATA(ld_iv_swenr). | ||||
| DATA(ld_iv_reset_buffer) | = 'X'. | |||
| DATA(ld_iv_max_buffer_size) | = 100. | |||
Search for further information about these or an SAP related objects