03-10-2010 8:42 AM
Hi Experts,
I am currently working on an implementation of BADI:ME_PROCESS_PO_CUST;Method:PROCESS_ACCOUNT.
The method has parameter IM_ACCOUNT type ref to IF_PURCHASE_ORDER_ACCOUNT_MM.
In Method Set_Data,parameter IM_DATA type MEPOACCOUNTING.
Data:ls_item TYPE mepoaccounting.
im_account->set_data( ls_item ).
I have to update the value of INDLF field in ME21N.mepoaccounting does not have this field.
Can we use method PROCESS_ACCOUNT to update field in ME21N?
Please suggest what would be the correct procedure for the same.
Thanks.
Edited by: p317980 on Mar 10, 2010 9:48 AM
03-10-2010 10:36 AM
Hi
BADI documentation says you can use the method PROCESS_ACCOUNT to change the account assignment. I guess you will able to do it. Below is the documentation for the BADI Method :
Processing of Account Assignment Data
Functionality
The PROCESS_ACCOUNT method enables you to change the account assignment data and check it for correctness.
Parameters
The following parameters are available:
IM_ACCOUNT - Account assignment
The interface reference is of the type IF_PURCHASE_ORDER_ACCOUNT_MM. You can use all methods defined there.
Note
Please note the general hints on Error Handling.
If you wish to mark the account assignment data as invalid, use the method INVALIDATE() of the IF_PURCHASE_ORDER_ACCOUNT_MM interface.
Notes
Under no circumstances make any changes to the database within this method. On no account use Commits.
Documentation for Business Add-In ME_PROCESS_PO_CUST
Regards
Srikanth M
03-10-2010 11:18 AM
HI Srikanth M,
thanks for the prompt reply.
I have checked the documentation.But my piece code needs to update the value of field IDNLF.
please advice.
03-10-2010 12:06 PM
Hi,
Try to use Method PROCESS_ITEM, you might be able to update IDNLF field.
Regards
Srikanth M
03-10-2010 4:41 PM
Hi,
Implemeent the method PROCESS_ITEM ....
DATA : lt_item TYPE MEREQ_ITEM.
CALL METHOD im_item->GET_DATA
RECEIVING
RE_DATA = lt_item .
lt_item will contain the data ....
now update the value ....by......lt_item-IDNLF =
now set the data by
CALL METHOD im_item->GET_DATA
EXPORTING
RE_DATA = lt_item .
Thanks,
Shailaja Ainala.
03-11-2010 3:54 AM
Thanks for all the replies.I was not able to access PROCESS_ACCOUNT.I have got the solution now,as the Account Assignment category field neds to have a value to view the method in debug mode.
Thanks.