ERROR message MEPO151 in BADI ME_PROCESS_PO_CUST
By Shilpa Bansal, Infosys
create an implementation of BADI ME_PROCESS_PO_CUST to UPDATE/overwrite
Functional area in a Purchase Order.
functional area is required to create a profit and loss account in Financial
Accounting using cost-of-sales
accounting. The data element for this field is FKBER. The functional
area field has a special position in the master data for P&L accounts and
the functional area when posting
following cases are possible when posting and can affect how the functional area
You post to a G/L account for which no cost element exists - The system derives
the functional area based on the G/L account
You post to a G/L account for which a cost element exists (primary cost
element)- The system derives the functional area based on the G/L account .
In Controlling, you post to a cost element for which no G/L account exists
(secondary cost element)-The system derives the functional area based on the
scenario: When we create/change PO information,
functional area is updated on the basis of G/L account . We can view this
through the transaction FS00.
scenario: When we create or change PO,
functional area should be updated on the basis of cost center entered by user.
The BADI should overwrite the functional area fetched on basis of G/L account
with the value fetched on basis of cost center and controlling area.
this, we write the following code in the implementation of BADI
ME_PROCESS_PO_CUST, Method â€˜PROCESS_ITEMâ€™
Goto Se19 . Enter BADI name â€˜ME_PROCESS_PO_CUSTâ€™. Click on Create
the implementation name as ZIMP_PO_CUST and press enter.
next screen enter implementation short text and click on save. Save as local
object. An information message is displayed â€˜Implementation ZIMP_PO_CUST will
be migratedâ€™. Press enter.
3) In the
following screen click on create button and enter the name of enhancement
implementation. It can be different than BADI implementation name. Press enter
and save as local object and activate it.
Implementations already created for this BADI would be shown in the below
4) Now we
get the following screen:
5) As per
our requirement we code the logic in method PROCESS_ITEM. For this, double click
the method and write down the code.
simply with this code when we run ME21N/ME22N, we get following error:
the message description, we check if field FKBER exists in any of the structure
MEPOITEM_TECH or MEPOSCHEDULE_TECH. Since it does not exist, the BADI should be
able to modify it. The reason for error is the control enters into an infinite
loop because of the statement:
The solution to this error is
inserting the following piece of code after the above mentioned statement :
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
Graphic Design by Round the Bend Wizards