10-09-2008 9:03 PM
Hi Everyone,
My requirement is to implement a user exit which gives out an error if the plants on different line items are different. All the line items should have the same plant as line item '10'. If line item 20 has a different plant other than line item 10, then should be an error message popping up.
Anyone has any ideas of a user exit which will help me to do this??
Thanks
Kumar.
10-10-2008 2:12 PM
Hi,
Try enhancement MM06E005 -> EXIT_SAPMM06E_012.
In which you can use table TEKPO.
i think this will help you....
10-10-2008 3:19 AM
check the BADI ME_PO_PROCESS_CUST. search with this BADI name in this forum.
10-10-2008 7:50 AM
Try going for some implicit enhancements
you can go for dat by going fo enchancement mode and checking possible enhancements and inserting your code
The logic should be some thing liek dis
Check out the Internal table/Go for enw one which gets all data and loop it up
and check plant name for all line items
if possible try using flags
thanks
shiva
10-10-2008 8:48 AM
Hi,
The procedure to find a badi for a transaction is
1) Go to the transaction SE37 to find your function module.
2) Locate the function SXV_GET_CLIF_BY_NAME.
3) Put a breakpoint there.
4) Now open a new session.
5) Go to your transaction.
6) At that time, it will stop this function.
7) Double click on the function field EXIT_NAME.
😎 That will give you name of the BADI that is provided in your transaction.
And check user exits in smod for ME package.
Rhea.
10-10-2008 2:12 PM
Hi,
Try enhancement MM06E005 -> EXIT_SAPMM06E_012.
In which you can use table TEKPO.
i think this will help you....
10-13-2008 4:46 PM
I have the used the BADI as Vijay suggested and the concept is working for ME21N. But still I can go and change the plant in ME22N which defeats the whole purpose.
Can anyone suggest anything here??
Thanks
Kumar.
10-14-2008 5:05 AM
Hi Kumar ,
may be u need to recheck ur code , for more info , please ref vijays's posting on the same issue , how to set Item to Invalid in case of any errros .
or check the sample code of those methods.
SE18->definition->display->GOTO->sample code-.display->here u select of which method u want to see the sample code.
regards
Prabhu
10-14-2008 5:30 AM
you need to restrict the same for ME22N also. may be you have coded for ME21 transaction alone. Just debug and find what is happening.
10-14-2008 8:47 PM
@Vijay
The problem is:
If I use the BADI, and change the plant of line item 20, only that line item is being populated in get_item internal table and hence I cannot compare it with line item 10.
If I use the user exit for my enhancement, I get both line items 10 and 20 but WERKS still has the previous value and not the changed value in tekpo internal table. So I am not able to use this either.
Thanks
Kumar.
10-15-2008 4:55 AM
ok, in this case some how you need to capture the item details, you can capture the records using the field-symbols or using the database (only incase of ME22N transaction)
10-15-2008 5:05 AM