Hi expert's,
I want to implementing of BADI in Transaction code 'ME12'. BADI definition is 'SD_COND_SAVE_A'
field isKBETR' (Save condition application) . observe the price shoud be same when we try to change the price and save it, It would not allow and shows us an error message.
please check the code.
method IF_EX_SD_COND_SAVE_A~CONDITION_SAVE_EXIT.
*BREAK-POINT.
DATA: WA_CT_KONPDB_OLD LIKE LINE OF CT_KONPDB_OLD.
DATA: WA_CT_KONPDB_NEW LIKE LINE OF CT_KONPDB_NEW.
READ TABLE CT_KONPDB_OLD INTO WA_CT_KONPDB_OLD INDEX 1.
READ TABLE CT_KONPDB_NEW INTO WA_CT_KONPDB_NEW INDEX 1.
IF WA_CT_KONPDB_OLD-KBETR NE WA_CT_KONPDB_NEW-KBETR.
MESSAGE 'PRISE CHANGE NOT ALLOWED-BY - BADI - YSD_COND_SAVE_A' TYPE 'E'.
ENDIF.
endmethod.
Thank you,
dinesh reddy