SAP Function Modules

EHPRC_CP_DD01_PROD_STRU_PV_S SAP Function module - CP: Data determination function template







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

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


Pattern for FM EHPRC_CP_DD01_PROD_STRU_PV_S - EHPRC CP DD01 PROD STRU PV S





CALL FUNCTION 'EHPRC_CP_DD01_PROD_STRU_PV_S' "CP: Data determination function template
  EXPORTING
    is_data =                   " ehprcs_xml_data  CP: Structure for XML generation data
    i_product_cat =             " ehprc_productcat  Productcategory
    i_flg_lock =                " eseboole      Truth Value
    i_xml_generator =           " cl_ehprc_cfpxml  CP: CfPXML handler
  IMPORTING
    et_values =                 " ehprct_node_values  Values table
    et_added_nodes =            " ehprct_added_nodes  Nodes added during XML generation
    e_flg_error =               " eseboole      Error flag
    et_messages =               " bal_t_msg     Table with messages
    e_flg_longtext =            " eseboole      Long text flag
    et_longtext =               " ehprct_longtext  Long texts table
  EXCEPTIONS
    INTERNAL_ERROR = 1          "
    .  "  EHPRC_CP_DD01_PROD_STRU_PV_S

ABAP code example for Function Module EHPRC_CP_DD01_PROD_STRU_PV_S





The ABAP code below is a full code listing to execute function module EHPRC_CP_DD01_PROD_STRU_PV_S 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_et_values  TYPE EHPRCT_NODE_VALUES ,
ld_et_added_nodes  TYPE EHPRCT_ADDED_NODES ,
ld_e_flg_error  TYPE ESEBOOLE ,
ld_et_messages  TYPE BAL_T_MSG ,
ld_e_flg_longtext  TYPE ESEBOOLE ,
ld_et_longtext  TYPE EHPRCT_LONGTEXT .

DATA(ld_is_data) = 'Check type of data required'.
DATA(ld_i_product_cat) = 'Check type of data required'.
DATA(ld_i_flg_lock) = 'Check type of data required'.
DATA(ld_i_xml_generator) = 'Check type of data required'. . CALL FUNCTION 'EHPRC_CP_DD01_PROD_STRU_PV_S' EXPORTING is_data = ld_is_data i_product_cat = ld_i_product_cat i_flg_lock = ld_i_flg_lock i_xml_generator = ld_i_xml_generator IMPORTING et_values = ld_et_values et_added_nodes = ld_et_added_nodes e_flg_error = ld_e_flg_error et_messages = ld_et_messages e_flg_longtext = ld_e_flg_longtext et_longtext = ld_et_longtext EXCEPTIONS INTERNAL_ERROR = 1 . " EHPRC_CP_DD01_PROD_STRU_PV_S
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here 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_et_values  TYPE EHPRCT_NODE_VALUES ,
ld_is_data  TYPE EHPRCS_XML_DATA ,
ld_et_added_nodes  TYPE EHPRCT_ADDED_NODES ,
ld_i_product_cat  TYPE EHPRC_PRODUCTCAT ,
ld_e_flg_error  TYPE ESEBOOLE ,
ld_i_flg_lock  TYPE ESEBOOLE ,
ld_et_messages  TYPE BAL_T_MSG ,
ld_i_xml_generator  TYPE CL_EHPRC_CFPXML ,
ld_e_flg_longtext  TYPE ESEBOOLE ,
ld_et_longtext  TYPE EHPRCT_LONGTEXT .

ld_is_data = 'Check type of data required'.
ld_i_product_cat = 'Check type of data required'.
ld_i_flg_lock = 'Check type of data required'.
ld_i_xml_generator = 'Check type of data required'.

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