Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

enhancement for date field of MIRO t-code

Former Member
0 Kudos
643

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

3 REPLIES 3

Former Member
0 Kudos
226

Hi Nagaraju,

Please check in SMOD the enhancement LMR1M001

EXIT_SAPLMRMP_010 Customer Exit: Analyze Document Header and Item

Regards

Byju

0 Kudos
226

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

0 Kudos
226

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