SAP Function Modules

WLBA_DETERMINE_PLANT_DATA SAP Function module







WLBA_DETERMINE_PLANT_DATA 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 WLBA_DETERMINE_PLANT_DATA into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM WLBA_DETERMINE_PLANT_DATA - WLBA DETERMINE PLANT DATA





CALL FUNCTION 'WLBA_DETERMINE_PLANT_DATA' "
* EXPORTING
*   i_only_lb_plants =          " c
*   i_plant_type =              " wlb0013-plant_type
*   i_record_tests =            " wlb000a-wlb_check_a_werk
*   i_oper_ekorgs =             " c
  TABLES
    i_r_werks =                 " wvlbt_t_s_ekpo_werks
*   i_t_t024z_valid =           " t024z
*   i_t_t024e_valid =           " t024e
*   e_t_plants =                " wvlbt_t_wlb3_plants_type
*   ch_t_mssg_lb =              " wvlba_t_mssg_lb
  EXCEPTIONS
    ERROR = 1                   "
    .  "  WLBA_DETERMINE_PLANT_DATA

ABAP code example for Function Module WLBA_DETERMINE_PLANT_DATA





The ABAP code below is a full code listing to execute function module WLBA_DETERMINE_PLANT_DATA 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:
it_i_r_werks  TYPE STANDARD TABLE OF WVLBT_T_S_EKPO_WERKS,"TABLES PARAM
wa_i_r_werks  LIKE LINE OF it_i_r_werks ,
it_i_t_t024z_valid  TYPE STANDARD TABLE OF T024Z,"TABLES PARAM
wa_i_t_t024z_valid  LIKE LINE OF it_i_t_t024z_valid ,
it_i_t_t024e_valid  TYPE STANDARD TABLE OF T024E,"TABLES PARAM
wa_i_t_t024e_valid  LIKE LINE OF it_i_t_t024e_valid ,
it_e_t_plants  TYPE STANDARD TABLE OF WVLBT_T_WLB3_PLANTS_TYPE,"TABLES PARAM
wa_e_t_plants  LIKE LINE OF it_e_t_plants ,
it_ch_t_mssg_lb  TYPE STANDARD TABLE OF WVLBA_T_MSSG_LB,"TABLES PARAM
wa_ch_t_mssg_lb  LIKE LINE OF it_ch_t_mssg_lb .

DATA(ld_i_only_lb_plants) = 'Check type of data required'.

DATA(ld_i_plant_type) = some text here

DATA(ld_i_record_tests) = some text here
DATA(ld_i_oper_ekorgs) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_r_werks to it_i_r_werks.

"populate fields of struture and append to itab
append wa_i_t_t024z_valid to it_i_t_t024z_valid.

"populate fields of struture and append to itab
append wa_i_t_t024e_valid to it_i_t_t024e_valid.

"populate fields of struture and append to itab
append wa_e_t_plants to it_e_t_plants.

"populate fields of struture and append to itab
append wa_ch_t_mssg_lb to it_ch_t_mssg_lb. . CALL FUNCTION 'WLBA_DETERMINE_PLANT_DATA' * EXPORTING * i_only_lb_plants = ld_i_only_lb_plants * i_plant_type = ld_i_plant_type * i_record_tests = ld_i_record_tests * i_oper_ekorgs = ld_i_oper_ekorgs TABLES i_r_werks = it_i_r_werks * i_t_t024z_valid = it_i_t_t024z_valid * i_t_t024e_valid = it_i_t_t024e_valid * e_t_plants = it_e_t_plants * ch_t_mssg_lb = it_ch_t_mssg_lb EXCEPTIONS ERROR = 1 . " WLBA_DETERMINE_PLANT_DATA
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_i_only_lb_plants  TYPE C ,
it_i_r_werks  TYPE STANDARD TABLE OF WVLBT_T_S_EKPO_WERKS ,
wa_i_r_werks  LIKE LINE OF it_i_r_werks,
ld_i_plant_type  TYPE WLB0013-PLANT_TYPE ,
it_i_t_t024z_valid  TYPE STANDARD TABLE OF T024Z ,
wa_i_t_t024z_valid  LIKE LINE OF it_i_t_t024z_valid,
ld_i_record_tests  TYPE WLB000A-WLB_CHECK_A_WERK ,
it_i_t_t024e_valid  TYPE STANDARD TABLE OF T024E ,
wa_i_t_t024e_valid  LIKE LINE OF it_i_t_t024e_valid,
ld_i_oper_ekorgs  TYPE C ,
it_e_t_plants  TYPE STANDARD TABLE OF WVLBT_T_WLB3_PLANTS_TYPE ,
wa_e_t_plants  LIKE LINE OF it_e_t_plants,
it_ch_t_mssg_lb  TYPE STANDARD TABLE OF WVLBA_T_MSSG_LB ,
wa_ch_t_mssg_lb  LIKE LINE OF it_ch_t_mssg_lb.

ld_i_only_lb_plants = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_r_werks to it_i_r_werks.

ld_i_plant_type = some text here

"populate fields of struture and append to itab
append wa_i_t_t024z_valid to it_i_t_t024z_valid.

ld_i_record_tests = some text here

"populate fields of struture and append to itab
append wa_i_t_t024e_valid to it_i_t_t024e_valid.
ld_i_oper_ekorgs = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_t_plants to it_e_t_plants.

"populate fields of struture and append to itab
append wa_ch_t_mssg_lb to it_ch_t_mssg_lb.

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 WLBA_DETERMINE_PLANT_DATA or its description.