‎2006 Nov 02 12:39 AM
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
‎2006 Nov 02 2:30 AM
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
‎2006 Nov 02 1:24 AM
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
‎2006 Nov 02 2:03 AM
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
‎2006 Nov 02 2:30 AM
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
‎2006 Nov 02 3:05 AM
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
‎2006 Nov 02 4:57 AM
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
‎2006 Nov 02 6:37 AM
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.
‎2006 Nov 02 3:57 PM
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