Skip to Content

BADI ME_PROCESS_PO_CUST Method im_item->get_persistent_data in IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM

Hi All,

I just noticed that the method im_item->get_persistent_data, doesn't really get the persistent data from the tables, and to make things worse, it doesn't even return the correct delivery date (EINDT) as last posted.

When I change the delivery date in ME22N, for an item, in this BADI method PROCESS_ITEM, I want to detect a change in the same, but the GET_PERSISTENT_DATA method returns me the EINDT as the new one I just entered on screen, instead of the date posted earlier.

Any idea, if this is a bug in standard, or is there a better way to get the previous delivery date, to detect a change?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 20, 2017 at 06:41 AM

    Could you look at method PROCESS_SCHEDULE and not PROCESS_ITEM, there compare returned values of GET_DATA, GET_PREVIOUS_DATA, GET_PERSISTENT_DATA. (Also check the NO_DATA exception for those GET methods)

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 20, 2017 at 10:13 AM

    Hello Mithun,

    Please check the following code:



    DATA : lw_po_new TYPE mepoitem,
    lw_po_old TYPE mepoitem.

    CALL METHOD im_item->get_data
    RECEIVING re_data = lw_po_new. >> will return the changed/new values

    CALL METHOD im_item->get_previous_data
    IMPORTING ex_data = lw_po_old. >> will return the old/previous value

    Best Regards,

    Manish Shankar

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Manish,

      Unfortunately, this won't work in my case (Already tried). In general it's recommended to use the get_persistent_data method, instead of get_previous_data, to get the old data last posted.

      Using the get_persistent_data method worked for me, in the PROCESS_ITEM method.