SAP Function Modules

GETLIST_GETITEMS SAP Function module







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

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


Pattern for FM GETLIST_GETITEMS - GETLIST GETITEMS





CALL FUNCTION 'GETLIST_GETITEMS' "
* EXPORTING
*   detailed = ' '              " c
  IMPORTING
    pe_t_ikpf_parameter_added_ehp2 =   " ty_t_ikpf
  TABLES
*   plant_ra =                  " bapi_physinv_plant_ra
*   stge_loc_ra =               " bapi_physinv_stge_loc_ra
*   phys_inv_no_ra =            " bapi_physinv_ph_inv_no_ra
*   phys_inv_no_long_ra =       " bapi_physinv_ph_inv_no_long_ra
*   physinventory_ra =          " bapi_physinv_doc_ra
*   fiscalyear_ra =             " bapi_physinv_year_ra
*   plan_date_ra =              " bapi_physinv_plan_date_ra
*   count_status_ra =           " bapi_physinv_count_st_ra
*   adjust_status_ra =          " bapi_physinv_adjust_st_ra
*   grouping_crit_ra =          " bapi_physinv_group_crit_ra
*   material_ra =               " bapi_physinv_material_ra
*   batch_ra =                  " bapi_physinv_batch_ra
    return =                    " bapiret2
    matphysinv_head =           " bapi_physinv_head
*   matphysinv_item =           " bapi_physinv_item
    .  "  GETLIST_GETITEMS

ABAP code example for Function Module GETLIST_GETITEMS





The ABAP code below is a full code listing to execute function module GETLIST_GETITEMS 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_pe_t_ikpf_parameter_added_ehp2  TYPE TY_T_IKPF ,
it_plant_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_PLANT_RA,"TABLES PARAM
wa_plant_ra  LIKE LINE OF it_plant_ra ,
it_stge_loc_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_STGE_LOC_RA,"TABLES PARAM
wa_stge_loc_ra  LIKE LINE OF it_stge_loc_ra ,
it_phys_inv_no_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_PH_INV_NO_RA,"TABLES PARAM
wa_phys_inv_no_ra  LIKE LINE OF it_phys_inv_no_ra ,
it_phys_inv_no_long_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_PH_INV_NO_LONG_RA,"TABLES PARAM
wa_phys_inv_no_long_ra  LIKE LINE OF it_phys_inv_no_long_ra ,
it_physinventory_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_DOC_RA,"TABLES PARAM
wa_physinventory_ra  LIKE LINE OF it_physinventory_ra ,
it_fiscalyear_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_YEAR_RA,"TABLES PARAM
wa_fiscalyear_ra  LIKE LINE OF it_fiscalyear_ra ,
it_plan_date_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_PLAN_DATE_RA,"TABLES PARAM
wa_plan_date_ra  LIKE LINE OF it_plan_date_ra ,
it_count_status_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_COUNT_ST_RA,"TABLES PARAM
wa_count_status_ra  LIKE LINE OF it_count_status_ra ,
it_adjust_status_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_ADJUST_ST_RA,"TABLES PARAM
wa_adjust_status_ra  LIKE LINE OF it_adjust_status_ra ,
it_grouping_crit_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_GROUP_CRIT_RA,"TABLES PARAM
wa_grouping_crit_ra  LIKE LINE OF it_grouping_crit_ra ,
it_material_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_MATERIAL_RA,"TABLES PARAM
wa_material_ra  LIKE LINE OF it_material_ra ,
it_batch_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_BATCH_RA,"TABLES PARAM
wa_batch_ra  LIKE LINE OF it_batch_ra ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return ,
it_matphysinv_head  TYPE STANDARD TABLE OF BAPI_PHYSINV_HEAD,"TABLES PARAM
wa_matphysinv_head  LIKE LINE OF it_matphysinv_head ,
it_matphysinv_item  TYPE STANDARD TABLE OF BAPI_PHYSINV_ITEM,"TABLES PARAM
wa_matphysinv_item  LIKE LINE OF it_matphysinv_item .

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

"populate fields of struture and append to itab
append wa_plant_ra to it_plant_ra.

"populate fields of struture and append to itab
append wa_stge_loc_ra to it_stge_loc_ra.

"populate fields of struture and append to itab
append wa_phys_inv_no_ra to it_phys_inv_no_ra.

"populate fields of struture and append to itab
append wa_phys_inv_no_long_ra to it_phys_inv_no_long_ra.

"populate fields of struture and append to itab
append wa_physinventory_ra to it_physinventory_ra.

"populate fields of struture and append to itab
append wa_fiscalyear_ra to it_fiscalyear_ra.

"populate fields of struture and append to itab
append wa_plan_date_ra to it_plan_date_ra.

"populate fields of struture and append to itab
append wa_count_status_ra to it_count_status_ra.

"populate fields of struture and append to itab
append wa_adjust_status_ra to it_adjust_status_ra.

"populate fields of struture and append to itab
append wa_grouping_crit_ra to it_grouping_crit_ra.

"populate fields of struture and append to itab
append wa_material_ra to it_material_ra.

"populate fields of struture and append to itab
append wa_batch_ra to it_batch_ra.

"populate fields of struture and append to itab
append wa_return to it_return.

"populate fields of struture and append to itab
append wa_matphysinv_head to it_matphysinv_head.

"populate fields of struture and append to itab
append wa_matphysinv_item to it_matphysinv_item. . CALL FUNCTION 'GETLIST_GETITEMS' * EXPORTING * detailed = ld_detailed IMPORTING pe_t_ikpf_parameter_added_ehp2 = ld_pe_t_ikpf_parameter_added_ehp2 TABLES * plant_ra = it_plant_ra * stge_loc_ra = it_stge_loc_ra * phys_inv_no_ra = it_phys_inv_no_ra * phys_inv_no_long_ra = it_phys_inv_no_long_ra * physinventory_ra = it_physinventory_ra * fiscalyear_ra = it_fiscalyear_ra * plan_date_ra = it_plan_date_ra * count_status_ra = it_count_status_ra * adjust_status_ra = it_adjust_status_ra * grouping_crit_ra = it_grouping_crit_ra * material_ra = it_material_ra * batch_ra = it_batch_ra return = it_return matphysinv_head = it_matphysinv_head * matphysinv_item = it_matphysinv_item . " GETLIST_GETITEMS
IF SY-SUBRC EQ 0. "All OK 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_pe_t_ikpf_parameter_added_ehp2  TYPE TY_T_IKPF ,
ld_detailed  TYPE C ,
it_plant_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_PLANT_RA ,
wa_plant_ra  LIKE LINE OF it_plant_ra,
it_stge_loc_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_STGE_LOC_RA ,
wa_stge_loc_ra  LIKE LINE OF it_stge_loc_ra,
it_phys_inv_no_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_PH_INV_NO_RA ,
wa_phys_inv_no_ra  LIKE LINE OF it_phys_inv_no_ra,
it_phys_inv_no_long_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_PH_INV_NO_LONG_RA ,
wa_phys_inv_no_long_ra  LIKE LINE OF it_phys_inv_no_long_ra,
it_physinventory_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_DOC_RA ,
wa_physinventory_ra  LIKE LINE OF it_physinventory_ra,
it_fiscalyear_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_YEAR_RA ,
wa_fiscalyear_ra  LIKE LINE OF it_fiscalyear_ra,
it_plan_date_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_PLAN_DATE_RA ,
wa_plan_date_ra  LIKE LINE OF it_plan_date_ra,
it_count_status_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_COUNT_ST_RA ,
wa_count_status_ra  LIKE LINE OF it_count_status_ra,
it_adjust_status_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_ADJUST_ST_RA ,
wa_adjust_status_ra  LIKE LINE OF it_adjust_status_ra,
it_grouping_crit_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_GROUP_CRIT_RA ,
wa_grouping_crit_ra  LIKE LINE OF it_grouping_crit_ra,
it_material_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_MATERIAL_RA ,
wa_material_ra  LIKE LINE OF it_material_ra,
it_batch_ra  TYPE STANDARD TABLE OF BAPI_PHYSINV_BATCH_RA ,
wa_batch_ra  LIKE LINE OF it_batch_ra,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return,
it_matphysinv_head  TYPE STANDARD TABLE OF BAPI_PHYSINV_HEAD ,
wa_matphysinv_head  LIKE LINE OF it_matphysinv_head,
it_matphysinv_item  TYPE STANDARD TABLE OF BAPI_PHYSINV_ITEM ,
wa_matphysinv_item  LIKE LINE OF it_matphysinv_item.

ld_detailed = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_plant_ra to it_plant_ra.

"populate fields of struture and append to itab
append wa_stge_loc_ra to it_stge_loc_ra.

"populate fields of struture and append to itab
append wa_phys_inv_no_ra to it_phys_inv_no_ra.

"populate fields of struture and append to itab
append wa_phys_inv_no_long_ra to it_phys_inv_no_long_ra.

"populate fields of struture and append to itab
append wa_physinventory_ra to it_physinventory_ra.

"populate fields of struture and append to itab
append wa_fiscalyear_ra to it_fiscalyear_ra.

"populate fields of struture and append to itab
append wa_plan_date_ra to it_plan_date_ra.

"populate fields of struture and append to itab
append wa_count_status_ra to it_count_status_ra.

"populate fields of struture and append to itab
append wa_adjust_status_ra to it_adjust_status_ra.

"populate fields of struture and append to itab
append wa_grouping_crit_ra to it_grouping_crit_ra.

"populate fields of struture and append to itab
append wa_material_ra to it_material_ra.

"populate fields of struture and append to itab
append wa_batch_ra to it_batch_ra.

"populate fields of struture and append to itab
append wa_return to it_return.

"populate fields of struture and append to itab
append wa_matphysinv_head to it_matphysinv_head.

"populate fields of struture and append to itab
append wa_matphysinv_item to it_matphysinv_item.

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