SAP Function Modules

PCITEMS_REPLICATE SAP Function module







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

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


Pattern for FM PCITEMS_REPLICATE - PCITEMS REPLICATE





CALL FUNCTION 'PCITEMS_REPLICATE' "
* EXPORTING
*   catalogid =                 " bapiadmid-prodcat
*   requestcomplete = SPACE     " bapipcalehlp-reqcom
*   requestchanges = SPACE      " bapipcalehlp-reqcha
*   creationdateto =            " bapipcalehlp-dateto
*   maxitems = C_MAXITEMS       " bapipcalehlp-maxobj
*   testrun = SPACE             " bapipcalehlp-cptrno
  TABLES
*   variantids =                " bapipcvariantid
*   areaids =                   " bapipcareaid
*   itemids =                   " bapipcitemid
*   recipients =                " bdi_logsys
*   replicatedcatalogids =      " bapiadmid
*   replicateditemkeys =        " bapipcitemkey
*   replicatedmaterialids =     " bapipcmaterialid
*   communicationdocuments =    " swotobjid
    return =                    " bapiret2
    .  "  PCITEMS_REPLICATE

ABAP code example for Function Module PCITEMS_REPLICATE





The ABAP code below is a full code listing to execute function module PCITEMS_REPLICATE 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:
it_variantids  TYPE STANDARD TABLE OF BAPIPCVARIANTID,"TABLES PARAM
wa_variantids  LIKE LINE OF it_variantids ,
it_areaids  TYPE STANDARD TABLE OF BAPIPCAREAID,"TABLES PARAM
wa_areaids  LIKE LINE OF it_areaids ,
it_itemids  TYPE STANDARD TABLE OF BAPIPCITEMID,"TABLES PARAM
wa_itemids  LIKE LINE OF it_itemids ,
it_recipients  TYPE STANDARD TABLE OF BDI_LOGSYS,"TABLES PARAM
wa_recipients  LIKE LINE OF it_recipients ,
it_replicatedcatalogids  TYPE STANDARD TABLE OF BAPIADMID,"TABLES PARAM
wa_replicatedcatalogids  LIKE LINE OF it_replicatedcatalogids ,
it_replicateditemkeys  TYPE STANDARD TABLE OF BAPIPCITEMKEY,"TABLES PARAM
wa_replicateditemkeys  LIKE LINE OF it_replicateditemkeys ,
it_replicatedmaterialids  TYPE STANDARD TABLE OF BAPIPCMATERIALID,"TABLES PARAM
wa_replicatedmaterialids  LIKE LINE OF it_replicatedmaterialids ,
it_communicationdocuments  TYPE STANDARD TABLE OF SWOTOBJID,"TABLES PARAM
wa_communicationdocuments  LIKE LINE OF it_communicationdocuments ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return .


DATA(ld_catalogid) = some text here

DATA(ld_requestcomplete) = some text here

DATA(ld_requestchanges) = some text here

DATA(ld_creationdateto) = 20210129

DATA(ld_maxitems) = Check type of data required

DATA(ld_testrun) = some text here

"populate fields of struture and append to itab
append wa_variantids to it_variantids.

"populate fields of struture and append to itab
append wa_areaids to it_areaids.

"populate fields of struture and append to itab
append wa_itemids to it_itemids.

"populate fields of struture and append to itab
append wa_recipients to it_recipients.

"populate fields of struture and append to itab
append wa_replicatedcatalogids to it_replicatedcatalogids.

"populate fields of struture and append to itab
append wa_replicateditemkeys to it_replicateditemkeys.

"populate fields of struture and append to itab
append wa_replicatedmaterialids to it_replicatedmaterialids.

"populate fields of struture and append to itab
append wa_communicationdocuments to it_communicationdocuments.

"populate fields of struture and append to itab
append wa_return to it_return. . CALL FUNCTION 'PCITEMS_REPLICATE' * EXPORTING * catalogid = ld_catalogid * requestcomplete = ld_requestcomplete * requestchanges = ld_requestchanges * creationdateto = ld_creationdateto * maxitems = ld_maxitems * testrun = ld_testrun TABLES * variantids = it_variantids * areaids = it_areaids * itemids = it_itemids * recipients = it_recipients * replicatedcatalogids = it_replicatedcatalogids * replicateditemkeys = it_replicateditemkeys * replicatedmaterialids = it_replicatedmaterialids * communicationdocuments = it_communicationdocuments return = it_return . " PCITEMS_REPLICATE
IF SY-SUBRC EQ 0. "All OK 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_catalogid  TYPE BAPIADMID-PRODCAT ,
it_variantids  TYPE STANDARD TABLE OF BAPIPCVARIANTID ,
wa_variantids  LIKE LINE OF it_variantids,
ld_requestcomplete  TYPE BAPIPCALEHLP-REQCOM ,
it_areaids  TYPE STANDARD TABLE OF BAPIPCAREAID ,
wa_areaids  LIKE LINE OF it_areaids,
ld_requestchanges  TYPE BAPIPCALEHLP-REQCHA ,
it_itemids  TYPE STANDARD TABLE OF BAPIPCITEMID ,
wa_itemids  LIKE LINE OF it_itemids,
ld_creationdateto  TYPE BAPIPCALEHLP-DATETO ,
it_recipients  TYPE STANDARD TABLE OF BDI_LOGSYS ,
wa_recipients  LIKE LINE OF it_recipients,
ld_maxitems  TYPE BAPIPCALEHLP-MAXOBJ ,
it_replicatedcatalogids  TYPE STANDARD TABLE OF BAPIADMID ,
wa_replicatedcatalogids  LIKE LINE OF it_replicatedcatalogids,
ld_testrun  TYPE BAPIPCALEHLP-CPTRNO ,
it_replicateditemkeys  TYPE STANDARD TABLE OF BAPIPCITEMKEY ,
wa_replicateditemkeys  LIKE LINE OF it_replicateditemkeys,
it_replicatedmaterialids  TYPE STANDARD TABLE OF BAPIPCMATERIALID ,
wa_replicatedmaterialids  LIKE LINE OF it_replicatedmaterialids,
it_communicationdocuments  TYPE STANDARD TABLE OF SWOTOBJID ,
wa_communicationdocuments  LIKE LINE OF it_communicationdocuments,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return.


ld_catalogid = some text here

"populate fields of struture and append to itab
append wa_variantids to it_variantids.

ld_requestcomplete = some text here

"populate fields of struture and append to itab
append wa_areaids to it_areaids.

ld_requestchanges = some text here

"populate fields of struture and append to itab
append wa_itemids to it_itemids.

ld_creationdateto = 20210129

"populate fields of struture and append to itab
append wa_recipients to it_recipients.

ld_maxitems = Check type of data required

"populate fields of struture and append to itab
append wa_replicatedcatalogids to it_replicatedcatalogids.

ld_testrun = some text here

"populate fields of struture and append to itab
append wa_replicateditemkeys to it_replicateditemkeys.

"populate fields of struture and append to itab
append wa_replicatedmaterialids to it_replicatedmaterialids.

"populate fields of struture and append to itab
append wa_communicationdocuments to it_communicationdocuments.

"populate fields of struture and append to itab
append wa_return to it_return.

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