‎2006 Sep 11 6:32 AM
have put the folowing code in CHECK Method
METHOD if_ex_me_process_req_cust~check .
*
DATA i_items TYPE mmpur_requisition_items.
DATA: wa_item LIKE LINE OF i_items,
lv_if_item TYPE REF TO if_purchase_requisition_item,
lt_itm_data TYPE mereq_item.
*
break ranjeet.
CALL METHOD im_header->get_items
RECEIVING
re_items = i_items.
LOOP AT i_items INTO wa_item.
lv_if_item = wa_item-item.
CALL METHOD lv_if_item->get_data
RECEIVING
re_data = lt_itm_data.
ENDLOOP.
in the above code i am not able to get the account assgn. details like in PROCESS_ACCOUNT Method how can i do that.
i have to put some conditions combining item details and Account Assignments, same is not possible in PROCESS_ACCOUNT Method as in this i am not able to get Item details as in PROCESS_ITEM and vice versa.
so i want to check condition in CHECK Method.
thanx
abhishek
‎2007 Sep 19 7:38 AM
Hi Abhishek,
in your code lv_if_item is the reference to interface IF_PURCHASE_REQUISITION_ITEM.
You can get the account assignment details using the call to the method
CALL METHOD lv_if_item->if_acct_container_mm~get_items
RECEIVING
re_items = l_account_list.
l_account_list is table type mm_pur_accounting_list. The underlying structure contains reference to IF_ACCOUNTING_MODEL_MM. This interface contains a method get_ekkn. The full coding will be as follows,
data: l_account_list TYPE mmpur_accounting_list,
l_account_line TYPE mmpur_accounting_type,
ls_exkn TYPE exkn,
CALL METHOD lv_if_item->if_acct_container_mm~get_items
RECEIVING
re_items = l_account_list.
CHECK l_account_list IS NOT INITIAL.
LOOP AT l_account_list INTO l_account_line.
CALL METHOD l_account_line-model->get_exkn
RECEIVING
re_exkn = ls_exkn.
ENDLOOP.
Ravi
‎2022 Feb 09 4:36 AM