This chapter describes the necessary settings in QPPD Customizing as well as in the SAP standard so that QPPD objects with extended data structures can be distributed between two systems using IDOC.
A QPPD object is considered extended in its data structures or is called extended exactly when database fields or value fields have been extended.
Before extended QPPD objects can be transferred, all settings for the transfer of standard QPPD objects must be made.
In the following, the term "system" always refers to the combination of system and client. In particular, it is possible to distribute data between two clients on the same system.
Settings in QPPD Customizing
No changes are necessary in the QPPD customizing.
Settings in the SAP standard
Segments
One to three segments are required for each database table that has been extended.
Example: The PMK table was extended according to customer specifications. For this purpose, a Z-append to the structure /SCT/QP_S_PMK_DATA was created. This contains the seven fields ZZ01, ..., ZZ07. It looks as follows:
Analogously, a Z segment is created that contains these fields. So that the data can be transferred correctly, all key fields from the /SCT/QP_PMK table (all fields of the /SCT/QP_PMK_KEY structure) must be contained in the Z segment. So the fields GUID, OBJEKTTYP, ROWGRP, and MKMNR must be contained. The Z-Segment therefore contains the 4 key fields as well as the 7 append fields equal to 11 fields. The following figure shows the Z-Segment ZABC_QPPD_PMK:
This segment must now be implemented in the extension to the standard base type.
Extension of the standard base type
In the WE30 an extension to the standard IDOC type /SCT/QP_QVC must be defined. In this example, the customer extension ZABC_QPPD is created for the basic type /SCT/QP_QVC. This will automatically take into account any future changes to the default base type.
Under the segment /SCT/QP_QVC_HEADER, an extension is then made as a child segment with the aforementioned Z-PMK segment. This then looks as follows:
Announce extension
Although this extension was already linked to the basic type when it was created in WE30, the extension must additionally be made known in WE82.
For this purpose, the extension ZABC_QPPD is linked to the basic type /SCT/QP_QVC and message type /SCT/QP_QPPD. It looks like this:
This extension must now be entered in the partner profiles of the sending system.
Partner profiles at the sending system
The partner profiles in the sending system must be supplemented with the extension of the basic type. It looks like this:
Redefinition of the IDOC service
The QPPD's own IDOC service implements the sending of the IDOC. The two methods for creating and reading the IDOC must be redefined.
Redefinition creation IDOC
The method /SCT/QP_CL_QV_IDOC_SERVICE→GET_IDOC_FROM_QVC_DATA must be redefined so that the Z append fields can be transferred using Z segment ZABC_QPPD_PMK.
Example:
The ZABCCL_QPPD_IDOC class inherits from the /SCT/QP_CL_QV_IDOC_SERVICE class.
The GET_IDOC_FROM_QVC_DATA method is redefined as follows:
METHOD /sct/qp_if_idoc~get_idoc_from_qvc_data. CLEAR: et_edidd."SUPER"Create IDOC for standard part of QPPD objectCALL METHOD super->/sct/qp_if_idoc~get_idoc_from_qvc_dataEXPORTING it_qvc_data = it_qvc_dataIMPORTINGet_edidd    = DATA(lt_edidd). "--------------------------------------------------------------------""Z-PMK segments"--------------------------------------------------------------------"CONSTANTS: lc_pmk TYPE edilsegtyp VALUE 'ZABC_QPPD_PMK'.DATA: lt_edidd_zpmk LIKE et_edidd, ls_zabc_qppd_pmk TYPE zabc_qppd_pmk."ResetCLEAR: lt_edidd_zpmk."All dataLOOP AT it_qvc_data ASSIGNING FIELD-SYMBOL(<ls_qvc_data>)."PMKLOOP AT <ls_qvc_data>-pmk ASSIGNING FIELD-SYMBOL(<ls_pmk>)."Prepare new EDIDD entryAPPEND VALUE #( segnam = lc_pmk sdata = CONV zabc_qppd_pmk( ls_zabc_qppd_pmk ) ) TO lt_edidd_zpmk.ENDLOOP.ENDLOOP.TRY.et_edidd = VALUE #( BASE et_edidd FOR ls_edidd IN lt_edidd WHERE ( segnam = mc->segnam_header ) ( ls_edidd ) ).CATCH cx_sy_itab_line_not_found.ENDTRY.IF lt_edidd_zpmk IS NOT INITIAL.APPEND LINES OF lt_edidd_zpmk TO et_edidd.ENDIF."Dann den Restet_edidd = VALUE #( BASE et_edidd FOR ls_edidd IN lt_edidd WHERE ( segnam <> mc->segnam_header ) ( ls_edidd ) ).ENDMETHOD.Redefinition IDOC Readout
The GET_QVC_DATA_FROM_IDOC method is redefined as follows:
METHOD /sct/qp_if_idoc~get_qvc_data_from_idoc."SUPERCALL METHOD super->/sct/qp_if_idoc~get_qvc_data_from_idocEXPORTINGit_edidd = it_ediddIMPORTINGet_ana = et_anaet_log = et_loget_node = et_nodeet_nodet = et_nodetet_noderel = et_noderelet_num = et_numet_pmk = et_pmket_status = et_statuset_stx = et_stxet_text_bapi = et_text_bapiet_text_bapi_flat = et_text_bapi_flatet_stxtext = et_stxtextet_val = et_valet_valt = et_valtCHANGINGct_idoc_status = ct_idoc_status."--------------------------------------------------------------------""Z-PMK segments"--------------------------------------------------------------------"CONSTANTS: lc_pmk TYPE edilsegtyp VALUE 'ZABC_QPPD_PMK'.DATA:ls_pmk TYPE zabc_qppd_pmk."Process Z-segmentsLOOP AT it_edidd ASSIGNING FIELD-SYMBOL(<ls_edidd>) WHERE segnam = lc_pmk."ResetCLEAR ls_pmk."Apply values from segmentMOVE <ls_edidd>-sdata TO ls_pmk.TRY."Find entryDATA(lr_pmk) = REF #( et_pmk[ guid = ls_pmk-guidobjekttyp = ls_pmk-objekttyprowgrp = ls_pmk-rowgrpmkmnr = ls_pmk-mkmnr ] )."Refresh fieldsMOVE-CORRESPONDING ls_pmk TO lr_pmk->*.CATCH cx_sy_itab_line_not_found."Add new entryAPPEND CORRESPONDING #( ls_pmk ) TO et_pmk.ENDTRY.ENDLOOP.ENDMETHOD.Announcing the redefinition of the IDOC service in the factory
To ensure that the above redefinitions are also processed, the Z class ZABCCL_QPPD_IDOC must be made known in the Class Factory. Transaction C10 ( Basic settings → Class Factory )
The following entry must be maintained in the "Class Factory" sub dialog:






