COM_PRODUCT_GETLIST2 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 COM_PRODUCT_GETLIST2 into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
COM_PRODUCT_GETLIST
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'COM_PRODUCT_GETLIST2' "
* EXPORTING
* iv_max_rows = 250 " bapimaxrow
* it_product_type_range = " comt_product_type_range_tab
* it_product_id_range = " comt_product_id_range_tab
* it_prshtext_range = " comt_prshtext_range_tab
* iv_langu = SY-LANGU " spras
* it_product_config_range = " comt_product_config_range_tab
* it_competitor_range = " comt_product_compet_range_tab
* it_batch_dedic_range = " comt_pr_batch_dedic_range_tab
* it_logsys_range = " comt_product_logsys_range_tab
* it_category_range = " comt_pr_category_range_tab
* it_hierarchy_range = " comt_hierarchy_id_range_tab
* it_category_guid_range = " comt_category_guid_range_tab
* iv_category_subtree = SPACE " comt_boolean Logical Variable
* iv_read_locked_too = SPACE " comt_boolean Logical Variable
* iv_format_output = 'X' " comt_boolean Logical Variable
* ir_scenario = " cl_com_prsearchscenario_base
IMPORTING
et_product = " comt_product_selection_tab
EXCEPTIONS
NOT_FOUND = 1 "
WRONG_CALL = 2 "
. " COM_PRODUCT_GETLIST2
The ABAP code below is a full code listing to execute function module COM_PRODUCT_GETLIST2 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).
| ld_et_product | TYPE COMT_PRODUCT_SELECTION_TAB . |
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_et_product | TYPE COMT_PRODUCT_SELECTION_TAB , |
| ld_iv_max_rows | TYPE BAPIMAXROW , |
| ld_it_product_type_range | TYPE COMT_PRODUCT_TYPE_RANGE_TAB , |
| ld_it_product_id_range | TYPE COMT_PRODUCT_ID_RANGE_TAB , |
| ld_it_prshtext_range | TYPE COMT_PRSHTEXT_RANGE_TAB , |
| ld_iv_langu | TYPE SPRAS , |
| ld_it_product_config_range | TYPE COMT_PRODUCT_CONFIG_RANGE_TAB , |
| ld_it_competitor_range | TYPE COMT_PRODUCT_COMPET_RANGE_TAB , |
| ld_it_batch_dedic_range | TYPE COMT_PR_BATCH_DEDIC_RANGE_TAB , |
| ld_it_logsys_range | TYPE COMT_PRODUCT_LOGSYS_RANGE_TAB , |
| ld_it_category_range | TYPE COMT_PR_CATEGORY_RANGE_TAB , |
| ld_it_hierarchy_range | TYPE COMT_HIERARCHY_ID_RANGE_TAB , |
| ld_it_category_guid_range | TYPE COMT_CATEGORY_GUID_RANGE_TAB , |
| ld_iv_category_subtree | TYPE COMT_BOOLEAN , |
| ld_iv_read_locked_too | TYPE COMT_BOOLEAN , |
| ld_iv_format_output | TYPE COMT_BOOLEAN , |
| ld_ir_scenario | TYPE CL_COM_PRSEARCHSCENARIO_BASE . |
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 COM_PRODUCT_GETLIST2 or its description.