SAP PCHEAD_REPLICATE Function Module for NOTRANSL: ALE-Ausgang PCHEAD: Daten replizieren









PCHEAD_REPLICATE is a standard pchead replicate SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: ALE-Ausgang PCHEAD: Daten replizieren 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 pchead replicate FM, simply by entering the name PCHEAD_REPLICATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: WPCA
Program Name: SAPLWPCA
Main Program: SAPLWPCA
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function PCHEAD_REPLICATE 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 'PCHEAD_REPLICATE'"NOTRANSL: ALE-Ausgang PCHEAD: Daten replizieren
EXPORTING
* CATALOGID = "Product Catalog to be Replicated
* REQUESTCHANGES = ' ' "Indicator, Replicate Modified Data Only
* CREATIONDATETO = "Final Date for the Selection of Change Pointers
* MAXAREAS = C_MAXAREAS "Maximum Number of Layout Areas per IDoc
* TESTRUN = ' ' "

TABLES
* VARIANTIDS = "Variants of CATALOGID to be Replicated
* RECIPIENTS = "Logical Receiving Systems for PCHEAD Data
* REPLICATEDCATALOGIDS = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* REPLICATEDCUSTOMERIDS = "
* REPLICATEDMATERIALIDS = "
* REPLICATEDAREAKEYS = "
* COMMUNICATIONDOCUMENTS = "Key of Created IDocs
* RETURN = "Return Values
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLWPCA_001 Function Exit for Product Catalog IDoc Outbound Message Type PCHEAD
EXIT_SAPLWPCA_002 Function Exit for Product Catalog IDoc Outbound Message Type PCITEMS
EXIT_SAPLWPCA_003 Function Exit for Product Catalog IDoc Inbound Message Type PCHEAD
EXIT_SAPLWPCA_004 Function Exit for Product Catalog IDoc Inbound Message Type PCITEMS

IMPORTING Parameters details for PCHEAD_REPLICATE

CATALOGID - Product Catalog to be Replicated

Data type: BAPIADMID-PRODCAT
Optional: Yes
Call by Reference: No ( called with pass by value option)

REQUESTCHANGES - Indicator, Replicate Modified Data Only

Data type: BAPIPCALEHLP-REQCHA
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CREATIONDATETO - Final Date for the Selection of Change Pointers

Data type: BAPIPCALEHLP-DATETO
Optional: Yes
Call by Reference: No ( called with pass by value option)

MAXAREAS - Maximum Number of Layout Areas per IDoc

Data type: BAPIPCALEHLP-MAXOBJ
Default: C_MAXAREAS
Optional: Yes
Call by Reference: No ( called with pass by value option)

TESTRUN -

Data type: BAPIPCALEHLP-CPTRNO
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for PCHEAD_REPLICATE

VARIANTIDS - Variants of CATALOGID to be Replicated

Data type: BAPIPCVARIANTID
Optional: Yes
Call by Reference: No ( called with pass by value option)

RECIPIENTS - Logical Receiving Systems for PCHEAD Data

Data type: BDI_LOGSYS
Optional: Yes
Call by Reference: No ( called with pass by value option)

REPLICATEDCATALOGIDS - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: BAPIADMID
Optional: Yes
Call by Reference: No ( called with pass by value option)

REPLICATEDCUSTOMERIDS -

Data type: BAPIPCCUSTOMERID
Optional: Yes
Call by Reference: No ( called with pass by value option)

REPLICATEDMATERIALIDS -

Data type: BAPIPCMATERIALID
Optional: Yes
Call by Reference: No ( called with pass by value option)

REPLICATEDAREAKEYS -

Data type: BAPIPCAREAKEY
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMUNICATIONDOCUMENTS - Key of Created IDocs

Data type: SWOTOBJID
Optional: Yes
Call by Reference: No ( called with pass by value option)

RETURN - Return Values

Data type: BAPIRET2
Optional: Yes
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for PCHEAD_REPLICATE 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_catalogid  TYPE BAPIADMID-PRODCAT, "   
lt_variantids  TYPE STANDARD TABLE OF BAPIPCVARIANTID, "   
lt_recipients  TYPE STANDARD TABLE OF BDI_LOGSYS, "   
lv_requestchanges  TYPE BAPIPCALEHLP-REQCHA, "   SPACE
lv_creationdateto  TYPE BAPIPCALEHLP-DATETO, "   
lt_replicatedcatalogids  TYPE STANDARD TABLE OF BAPIADMID, "   
lv_maxareas  TYPE BAPIPCALEHLP-MAXOBJ, "   C_MAXAREAS
lt_replicatedcustomerids  TYPE STANDARD TABLE OF BAPIPCCUSTOMERID, "   
lv_testrun  TYPE BAPIPCALEHLP-CPTRNO, "   SPACE
lt_replicatedmaterialids  TYPE STANDARD TABLE OF BAPIPCMATERIALID, "   
lt_replicatedareakeys  TYPE STANDARD TABLE OF BAPIPCAREAKEY, "   
lt_communicationdocuments  TYPE STANDARD TABLE OF SWOTOBJID, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2. "   

  CALL FUNCTION 'PCHEAD_REPLICATE'  "NOTRANSL: ALE-Ausgang PCHEAD: Daten replizieren
    EXPORTING
         CATALOGID = lv_catalogid
         REQUESTCHANGES = lv_requestchanges
         CREATIONDATETO = lv_creationdateto
         MAXAREAS = lv_maxareas
         TESTRUN = lv_testrun
    TABLES
         VARIANTIDS = lt_variantids
         RECIPIENTS = lt_recipients
         REPLICATEDCATALOGIDS = lt_replicatedcatalogids
         REPLICATEDCUSTOMERIDS = lt_replicatedcustomerids
         REPLICATEDMATERIALIDS = lt_replicatedmaterialids
         REPLICATEDAREAKEYS = lt_replicatedareakeys
         COMMUNICATIONDOCUMENTS = lt_communicationdocuments
         RETURN = lt_return
. " PCHEAD_REPLICATE




ABAP code using 7.40 inline data declarations to call FM PCHEAD_REPLICATE

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.

"SELECT single PRODCAT FROM BAPIADMID INTO @DATA(ld_catalogid).
 
 
 
"SELECT single REQCHA FROM BAPIPCALEHLP INTO @DATA(ld_requestchanges).
DATA(ld_requestchanges) = ' '.
 
"SELECT single DATETO FROM BAPIPCALEHLP INTO @DATA(ld_creationdateto).
 
 
"SELECT single MAXOBJ FROM BAPIPCALEHLP INTO @DATA(ld_maxareas).
DATA(ld_maxareas) = C_MAXAREAS.
 
 
"SELECT single CPTRNO FROM BAPIPCALEHLP INTO @DATA(ld_testrun).
DATA(ld_testrun) = ' '.
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!