Skip to Content
avatar image
Former Member

Exit for PO Change Save

I need to upate the Shipping Point and Route in PO Change when it is saved. I am looking at EXIT_SAPMM06E_013 under the enhancement MM06E005 but I dont understand how to make changes to it as I have not worked with enhancements before. Can anyone briefly tell me how to update the shipping point and route here. Thank you

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

8 Answers

  • Sep 19, 2007 at 05:01 PM

    Hi Megan Flores,

    Hope below can help you,

    1/ Go to Transaction code CMOD

    2/ In the initial screen in put a Z*** as Project name and then Press Create

    3 Input the short text for your project then press Enhancement Assignment button at application toolbar

    4/ Input MM06E005 as enhancement and then press Save button at standard toobar

    5/ press Components button then you will see the funtion modules in this enhancement, double click EXIT_SAPMM06E_013

    6/ Now you will in function module builder screen and click Source Code view

    7/you will see an include program name in the source code and plz double click it

    8/ A warning message will generated plz ingore it and press ENTER in your keyboard,

    9/ now just as normal you can develop your logic and this include program

    10/active your include program and function module

    11/back to the components screen(screen as step 5) and then active your project

    12/ I think it will work

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 19, 2007 at 05:09 PM

    Hi Megan,

    In addition to steps suggested by Joe you need to analyze the import and the tables parameter in the function module there are tables for both old and new, you will need to chnage the new values of an appropriate table to chnage the shipping point etc...

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 19, 2007 at 05:50 PM

    as per my understanding you can't change the values using po user exit since i have done many things in PO.

    Try for BADI ,i am working on 4.6C and i did not see any BADI related to PO - updating the data.

    Thanks

    Seshu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 19, 2007 at 05:56 PM

    I am using exit EXIT_SAPMM06E_013 with include ZXM06U44

    And I am trying to update vstel, route of table EKPV. This does not update the values though. Can someone help me on this.

    DATA: wa_xekpv TYPE ekpv.
    BREAK-POINT.
    READ TABLE xekpv INDEX 1 INTO wa_xekpv.
    wa_xekpv-vstel = '0303'.
    wa_xekpv-route = 'ZPT02'.
    MODIFY xekpv INDEX 1 FROM wa_xekpv TRANSPORTING vstel route.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 19, 2007 at 09:16 PM

    Seshu

    You are probably right that I cannot update PO data using the user exit. I am now working with badi ME_BAPI_PO_CUST but it does not seem to hold shipping data. Do you know much about this badi?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Megan,

      I have no idea about BADI for PO ,i had req to update PO fields,since my system is 4.6C ..

      I am sure that user exit can not help you since it will not update .

      I am not sure BADI ,anyhow please open new thread related to BADI ,someone will help you.

      meanwhile i will search my level best.

      Thanks

      Seshu

  • avatar image
    Former Member
    Sep 25, 2007 at 04:44 PM

    EXIT_SAPMM06E_013 with include ZXM06U44

    This only updates in Me21N but when I go to ME22N or ME23N in display mode the shipping point and route is not updated. It seems the EKPV table is not updated. Any ideas!!

    * Structure of internal table that is used to populate the shipping data on PO
      DATA: BEGIN OF t_ptv OCCURS 0.
              INCLUDE STRUCTURE ekpv.
      DATA:   updkz,
              ledata LIKE ekpv-ledat,
            END OF t_ptv.
    
      DATA: wa_table(100) TYPE c,                 "Placeholder for itab PTV in prog SAPLMEPO
            wa_ptv        LIKE t_ptv,             "Work area for itab ptv
            gv_route      TYPE ekpv-route,        "Variable to hold route of first line item
            gv_vstel      TYPE ekpv-vstel.        "Variable to hold shipping point of first line item
    
      FIELD-SYMBOLS: <fs_ptv> TYPE ANY TABLE.     "Field symbol to update change to (SAPLMEPO)PTV[]
    
      wa_table = '(SAPLMEPO)PTV[]'.
      ASSIGN (wa_table) TO <fs_ptv>.              "Assign (SAPLMEPO)PTV[] to field symbol
      t_ptv[] = <fs_ptv>[].                       "Move field symbol to itab
    
      LOOP AT t_ptv INTO wa_ptv.
    
        IF sy-tabix = 1.                          "If first line item...
          gv_route = wa_ptv-route.                "Store Route
          gv_vstel = wa_ptv-vstel.                "Store Shipping Point
        ELSE.                                     "For all other line items...
          IF wa_ptv-route <> gv_route AND wa_ptv-vstel <> gv_vstel. "Check if route & sp same as first line item
            wa_ptv-route  = gv_route.             "Update route to first line item
            wa_ptv-vstel  = gv_vstel.             "Update shipping point to line item
            wa_ptv-updkz  = 'U'.                  "Set the updation flag
            wa_ptv-ledata = sy-datum.             "Update the creation date
            MODIFY t_ptv FROM wa_ptv.
          ENDIF.
        ENDIF.
    
      ENDLOOP.
    
      <fs_ptv>[] = t_ptv[].                       "Move table to field symbol to update (SAPLMEPO)PTV[]
      UNASSIGN <fs_ptv>.

    Message was edited by:

    Megan Flores

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 01, 2007 at 02:28 AM

    For all those that think that this exit does not work. This exit does work !!! You can use the code that I have put it .. this changes the ME21N but not the EKPV database table. So you need to MODIFY EKPV using the work area. This way you will be able to update the shipping data during PO creation.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 01, 2007 at 02:28 AM

    Resolved

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I tried to use EXIT_SAPMM06E_013 but it isn't working.

      I think the solution is in OSS note 303453.