Document date should not be less than pr created date
BREAK ROHINIK.
DATA : it_ekpo TYPE TABLE OF ekpo WITH HEADER LINE.
DATA : it_ekko TYPE ekko.
DATA : lv_banfn TYPE banfn,
lv_aedat TYPE ekko-aedat.
it_ekko = i_ekko.
it_ekpo[] = tekpo[].
LOOP AT it_ekpo.
IF it_ekpo-banfn IS NOT INITIAL.
SELECT SINGLE badat
FROM eban
INTO lv_aedat
WHERE banfn = it_ekpo-banfn.
IF it_ekko-bedat < lv_aedat.
MESSAGE 'Pur. Doc. Date should not be before Pur. Req. Date' TYPE 'E'.
ENDIF.
ENDIF.
ENDLOOP.
DATA : it_ekpo TYPE TABLE OF ekpo WITH HEADER LINE.
DATA : it_ekko TYPE ekko.
DATA : lv_banfn TYPE banfn,
lv_aedat TYPE ekko-aedat.
it_ekko = i_ekko.
it_ekpo[] = tekpo[].
LOOP AT it_ekpo.
IF it_ekpo-banfn IS NOT INITIAL.
SELECT SINGLE badat
FROM eban
INTO lv_aedat
WHERE banfn = it_ekpo-banfn.
IF it_ekko-bedat < lv_aedat.
MESSAGE 'Pur. Doc. Date should not be before Pur. Req. Date' TYPE 'E'.
ENDIF.
ENDIF.
ENDLOOP.
Comments
Post a Comment