SAP Function Modules

ECP_GEN_DOCUMENT_TO_OBJECT SAP Function module - Anzeige Objektverknüpfungen->Originale zum Objekt







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

Associated Function Group: ECP_ESERVICE1
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM ECP_GEN_DOCUMENT_TO_OBJECT - ECP GEN DOCUMENT TO OBJECT





CALL FUNCTION 'ECP_GEN_DOCUMENT_TO_OBJECT' "Anzeige Objektverknüpfungen->Originale zum Objekt
* EXPORTING
*   pfx_objky =                 " drad-objky
*   pfx_object =                " drad-dokob
*   psx_drad_extern =           " drad_bi
*   portaluser =                " sy-uname      SAP System, user logon name
  IMPORTING
    pfx_number_of_hits =        " sy-tabix
  TABLES
    ptx_content =               " plm_dms_content
    ptx_id_docs =               " plm_dms_id
  EXCEPTIONS
    API_ERROR = 1               "
    .  "  ECP_GEN_DOCUMENT_TO_OBJECT

ABAP code example for Function Module ECP_GEN_DOCUMENT_TO_OBJECT





The ABAP code below is a full code listing to execute function module ECP_GEN_DOCUMENT_TO_OBJECT 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_pfx_number_of_hits  TYPE SY-TABIX ,
it_ptx_content  TYPE STANDARD TABLE OF PLM_DMS_CONTENT,"TABLES PARAM
wa_ptx_content  LIKE LINE OF it_ptx_content ,
it_ptx_id_docs  TYPE STANDARD TABLE OF PLM_DMS_ID,"TABLES PARAM
wa_ptx_id_docs  LIKE LINE OF it_ptx_id_docs .


SELECT single OBJKY
FROM DRAD
INTO @DATA(ld_pfx_objky).


SELECT single DOKOB
FROM DRAD
INTO @DATA(ld_pfx_object).

DATA(ld_psx_drad_extern) = 'Check type of data required'.
DATA(ld_portaluser) = 'some text here'.

"populate fields of struture and append to itab
append wa_ptx_content to it_ptx_content.

"populate fields of struture and append to itab
append wa_ptx_id_docs to it_ptx_id_docs. . CALL FUNCTION 'ECP_GEN_DOCUMENT_TO_OBJECT' * EXPORTING * pfx_objky = ld_pfx_objky * pfx_object = ld_pfx_object * psx_drad_extern = ld_psx_drad_extern * portaluser = ld_portaluser IMPORTING pfx_number_of_hits = ld_pfx_number_of_hits TABLES ptx_content = it_ptx_content ptx_id_docs = it_ptx_id_docs EXCEPTIONS API_ERROR = 1 . " ECP_GEN_DOCUMENT_TO_OBJECT
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_pfx_number_of_hits  TYPE SY-TABIX ,
ld_pfx_objky  TYPE DRAD-OBJKY ,
it_ptx_content  TYPE STANDARD TABLE OF PLM_DMS_CONTENT ,
wa_ptx_content  LIKE LINE OF it_ptx_content,
ld_pfx_object  TYPE DRAD-DOKOB ,
it_ptx_id_docs  TYPE STANDARD TABLE OF PLM_DMS_ID ,
wa_ptx_id_docs  LIKE LINE OF it_ptx_id_docs,
ld_psx_drad_extern  TYPE DRAD_BI ,
ld_portaluser  TYPE SY-UNAME .


SELECT single OBJKY
FROM DRAD
INTO ld_pfx_objky.


"populate fields of struture and append to itab
append wa_ptx_content to it_ptx_content.

SELECT single DOKOB
FROM DRAD
INTO ld_pfx_object.


"populate fields of struture and append to itab
append wa_ptx_id_docs to it_ptx_id_docs.
ld_psx_drad_extern = 'some text here'.
ld_portaluser = 'some text here'.

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