2008 Nov 18 10:42 AM
Dear All,
how to write Enhancement for Invoice date (BLDAT) so that it cannot be more than system date (today's date). ( T-code MIRO )
Regards
Nisha
Edited by: Nagaraju B on Nov 19, 2008 6:23 AM
2008 Nov 19 6:26 AM
Hi Nagaraju,
Please check in SMOD the enhancement LMR1M001
EXIT_SAPLMRMP_010 Customer Exit: Analyze Document Header and Item
Regards
Byju
2008 Nov 19 8:54 AM
Hi Byju,
can u please explain in steps how to write code for that enhancement in EXIT_SAPLMRMP_010...?
I'm new to Enhancement...
Regards
N.B
Edited by: Nagaraju B on Nov 19, 2008 9:55 AM
2008 Nov 19 9:21 AM
Hi Nagaraju,
Do the following,
go to SMOD -> LMR1M001 -> click on components -> display
Double click on EXIT_SAPLMRMP_010 -> click on include zxm08u16 . -> a warning message will come -> press enter and we have a an editable screen
if sy-tcode = 'MIRO' and E_TRBKPV-bldat > sy-datum.
Message 'BLDAT cannot be greater than current date' type 'W'.
endif.
Based on the requirement change the code inside the if condition...giving error message is not recommended inside exits...you can also try a pop_up_to_confirm to get user confirmation
Remember that we can do only validation here since BLDAT is an importing parameter only(we cannot change it)..see the function EXIT_SAPLMRMP_010 tabs for importing and table parameters....
We can also try the BADI "INVOICE_UPDATE" in se18
by using the interface CHANGE_BEFORE_UPDATE ...to do similar validations....
For this approach,create an implementation for this badi and write code in CHANGE_BEFORE_UPDATE
based on the table\structure from where we get bldat
Hope it helps,
Regards
Byju