Posting Date Should Not Be Less Than po Doc. Date(MIRO)
when used post invoice or work on miro then this program trigger for date validation
here exit name LMR1M001 and function module name EXIT_SAPLMRMP_010 and inculde program name is ZXM08U16
business senario is when user enter posting date should not bel less the po documents date
one badi found for miro INVOICE_UPDATE
but here i develop the senario customer exit
BREAK rohinik.
TYPES : BEGIN OF ty_ekko,
ebeln TYPE ebeln,
bedat TYPE bedat,
END OF ty_ekko.
DATA : lt_ekko TYPE STANDARD TABLE OF ty_ekko,
ls_ekko TYPE ty_ekko.
READ TABLE e_tdrseg INDEX 1.
SELECT SINGLE ebeln bedat
FROM ekko
INTO ls_ekko
WHERE ebeln = e_tdrseg-ebeln.
READ TABLE lt_ekko INTO ls_ekko INDEX 1.
IF e_trbkpv-bldat < ls_ekko-bedat.
PERFORM folge_gleichsetzen(saplv00f).
sy-ucomm = 'ENT1'.
MESSAGE 'Invoice Date Should Not Be Less Than PO Doc. Date' TYPE 'E'.
SET SCREEN syst-dynnr.
LEAVE SCREEN.
ENDIF.
IF e_trbkpv-budat < ls_ekko-bedat.
PERFORM folge_gleichsetzen(saplv00f).
sy-ucomm = 'ENT1'.
MESSAGE 'Posting Date Should Not Be Less Than po Doc. Date' TYPE 'E'.
SET SCREEN syst-dynnr.
LEAVE SCREEN.
ENDIF.
here exit name LMR1M001 and function module name EXIT_SAPLMRMP_010 and inculde program name is ZXM08U16
business senario is when user enter posting date should not bel less the po documents date
one badi found for miro INVOICE_UPDATE
but here i develop the senario customer exit
BREAK rohinik.
TYPES : BEGIN OF ty_ekko,
ebeln TYPE ebeln,
bedat TYPE bedat,
END OF ty_ekko.
DATA : lt_ekko TYPE STANDARD TABLE OF ty_ekko,
ls_ekko TYPE ty_ekko.
READ TABLE e_tdrseg INDEX 1.
SELECT SINGLE ebeln bedat
FROM ekko
INTO ls_ekko
WHERE ebeln = e_tdrseg-ebeln.
READ TABLE lt_ekko INTO ls_ekko INDEX 1.
IF e_trbkpv-bldat < ls_ekko-bedat.
PERFORM folge_gleichsetzen(saplv00f).
sy-ucomm = 'ENT1'.
MESSAGE 'Invoice Date Should Not Be Less Than PO Doc. Date' TYPE 'E'.
SET SCREEN syst-dynnr.
LEAVE SCREEN.
ENDIF.
IF e_trbkpv-budat < ls_ekko-bedat.
PERFORM folge_gleichsetzen(saplv00f).
sy-ucomm = 'ENT1'.
MESSAGE 'Posting Date Should Not Be Less Than po Doc. Date' TYPE 'E'.
SET SCREEN syst-dynnr.
LEAVE SCREEN.
ENDIF.
Perfectly Worked . Tanq Man
ReplyDelete