Application Development and Automation 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: 
Read only

User exit for MIRO while saving

Former Member
0 Likes
14,816

Hi

I need to validate the Company code in Txn MIRO with the company code of the PO that's been processed

Is there any user-exit which gets triggered while saving the document in txn MIRO.

I know the following BADI INVOICE_UPDATE gets triggered while saving the documents, as i am new to the BADI functionality, i am unable to proceed further with the implementation of it in the system.

Can some one let me know how to implement a BADI.

Cheers

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,765

Hi,

Check the user exit..

EXIT_SAPLMR1M_004..

It has the header details in the structure I_RBKPV

And the line items in the internal table TI_DRSEG..

Thanks,

Naren

7 REPLIES 7
Read only

Former Member
0 Likes
4,765

Hi,

Use the MIRO user exit..EXIT_SAPLMRMP_010..

If you give an error message in this user exit..Automatically it will be stored in the error log ...

Thanks,

Naren

Read only

0 Likes
4,765

Hi Naren,

Thanks for you reply Naren

The exit that you have mentioned when i simulte the document in miro its not stopping at the breakpoint of the following exit.

What am after is i need to compare the comp. codes in the invoice header with the Comp. code fo the Purchase order in the item level of the invoice here if they are not similare i need t pop and error message to the user

cheers

Read only

Former Member
0 Likes
4,766

Hi,

Check the user exit..

EXIT_SAPLMR1M_004..

It has the header details in the structure I_RBKPV

And the line items in the internal table TI_DRSEG..

Thanks,

Naren

Read only

0 Likes
4,765

Hi Naren,

Thanks for you reply, but the exit doesn't exist at, i havebeen tring all teh exits that are present for MIRO, but non of them is stopping when the document is either saved or simulated, could can one plase tell me which exit works out in a better fashion.

Regards

Read only

0 Likes
4,765

Hi Sushis ,

check this link abt badi

http://help.sap.com/saphelp_nw04/helpdata/en/ee/a1d548892b11d295d60000e82de14a/content.htm

and u have to choose this method is useful

<b>CHANGE_AT_SAVE Invoice Document at Save

CHANGE_BEFORE_UPDATE Invoice Document Before Update

CHANGE_IN_UPDATE Invoice Document During Update</b>

let me know if u required more info.

regards

Prabhu

Read only

0 Likes
4,765

Hi,

Try using the enhancement LMR1M001.First create the project through CMOD and assign the enhancement.Put your code in EXIT_SAPLMRMP_010.This should work at the time of saving in MIRO.

Also you can check SE18 for BADI definition starting with MRM* like MRM_PAYMENT_TERMS.MRM_PAYMENT_TERMS should also work for your requirement.

Pravat.

Read only

Former Member
0 Likes
4,765

Hi,

Did you create a project for the enhancement.

Create a project in CMOD ZMIRO

Add the enhancement LMR1M001 in the project.

Save the project and activate the project..

Then it will go through your user exit code..

THanks,

Naren