2011 Jul 15 9:31 AM
Hi,
i'm using the BADI ME_PROCESS_REQ_CUST method POST ; in this method i need to access to items and it's work (i use im_header->get_items( ) ). But now i need to access to Account assignment, how can i do this ? the only object available is im_header.
Be careful, i can't read database because when i create a new document, the data are not saved again.
Thanks for help.
Cheer
2011 Jul 15 9:47 AM
IM_HEADER->get_items( ) returns the internal table RE_ITEMS type ref to MMPUR_REQUISITION_IITEMS (of line type MMPUR_REQUISITION_ITEM) which gives the list of line items.
Loop through the internal table RE_ITEMS, refer to the component RE_ITEMS-ITEM (type ref to IF_PURCHASE_REQUISITION_ITEM) & use the method RE_ITEMS-ITEM->IF_ACCT_CONTAINER_MM~GET_ITEMS( ) to get the account assignment details related to each item. This method is to be called in the loop for each line item.
Regards, Vinod
P.S : Is it purchase order or Purchase requisition ? By going through the post it is PR, your subject line seems to be wrong.
Edited by: Vinod Kumar on Jul 15, 2011 2:21 PM
2011 Jul 15 9:47 AM
IM_HEADER->get_items( ) returns the internal table RE_ITEMS type ref to MMPUR_REQUISITION_IITEMS (of line type MMPUR_REQUISITION_ITEM) which gives the list of line items.
Loop through the internal table RE_ITEMS, refer to the component RE_ITEMS-ITEM (type ref to IF_PURCHASE_REQUISITION_ITEM) & use the method RE_ITEMS-ITEM->IF_ACCT_CONTAINER_MM~GET_ITEMS( ) to get the account assignment details related to each item. This method is to be called in the loop for each line item.
Regards, Vinod
P.S : Is it purchase order or Purchase requisition ? By going through the post it is PR, your subject line seems to be wrong.
Edited by: Vinod Kumar on Jul 15, 2011 2:21 PM
2011 Jul 15 10:08 AM
Hi Vinod,
thanks for your reply. Yes you're right it's for PO, so the BADI name is ME_PROCESS_PO_CUST.
Thanks for the method IF_ACCT_CONTAINER_MM, i'm going to test it.
Cheers
2011 Jul 15 10:50 AM
2019 Sep 05 7:34 AM