Ansicht
Dokumentation

COPA00RE - BW/CO-PA Data Transfer

COPA00RE - BW/CO-PA Data Transfer

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

For data transfers between BW and CO-PA, you can access the data in the query and change or delete the CO-PA line items created from the query, or create additional CO-PA line items.

It can be necessary to do so if the master data in SAP BW differs from that in CO-PA and if you want to implement appropriate mapping of the master data in both systems.

Within the module EXIT_SAPLKEX3_001, you can store your own coding for such cases in the include ZXKEXU01. Here you find the name of the operating concern, the actual/plan indicator, the name of the BW system, the query name, the query data, and the CO-PA line items created from the query.

The enhancement must be activated for it to take effect.

The customer-specific coding for an enhancement is generally stored in include files. In this instance, use the include ZXKEXU01 intended for this purpose.

In SAP BW, there is a 20-character product number ARTICLE. The last 18 characters (3-20) of this product number - instead of the first 18 characters (1-18) as is the setting in the standard - are mapped onto the 18-character product number ARTNR. Since the first two characters of the longer BW product number are excluded from the assignment, the transferred data has to be read subsequently.

The operating concern is S001. For other operating concerns, S001 would have to be replaced by the name of the corresponding operating concern.



* example program for user exit BW-CO-PA data transfer (Retraktor)
*
* transfer 3nd-20.digit of BW-infoobject ARTICLE into CO-PA field
* ARTNR (instead of 1st-18.digit).
*
* data definition (include RKEBW61E delivered)

INCLUDE RKEBW61E.

DATA: L_T_CE0 LIKE CE0S001 OCCURS 0,

      L_WA_CE0 LIKE CE0S001,

      L_INTEGER TYPE I.

case erkrs.

  WHEN 'S001'.

  L_T_CE0 = T_CE0[].                  "T_CE0 contains CO-PA line items

  CLEAR   T_CE0.

  REFRESH T_CE0.

                                      "T_QUERY_DATA contains query data

  loop at T_QUERY_DATA into wa_e_query_data.

      L_INTEGER  = L_INTEGER  + 1.

    TI_LE_CHAR = WA_E_QUERY_DATA-TI_LE_CHAR[].

* ti_le_char contains infoobjects (except keyfigures) to a line item

    TI_LE_KYF  = WA_E_QUERY_DATA-TI_LE_KYF[].

* ti_le_kyf contains keyfigures for a line item (not used here)

     READ TABLE L_T_CE0 INTO L_WA_CE0 INDEX L_INTEGER.

* read corresponding CO-PA item

      LOOP AT TI_LE_CHAR INTO WA_E_LE_CHAR WHERE IOBJNM = 'ARTICLE'.

      ENDLOOP.

* names of the infoobjects: see customizing or table TKEBWLRTR3

      IF SY-SUBRC = 0.

         L_WA_CE0-ARTNR = WA_E_LE_CHAR-VALUE+2(18).

* modify article from query data (take 3rd-20.digit from query field)

        IF WA_E_LE_CHAR-VALUE = '1'.

           MESSAGE E100(KE) WITH WA_E_LE_CHAR-IOBJNM.

        ENDIF.

* abort transfer with error message if ARTICLE = 1.

      ENDIF.

   APPEND L_WA_CE0 TO T_CE0.

   endloop.

endcase.






CL_GUI_FRONTEND_SERVICES - Frontend Services   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 5421 Date: 20240424 Time: 030347     sap01-206 ( 43 ms )