SAP EHPRC_CP_DD01_TYPE Function Module for CP: Data determination function for ProductDetail@type
EHPRC_CP_DD01_TYPE is a standard ehprc cp dd01 type SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for CP: Data determination function for ProductDetail@type 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 ehprc cp dd01 type FM, simply by entering the name EHPRC_CP_DD01_TYPE into the relevant SAP transaction such as SE37 or SE38.
Function Group: EHPRC_CP_DD01
Program Name: SAPLEHPRC_CP_DD01
Main Program: SAPLEHPRC_CP_DD01
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function EHPRC_CP_DD01_TYPE 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 'EHPRC_CP_DD01_TYPE'"CP: Data determination function for ProductDetail@type.
EXPORTING
IS_DATA = "CP: Structure for XML generation data
I_PRODUCT_CAT = "Productcategory
I_FLG_LOCK = "Truth Value
I_XML_GENERATOR = "CP: CfPXML handler
IMPORTING
ET_VALUES = "Values table
ET_ADDED_NODES = "Nodes added during XML generation
E_FLG_ERROR = "Error flag
ET_MESSAGES = "Table with messages
E_FLG_LONGTEXT = "Long text flag
ET_LONGTEXT = "Long texts table
EXCEPTIONS
INTERNAL_ERROR = 1
IMPORTING Parameters details for EHPRC_CP_DD01_TYPE
IS_DATA - CP: Structure for XML generation data
Data type: EHPRCS_XML_DATAOptional: No
Call by Reference: Yes
I_PRODUCT_CAT - Productcategory
Data type: EHPRC_PRODUCTCATOptional: No
Call by Reference: No ( called with pass by value option)
I_FLG_LOCK - Truth Value
Data type: ESEBOOLEOptional: No
Call by Reference: No ( called with pass by value option)
I_XML_GENERATOR - CP: CfPXML handler
Data type: CL_EHPRC_CFPXMLOptional: No
Call by Reference: Yes
EXPORTING Parameters details for EHPRC_CP_DD01_TYPE
ET_VALUES - Values table
Data type: EHPRCT_NODE_VALUESOptional: No
Call by Reference: Yes
ET_ADDED_NODES - Nodes added during XML generation
Data type: EHPRCT_ADDED_NODESOptional: No
Call by Reference: Yes
E_FLG_ERROR - Error flag
Data type: ESEBOOLEOptional: No
Call by Reference: Yes
ET_MESSAGES - Table with messages
Data type: BAL_T_MSGOptional: No
Call by Reference: Yes
E_FLG_LONGTEXT - Long text flag
Data type: ESEBOOLEOptional: No
Call by Reference: Yes
ET_LONGTEXT - Long texts table
Data type: EHPRCT_LONGTEXTOptional: No
Call by Reference: Yes
EXCEPTIONS details
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EHPRC_CP_DD01_TYPE 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_is_data | TYPE EHPRCS_XML_DATA, " | |||
| lv_et_values | TYPE EHPRCT_NODE_VALUES, " | |||
| lv_internal_error | TYPE EHPRCT_NODE_VALUES, " | |||
| lv_i_product_cat | TYPE EHPRC_PRODUCTCAT, " | |||
| lv_et_added_nodes | TYPE EHPRCT_ADDED_NODES, " | |||
| lv_i_flg_lock | TYPE ESEBOOLE, " | |||
| lv_e_flg_error | TYPE ESEBOOLE, " | |||
| lv_et_messages | TYPE BAL_T_MSG, " | |||
| lv_i_xml_generator | TYPE CL_EHPRC_CFPXML, " | |||
| lv_e_flg_longtext | TYPE ESEBOOLE, " | |||
| lv_et_longtext | TYPE EHPRCT_LONGTEXT. " |
|   CALL FUNCTION 'EHPRC_CP_DD01_TYPE' "CP: Data determination function for ProductDetail@type |
| EXPORTING | ||
| IS_DATA | = lv_is_data | |
| I_PRODUCT_CAT | = lv_i_product_cat | |
| I_FLG_LOCK | = lv_i_flg_lock | |
| I_XML_GENERATOR | = lv_i_xml_generator | |
| IMPORTING | ||
| ET_VALUES | = lv_et_values | |
| ET_ADDED_NODES | = lv_et_added_nodes | |
| E_FLG_ERROR | = lv_e_flg_error | |
| ET_MESSAGES | = lv_et_messages | |
| E_FLG_LONGTEXT | = lv_e_flg_longtext | |
| ET_LONGTEXT | = lv_et_longtext | |
| EXCEPTIONS | ||
| INTERNAL_ERROR = 1 | ||
| . " EHPRC_CP_DD01_TYPE | ||
ABAP code using 7.40 inline data declarations to call FM EHPRC_CP_DD01_TYPE
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