SAP Function Modules

EHPRC_DOC_CI SAP Function module - Provides compliance document for released requirements by obj id







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

Associated Function Group: EHPRC_COMPLIANCE_INFO_API
Released Date: 01.06.2012
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM EHPRC_DOC_CI - EHPRC DOC CI





CALL FUNCTION 'EHPRC_DOC_CI' "Provides compliance document for released requirements by obj id
  EXPORTING
*   iv_mat_id =                 " ehfnd_mat_id  Material Id for which compliance data will be retrieved
*   iv_sub_id =                 " esesubid      Specification
*   is_doknr =                  " ehprcs_doc_number  Document number attributes structure
*   iv_supplier_id =            " ehfnd_supplier_id  Supplier
    iv_language = SY-LANGU      " sy-langu      Language
  IMPORTING
    et_requirements_doc_info =   " ehprct_compl_inf_req_doc  Requirement revision document info
    es_co_doc_info =            " ehprcs_compl_inf_cdo_doc  Compliance object document infonce info service api
  EXCEPTIONS
    PROCESSING_ERROR = 1        "               Error while retrieving compliance information
    MULTIPLE_COMPL_OBJECTS_FOUND = 2  "         Multiple compliance objects found for given compliance object id
    NO_COMPLIANCE_OBJECT_FOUND = 3  "           No compliance object found for the given id
    .  "  EHPRC_DOC_CI

ABAP code example for Function Module EHPRC_DOC_CI





The ABAP code below is a full code listing to execute function module EHPRC_DOC_CI 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_requirements_doc_info  TYPE EHPRCT_COMPL_INF_REQ_DOC ,
ld_es_co_doc_info  TYPE EHPRCS_COMPL_INF_CDO_DOC .

DATA(ld_iv_mat_id) = 'Check type of data required'.
DATA(ld_iv_sub_id) = 'Check type of data required'.
DATA(ld_is_doknr) = 'Check type of data required'.
DATA(ld_iv_supplier_id) = 'Check type of data required'.
DATA(ld_iv_language) = 'Check type of data required'. . CALL FUNCTION 'EHPRC_DOC_CI' EXPORTING * iv_mat_id = ld_iv_mat_id * iv_sub_id = ld_iv_sub_id * is_doknr = ld_is_doknr * iv_supplier_id = ld_iv_supplier_id iv_language = ld_iv_language IMPORTING et_requirements_doc_info = ld_et_requirements_doc_info es_co_doc_info = ld_es_co_doc_info EXCEPTIONS PROCESSING_ERROR = 1 MULTIPLE_COMPL_OBJECTS_FOUND = 2 NO_COMPLIANCE_OBJECT_FOUND = 3 . " EHPRC_DOC_CI
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "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_requirements_doc_info  TYPE EHPRCT_COMPL_INF_REQ_DOC ,
ld_iv_mat_id  TYPE EHFND_MAT_ID ,
ld_es_co_doc_info  TYPE EHPRCS_COMPL_INF_CDO_DOC ,
ld_iv_sub_id  TYPE ESESUBID ,
ld_is_doknr  TYPE EHPRCS_DOC_NUMBER ,
ld_iv_supplier_id  TYPE EHFND_SUPPLIER_ID ,
ld_iv_language  TYPE SY-LANGU .

ld_iv_mat_id = 'Check type of data required'.
ld_iv_sub_id = 'Check type of data required'.
ld_is_doknr = 'Check type of data required'.
ld_iv_supplier_id = 'Check type of data required'.
ld_iv_language = 'Check type of data required'.

SAP Documentation for FM EHPRC_DOC_CI


This function module provides the user with information about the documents attached to a compliance object and its requirement revisions. ...See here for full SAP fm documentation

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