3 Replies Latest reply: Dec 2, 2008 4:40 PM by Marco Antonio Romero Sanchez RSS

View or Edit Profit Center in PO and SA

Marco Antonio Romero Sanchez
Currently Being Moderated

Hello...

 

We are going to change materials to a new profit center and in EKPO the field profit center "PRCTR" is showed, but in the PO and SA documents not.

 

What is the way to show and edit the profit center field in the purchase order and in the schedule agreement.

 

I went to the field selection groups for both and that profit center field is not in the list.

 

It is that possible?

 

or Shold we update the Material master and create new documents?

  • Re: View or Edit Profit Center in PO and SA
    Alpesh Patel
    Currently Being Moderated

    If you use the account assignment category in the PO than only the field will be populated in the PO

     

    to check make it optional for A/C category

     

    go to  Tcode OME9 and select your A/C vategory and make it optional

  • Re: View or Edit Profit Center in PO and SA
    Marco Antonio Romero Sanchez
    Currently Being Moderated

    Thanks for your response but we are not using any account assignment category.

     

    The materials we are using are for production (material type KAUF). So account assignment category is blank.

  • Re: View or Edit Profit Center in PO and SA
    Marco Antonio Romero Sanchez
    Currently Being Moderated

    This is way I love SAP....

     

    I found an OSS note related to my problem. OSS 141009 Talk about the profit center assignment in materials.

     

    ***********************************

    Summary

    Symptom

    If you changed the profit center assignment in material master, this new assignment is not taken into account for those purchase orders or scheduling agreements created before the change. As a result the old profit center is used instead of the new profit center.

    Other terms

    EKPO Profit Center Assignment

    Reason and Prerequisites

    Missing functionality.

    Solution

    Execute the attached program ZECPCAEK for the affected purchase orders or scheduling agreements. This will change the profit center of the document to the profit center of the material master.

    Attention: you can use report ZECPCAEK only for purchase orders without account assignment objects. If you have purchase order with accounts assignments you have to change the purchase orders manually.

     

                                                                                                      • *

    y obviamente el codigo del programa, que por comentarios de nuestro "Abaper" dice que es un contundente "martillazo" (entiendase Update directo a la tabla EKPO).

     

     

                                                                                                      • ********************

    • Report to correct purchase orders (table EKPO)

    • relevant:

    • - after a reorganisation of profit center assignments to materials

    • - purchase orders from release 2.2 don't have a profit center

                                                                                                      • ********************

     

     

    REPORT ZECPCAEK.

     

    TABLES: EKPO.

     

    DATA: BEGIN OF EKPO_STRUCTURE,

    EBELN LIKE EKPO-EBELN,

    EBELP LIKE EKPO-EBELP,

    MATNR LIKE EKPO-MATNR,

    WERKS LIKE EKPO-WERKS,

    KO_PRCTR LIKE EKPO-KO_PRCTR,

    END OF EKPO_STRUCTURE.

     

    DATA L_EKPO LIKE EKPO_STRUCTURE OCCURS 0 WITH HEADER LINE.

     

    DATA: BEGIN OF L_MARC.

    INCLUDE STRUCTURE MARC.

    DATA: END OF L_MARC.

     

    DATA: COUNTER LIKE SY-TABIX.

     

                                                                                                      • *********************

     

    SELECT-OPTIONS: EBELN FOR EKPO-EBELN OBLIGATORY.

    PARAMETERS: TEST AS CHECKBOX DEFAULT 'X'.

     

                                                                                                      • *********************

     

    START-OF-SELECTION.

     

    • Selection of purchase orders

     

    SELECT EBELN EBELP MATNR WERKS KO_PRCTR

    INTO L_EKPO FROM EKPO

    WHERE EBELN IN EBELN.

     

    APPEND L_EKPO.

    ENDSELECT.

     

     

    CLEAR COUNTER.

     

    LOOP AT L_EKPO.

     

    • Read Material data

    CALL FUNCTION 'MARC_SINGLE_READ'

    EXPORTING

    MATNR = L_EKPO-MATNR

    WERKS = L_EKPO-WERKS

    IMPORTING

    WMARC = L_MARC

    EXCEPTIONS

    LOCK_ON_MARC = 1

    LOCK_SYSTEM_ERROR = 2

    WRONG_CALL = 3

    NOT_FOUND = 4

    OTHERS = 5.

     

    IF SY-SUBRC = 0.

     

    • Has the profit center changed?

    IF L_MARC-PRCTR <> L_EKPO-KO_PRCTR.

     

    IF TEST = SPACE.

    UPDATE EKPO

    SET KO_PRCTR = L_MARC-PRCTR

    WHERE EBELN = L_EKPO-EBELN

    AND EBELP = L_EKPO-EBELP.

    ENDIF.

    COUNTER = COUNTER + 1.

     

    • Protocoll

    IF COUNTER = 1.

    WRITE /.

    WRITE AT 5 'Purchase Order'.

    WRITE AT 20 'Position'.

    WRITE AT 30 'Material no.'.

    WRITE AT 60 'Old PrCtr'.

    WRITE AT 75 'New Prctr'.

    ENDIF.

     

    WRITE /.

    WRITE AT 5 L_EKPO-EBELN.

    WRITE AT 20 L_EKPO-EBELP.

    WRITE AT 30 L_EKPO-MATNR.

    WRITE AT 60 L_EKPO-KO_PRCTR.

    WRITE AT 75 L_MARC-PRCTR.

    ENDIF.

    ENDIF.

     

    ENDLOOP.

    WRITE: /, /, COUNTER, 'entries'.

     

     

Actions