SAP LISTING_VIA_LAYOUT Function Module for NOTRANSL: Listung über Regalbausteine
LISTING_VIA_LAYOUT is a standard listing via layout SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Listung über Regalbausteine 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 listing via layout FM, simply by entering the name LISTING_VIA_LAYOUT into the relevant SAP transaction such as SE37 or SE38.
Function Group: WSON
Program Name: SAPLWSON
Main Program:
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function LISTING_VIA_LAYOUT 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 'LISTING_VIA_LAYOUT'"NOTRANSL: Listung über Regalbausteine.
EXPORTING
* PI_WLMV_NEW = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PI_WLMV_OLD = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PI_DEL_ASMOD = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PI_UPD_WHICH_LM_VER = 'F' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PI_WSOH_OLD_CREATE = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PI_CREATE_WLK1_CHANGE_DOCUMENT = 'X' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PI_SITUATION = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
TABLES
* PI_T_MALG_NEW = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PI_T_MALG_OLD = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PI_T_WRSZ = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PE_T_ASS_ERR = "DE-EN-LANG-SWITCH-NO-TRANSLATION
EXCEPTIONS
KEY_UNCOMPLETE = 1 LISTING_REFUSED = 2 ERROR_LAYOUT_MODULE = 3 ERROR_LAYOUT_MODULE_VER = 4 ERROR_ASSORTMENT = 5 ERROR_ASSORTMENT_MODULE = 6 ERROR_LISTING_METHOD = 7 DATA_LOCKED = 8
IMPORTING Parameters details for LISTING_VIA_LAYOUT
PI_WLMV_NEW - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WLMVOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_WLMV_OLD - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WLMVOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_DEL_ASMOD - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_UPD_WHICH_LM_VER - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WLAYMODVERDefault: 'F'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_WSOH_OLD_CREATE - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_CREATE_WLK1_CHANGE_DOCUMENT - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: XFELDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_SITUATION - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for LISTING_VIA_LAYOUT
PI_T_MALG_NEW - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: MALG_LISTOptional: Yes
Call by Reference: Yes
PI_T_MALG_OLD - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: MALG_LISTOptional: Yes
Call by Reference: Yes
PI_T_WRSZ - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WRSZOptional: Yes
Call by Reference: No ( called with pass by value option)
PE_T_ASS_ERR - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WINT_FERROptional: Yes
Call by Reference: Yes
EXCEPTIONS details
KEY_UNCOMPLETE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LISTING_REFUSED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_LAYOUT_MODULE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_LAYOUT_MODULE_VER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_ASSORTMENT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_ASSORTMENT_MODULE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_LISTING_METHOD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DATA_LOCKED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for LISTING_VIA_LAYOUT 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_pi_wlmv_new | TYPE WLMV, " | |||
| lt_pi_t_malg_new | TYPE STANDARD TABLE OF MALG_LIST, " | |||
| lv_key_uncomplete | TYPE MALG_LIST, " | |||
| lv_pi_wlmv_old | TYPE WLMV, " | |||
| lt_pi_t_malg_old | TYPE STANDARD TABLE OF MALG_LIST, " | |||
| lv_listing_refused | TYPE MALG_LIST, " | |||
| lt_pi_t_wrsz | TYPE STANDARD TABLE OF WRSZ, " | |||
| lv_pi_del_asmod | TYPE XFELD, " SPACE | |||
| lv_error_layout_module | TYPE XFELD, " | |||
| lt_pe_t_ass_err | TYPE STANDARD TABLE OF WINT_FERR, " | |||
| lv_pi_upd_which_lm_ver | TYPE WLAYMODVER, " 'F' | |||
| lv_error_layout_module_ver | TYPE WLAYMODVER, " | |||
| lv_error_assortment | TYPE WLAYMODVER, " | |||
| lv_pi_wsoh_old_create | TYPE XFELD, " SPACE | |||
| lv_error_assortment_module | TYPE XFELD, " | |||
| lv_pi_create_wlk1_change_document | TYPE XFELD, " 'X' | |||
| lv_pi_situation | TYPE XFELD, " SPACE | |||
| lv_error_listing_method | TYPE XFELD, " | |||
| lv_data_locked | TYPE XFELD. " |
|   CALL FUNCTION 'LISTING_VIA_LAYOUT' "NOTRANSL: Listung über Regalbausteine |
| EXPORTING | ||
| PI_WLMV_NEW | = lv_pi_wlmv_new | |
| PI_WLMV_OLD | = lv_pi_wlmv_old | |
| PI_DEL_ASMOD | = lv_pi_del_asmod | |
| PI_UPD_WHICH_LM_VER | = lv_pi_upd_which_lm_ver | |
| PI_WSOH_OLD_CREATE | = lv_pi_wsoh_old_create | |
| PI_CREATE_WLK1_CHANGE_DOCUMENT | = lv_pi_create_wlk1_change_document | |
| PI_SITUATION | = lv_pi_situation | |
| TABLES | ||
| PI_T_MALG_NEW | = lt_pi_t_malg_new | |
| PI_T_MALG_OLD | = lt_pi_t_malg_old | |
| PI_T_WRSZ | = lt_pi_t_wrsz | |
| PE_T_ASS_ERR | = lt_pe_t_ass_err | |
| EXCEPTIONS | ||
| KEY_UNCOMPLETE = 1 | ||
| LISTING_REFUSED = 2 | ||
| ERROR_LAYOUT_MODULE = 3 | ||
| ERROR_LAYOUT_MODULE_VER = 4 | ||
| ERROR_ASSORTMENT = 5 | ||
| ERROR_ASSORTMENT_MODULE = 6 | ||
| ERROR_LISTING_METHOD = 7 | ||
| DATA_LOCKED = 8 | ||
| . " LISTING_VIA_LAYOUT | ||
ABAP code using 7.40 inline data declarations to call FM LISTING_VIA_LAYOUT
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.| DATA(ld_pi_del_asmod) | = ' '. | |||
| DATA(ld_pi_upd_which_lm_ver) | = 'F'. | |||
| DATA(ld_pi_wsoh_old_create) | = ' '. | |||
| DATA(ld_pi_create_wlk1_change_document) | = 'X'. | |||
| DATA(ld_pi_situation) | = ' '. | |||
Search for further information about these or an SAP related objects