SAP COM_CFG_READ_ALL_PROD_VARIANTS Function Module for read product variants of kmat
COM_CFG_READ_ALL_PROD_VARIANTS is a standard com cfg read all prod variants SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for read product variants of kmat 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 com cfg read all prod variants FM, simply by entering the name COM_CFG_READ_ALL_PROD_VARIANTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: COM_CFG_PVAR
Program Name: SAPLCOM_CFG_PVAR
Main Program: SAPLCOM_CFG_PVAR
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function COM_CFG_READ_ALL_PROD_VARIANTS 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 'COM_CFG_READ_ALL_PROD_VARIANTS'"read product variants of kmat.
EXPORTING
PRODUCT_ID = "Product Id
PRODUCT_TYPE = "Product Type
PRODUCT_LOGSYS = "Logical System
TABLES
ET_PV_CFG = "main data of external configuration
ET_PV_INS = "instances of external configuration (with product id)
ET_PV_VAL = "cstic values of external config (with product id)
ET_PV_VC = "variant conditions of external configuration (product id)
IMPORTING Parameters details for COM_CFG_READ_ALL_PROD_VARIANTS
PRODUCT_ID - Product Id
Data type: COMT_CFGD_PRODUCT_IDOptional: No
Call by Reference: No ( called with pass by value option)
PRODUCT_TYPE - Product Type
Data type: COMT_CFGD_PRODUCT_TYPEOptional: No
Call by Reference: No ( called with pass by value option)
PRODUCT_LOGSYS - Logical System
Data type: COMT_CFGD_KBLOGSYSOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for COM_CFG_READ_ALL_PROD_VARIANTS
ET_PV_CFG - main data of external configuration
Data type: COMT_PV_IIFCFGOptional: No
Call by Reference: Yes
ET_PV_INS - instances of external configuration (with product id)
Data type: COMT_PV_IIFINSOptional: No
Call by Reference: Yes
ET_PV_VAL - cstic values of external config (with product id)
Data type: COMT_PV_IIFVALOptional: No
Call by Reference: Yes
ET_PV_VC - variant conditions of external configuration (product id)
Data type: COMT_PV_IIFVCOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for COM_CFG_READ_ALL_PROD_VARIANTS 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: | ||||
lt_et_pv_cfg | TYPE STANDARD TABLE OF COMT_PV_IIFCFG, " | |||
lv_product_id | TYPE COMT_CFGD_PRODUCT_ID, " | |||
lt_et_pv_ins | TYPE STANDARD TABLE OF COMT_PV_IIFINS, " | |||
lv_product_type | TYPE COMT_CFGD_PRODUCT_TYPE, " | |||
lt_et_pv_val | TYPE STANDARD TABLE OF COMT_PV_IIFVAL, " | |||
lv_product_logsys | TYPE COMT_CFGD_KBLOGSYS, " | |||
lt_et_pv_vc | TYPE STANDARD TABLE OF COMT_PV_IIFVC. " |
  CALL FUNCTION 'COM_CFG_READ_ALL_PROD_VARIANTS' "read product variants of kmat |
EXPORTING | ||
PRODUCT_ID | = lv_product_id | |
PRODUCT_TYPE | = lv_product_type | |
PRODUCT_LOGSYS | = lv_product_logsys | |
TABLES | ||
ET_PV_CFG | = lt_et_pv_cfg | |
ET_PV_INS | = lt_et_pv_ins | |
ET_PV_VAL | = lt_et_pv_val | |
ET_PV_VC | = lt_et_pv_vc | |
. " COM_CFG_READ_ALL_PROD_VARIANTS |
ABAP code using 7.40 inline data declarations to call FM COM_CFG_READ_ALL_PROD_VARIANTS
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.Search for further information about these or an SAP related objects