Skip to Content
0
Former Member
Apr 24, 2009 at 07:14 AM

EXIT_SAPLEBND_002 of M06E0004 User exit to Reset Release Status if PO

2565 Views

Hi All,

I have implemented a user-exit EXIT_SAPLEBND_002 of M06E0004, as advised, which can reset/cancel the release status of a certain PO document when a certain field has been changed aside from the quantity and price fields.

I would just like to ask if how woud the exit know if something in the document has been changed by the user if he goes to me22n? Basically, the requirement was that everytime a user changes the partially released PO in the header data and other fields aside from price and quantity, the release status should be reset to start all over again.

I have this code, but this should only be ran if a partially released PO has been changed in most of its fields (header/item).

DATA: wa_ekpo TYPE ekpo,
      wa_bekpo TYPE ekpo,
      lv_frgke TYPE ekko-frgke,
      tx_ekko TYPE char200,
      tx_ekbe TYPE char200,
      lv_frgzu TYPE ekko-frgzu.

FIELD-SYMBOLS: <fs_ekko>  TYPE ekko.

tx_ekko = '(SAPLMEPO)ekko'.
ASSIGN (tx_ekko) TO <fs_ekko>.

If <fs_ekko>-frgke = '1' AND
   <fs_ekko>-frgzu IS NOT INITIAL.
<fs_ekko>-frgke = '2'.
<fs_ekko>-frgzu = space.
ENDIF.

UNASSIGN <fs_ekko>.

Kindly send some recommendations.

Regards,

RE