SAP Function Modules

CALL_SCREEN_151 SAP Function module - Calling screen 0151







CALL_SCREEN_151 is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CALL_SCREEN_151 into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: LMOB
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM CALL_SCREEN_151 - CALL SCREEN 151





CALL FUNCTION 'CALL_SCREEN_151' "Calling screen 0151
  EXPORTING
    i_lgnum =                   " linv-lgnum    Warehouse id
    i_lgtyp =                   " linv-lgtyp    Storage type
    i_lgpla =                   " linv-lgpla    Storage bin
    i_tcode =                   " sy-tcode      Current transaction code
    i_clgpla =                  " rlmob-clgpla  Storage bin
    i_kznul =                   " rl04i-kznul   Indicator: storage bin empty or quant does not exist
*   i_error_code = ' '          " xfeld         Checkbox
  IMPORTING
    e_ulgnum =                  " linv-lgnum    Warehouse id
    e_ulgtyp =                  " linv-lgtyp    Storage type
    e_ulgpla =                  " linv-lgpla    Storage bin
    e_clgpla =                  " rlmob-clgpla  Storage bin
    e_clenum =                  " rlmob-clenum  Storage unit number
    e_lenum =                   " lein-lenum    Storage unit number
    e_screen_fcode =            " sy-ucomm      function key pressed by user
    e_bin_type =                " c             Indicator if bin storage type is SU managed
  TABLES
    x_sus =                     " leinm
  EXCEPTIONS
    FAIL_IN_PHYSICAL_SCREEN_NUMBER = 1  "
    .  "  CALL_SCREEN_151

ABAP code example for Function Module CALL_SCREEN_151





The ABAP code below is a full code listing to execute function module CALL_SCREEN_151 including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_e_ulgnum  TYPE LINV-LGNUM ,
ld_e_ulgtyp  TYPE LINV-LGTYP ,
ld_e_ulgpla  TYPE LINV-LGPLA ,
ld_e_clgpla  TYPE RLMOB-CLGPLA ,
ld_e_clenum  TYPE RLMOB-CLENUM ,
ld_e_lenum  TYPE LEIN-LENUM ,
ld_e_screen_fcode  TYPE SY-UCOMM ,
ld_e_bin_type  TYPE C ,
it_x_sus  TYPE STANDARD TABLE OF LEINM,"TABLES PARAM
wa_x_sus  LIKE LINE OF it_x_sus .


SELECT single LGNUM
FROM LINV
INTO @DATA(ld_i_lgnum).


SELECT single LGTYP
FROM LINV
INTO @DATA(ld_i_lgtyp).


SELECT single LGPLA
FROM LINV
INTO @DATA(ld_i_lgpla).

DATA(ld_i_tcode) = 'some text here'.

DATA(ld_i_clgpla) = some text here

DATA(ld_i_kznul) = some text here
DATA(ld_i_error_code) = 'some text here'.

"populate fields of struture and append to itab
append wa_x_sus to it_x_sus. . CALL FUNCTION 'CALL_SCREEN_151' EXPORTING i_lgnum = ld_i_lgnum i_lgtyp = ld_i_lgtyp i_lgpla = ld_i_lgpla i_tcode = ld_i_tcode i_clgpla = ld_i_clgpla i_kznul = ld_i_kznul * i_error_code = ld_i_error_code IMPORTING e_ulgnum = ld_e_ulgnum e_ulgtyp = ld_e_ulgtyp e_ulgpla = ld_e_ulgpla e_clgpla = ld_e_clgpla e_clenum = ld_e_clenum e_lenum = ld_e_lenum e_screen_fcode = ld_e_screen_fcode e_bin_type = ld_e_bin_type TABLES x_sus = it_x_sus EXCEPTIONS FAIL_IN_PHYSICAL_SCREEN_NUMBER = 1 . " CALL_SCREEN_151
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_e_ulgnum  TYPE LINV-LGNUM ,
ld_i_lgnum  TYPE LINV-LGNUM ,
it_x_sus  TYPE STANDARD TABLE OF LEINM ,
wa_x_sus  LIKE LINE OF it_x_sus,
ld_e_ulgtyp  TYPE LINV-LGTYP ,
ld_i_lgtyp  TYPE LINV-LGTYP ,
ld_e_ulgpla  TYPE LINV-LGPLA ,
ld_i_lgpla  TYPE LINV-LGPLA ,
ld_e_clgpla  TYPE RLMOB-CLGPLA ,
ld_i_tcode  TYPE SY-TCODE ,
ld_e_clenum  TYPE RLMOB-CLENUM ,
ld_i_clgpla  TYPE RLMOB-CLGPLA ,
ld_e_lenum  TYPE LEIN-LENUM ,
ld_i_kznul  TYPE RL04I-KZNUL ,
ld_e_screen_fcode  TYPE SY-UCOMM ,
ld_i_error_code  TYPE XFELD ,
ld_e_bin_type  TYPE C .


SELECT single LGNUM
FROM LINV
INTO ld_i_lgnum.


"populate fields of struture and append to itab
append wa_x_sus to it_x_sus.

SELECT single LGTYP
FROM LINV
INTO ld_i_lgtyp.


SELECT single LGPLA
FROM LINV
INTO ld_i_lgpla.

ld_i_tcode = 'some text here'.

ld_i_clgpla = some text here

ld_i_kznul = some text here
ld_i_error_code = 'some text here'.

SAP Documentation for FM CALL_SCREEN_151


This function calls screen number 0151, where you can perform inventory counting by storage unit number (radio frequency). ...See here for full SAP fm documentation








Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CALL_SCREEN_151 or its description.