INVOICE_UPDATE BADI FOR MIRO Invoie Date Should not be less than PO Date this documents help to validatoin of miro while saveing the object in
here senario badi invoice_update this badi fond mostley miro as per the requirments we can update
and change your code and develop the senario as per the user requirments INVOICE_UPDATE
*
DATA : lt_rbkp TYPE STANDARD TABLE OF rbkp.
DATA : lt_rseg TYPE STANDARD TABLE OF mrm_tab_mrmrseg."rseg.
DATA : ls_rseg TYPE mrmrseg.
DATA : ls_rbkp TYPE rbkp.
ls_rbkp = s_rbkp_new.
DATA : lv_bldat TYPE ekko-aedat.
DATA : lv_budat TYPE rbkp-budat.
LOOP AT ti_rseg_new INTO ls_rseg.
SELECT bedat
FROM ekko
INTO lv_bldat
WHERE ebeln = ls_rseg-ebeln.
ENDSELECT.
IF ls_rbkp-bldat < lv_bldat.
MESSAGE 'Invoie Date Should not be less than PO Date ' TYPE 'E'.
* message e009(ZMM) with lv_date.
ELSE.
IF ls_rbkp-budat < ls_rbkp-bldat.
MESSAGE 'Posting Date Should not be less than Invoice Date' TYPE 'E'.
ENDIF.
ENDIF.
ENDLOOP.
Comments
Post a Comment