SAP COM_PRODUCT_CATEGORY_F4 Function Module for









COM_PRODUCT_CATEGORY_F4 is a standard com product category f4 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 product category f4 FM, simply by entering the name COM_PRODUCT_CATEGORY_F4 into the relevant SAP transaction such as SE37 or SE38.

Function Group: COM_PRODUCT_CATEGORY_F4
Program Name: SAPLCOM_PRODUCT_CATEGORY_F4
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function COM_PRODUCT_CATEGORY_F4 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_PRODUCT_CATEGORY_F4'"
EXPORTING
* IV_PRODUCT_TYPE = "
* IV_DYNPFIELD_CATTEXT = ' ' "
* IV_DROPDOWN_LISTBOX = ' ' "
* IV_DISPLAY = ' ' "Display Only
IV_HIERARCHY_GUID = "
* IV_SHOW_POPUP = 'X' "
* IV_DYNPPROG = ' ' "ABAP Program: Current Main Program
* IV_DYNPNR = ' ' "ABAP Program: Number of Current Screen
* IV_DYNPROFIELD = ' ' "Field Name
* IV_STEPL = 0 "Screens, current table line index
* IV_DYNPFIELD_CATGUID = ' ' "
* IV_DYNPFIELD_CATID = ' ' "

IMPORTING
EV_CATEGORY_ID = "Category ID
EV_LOGSYS = "System in Which the Set Was Created
EV_CATEGORY_GUID = "
ET_VALUE = "
.



IMPORTING Parameters details for COM_PRODUCT_CATEGORY_F4

IV_PRODUCT_TYPE -

Data type: COMT_PRODUCT_TYPE
Optional: Yes
Call by Reference: Yes

IV_DYNPFIELD_CATTEXT -

Data type: DYNFNAM
Default: SPACE
Optional: Yes
Call by Reference: Yes

IV_DROPDOWN_LISTBOX -

Data type: COMT_BOOLEAN
Default: SPACE
Optional: Yes
Call by Reference: Yes

IV_DISPLAY - Display Only

Data type: COMT_BOOLEAN
Default: SPACE
Optional: Yes
Call by Reference: Yes

IV_HIERARCHY_GUID -

Data type: COMT_HIERARCHY_GUID
Optional: No
Call by Reference: Yes

IV_SHOW_POPUP -

Data type: COMT_BOOLEAN
Default: 'X'
Optional: Yes
Call by Reference: Yes

IV_DYNPPROG - ABAP Program: Current Main Program

Data type: SY-REPID
Default: SPACE
Optional: Yes
Call by Reference: Yes

IV_DYNPNR - ABAP Program: Number of Current Screen

Data type: SY-DYNNR
Default: SPACE
Optional: Yes
Call by Reference: Yes

IV_DYNPROFIELD - Field Name

Data type: HELP_INFO-DYNPROFLD
Default: SPACE
Optional: Yes
Call by Reference: Yes

IV_STEPL - Screens, current table line index

Data type: SY-STEPL
Optional: Yes
Call by Reference: Yes

IV_DYNPFIELD_CATGUID -

Data type: DYNFNAM
Default: SPACE
Optional: Yes
Call by Reference: Yes

IV_DYNPFIELD_CATID -

Data type: DYNFNAM
Default: SPACE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for COM_PRODUCT_CATEGORY_F4

EV_CATEGORY_ID - Category ID

Data type: COMT_CATEGORY_ID
Optional: No
Call by Reference: Yes

EV_LOGSYS - System in Which the Set Was Created

Data type: COMT_LOGSYS
Optional: No
Call by Reference: Yes

EV_CATEGORY_GUID -

Data type: COMT_CATEGORY_GUID
Optional: No
Call by Reference: Yes

ET_VALUE -

Data type: COML_PROD_CAT_REL_F4_TAB
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for COM_PRODUCT_CATEGORY_F4 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:
lv_ev_category_id  TYPE COMT_CATEGORY_ID, "   
lv_iv_product_type  TYPE COMT_PRODUCT_TYPE, "   
lv_iv_dynpfield_cattext  TYPE DYNFNAM, "   SPACE
lv_iv_dropdown_listbox  TYPE COMT_BOOLEAN, "   SPACE
lv_iv_display  TYPE COMT_BOOLEAN, "   SPACE
lv_ev_logsys  TYPE COMT_LOGSYS, "   
lv_iv_hierarchy_guid  TYPE COMT_HIERARCHY_GUID, "   
lv_iv_show_popup  TYPE COMT_BOOLEAN, "   'X'
lv_ev_category_guid  TYPE COMT_CATEGORY_GUID, "   
lv_et_value  TYPE COML_PROD_CAT_REL_F4_TAB, "   
lv_iv_dynpprog  TYPE SY-REPID, "   SPACE
lv_iv_dynpnr  TYPE SY-DYNNR, "   SPACE
lv_iv_dynprofield  TYPE HELP_INFO-DYNPROFLD, "   SPACE
lv_iv_stepl  TYPE SY-STEPL, "   0
lv_iv_dynpfield_catguid  TYPE DYNFNAM, "   SPACE
lv_iv_dynpfield_catid  TYPE DYNFNAM. "   SPACE

  CALL FUNCTION 'COM_PRODUCT_CATEGORY_F4'  "
    EXPORTING
         IV_PRODUCT_TYPE = lv_iv_product_type
         IV_DYNPFIELD_CATTEXT = lv_iv_dynpfield_cattext
         IV_DROPDOWN_LISTBOX = lv_iv_dropdown_listbox
         IV_DISPLAY = lv_iv_display
         IV_HIERARCHY_GUID = lv_iv_hierarchy_guid
         IV_SHOW_POPUP = lv_iv_show_popup
         IV_DYNPPROG = lv_iv_dynpprog
         IV_DYNPNR = lv_iv_dynpnr
         IV_DYNPROFIELD = lv_iv_dynprofield
         IV_STEPL = lv_iv_stepl
         IV_DYNPFIELD_CATGUID = lv_iv_dynpfield_catguid
         IV_DYNPFIELD_CATID = lv_iv_dynpfield_catid
    IMPORTING
         EV_CATEGORY_ID = lv_ev_category_id
         EV_LOGSYS = lv_ev_logsys
         EV_CATEGORY_GUID = lv_ev_category_guid
         ET_VALUE = lv_et_value
. " COM_PRODUCT_CATEGORY_F4




ABAP code using 7.40 inline data declarations to call FM COM_PRODUCT_CATEGORY_F4

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.

 
 
DATA(ld_iv_dynpfield_cattext) = ' '.
 
DATA(ld_iv_dropdown_listbox) = ' '.
 
DATA(ld_iv_display) = ' '.
 
 
 
DATA(ld_iv_show_popup) = 'X'.
 
 
 
"SELECT single REPID FROM SY INTO @DATA(ld_iv_dynpprog).
DATA(ld_iv_dynpprog) = ' '.
 
"SELECT single DYNNR FROM SY INTO @DATA(ld_iv_dynpnr).
DATA(ld_iv_dynpnr) = ' '.
 
"SELECT single DYNPROFLD FROM HELP_INFO INTO @DATA(ld_iv_dynprofield).
DATA(ld_iv_dynprofield) = ' '.
 
"SELECT single STEPL FROM SY INTO @DATA(ld_iv_stepl).
 
DATA(ld_iv_dynpfield_catguid) = ' '.
 
DATA(ld_iv_dynpfield_catid) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!