Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ME_PROCESS_REQ_CUST~CHECK

saranwin
Contributor
0 Likes
3,724

Hi,

How to get Account assignemnt (EXKN) values in method CHECK for PR Line item to validate based on the line item values.

BADI: ME_PROCESS_REQ_CUST

METHOD: CHECK

Thanks,

Saran

3 REPLIES 3
Read only

Former Member
0 Likes
1,653

Hi,

The method parameter has a reference to the requisition header im_header. You can use the method get_items method , which will return a table with refernce to all the items in the requisition ( re_items ). Now use the get_items method of this reference to get the account assignment objects.


data lto_items type mmpur_requisition_items
data l_item type mmpur_requisition_item .

data lto_items_accounting_list type mmpur_accounting_list.
data l_acc_item type mmpur_accounting_type.
data lre_exkn type exkn.
 
lto_items = im_header->get_items( ).   "Get PR items

loop at lto_items into l_item_ref.  " Loop at each item
 lto_items_accounting_list  =  l_item_ref-item->get_items( ).  " This will get the account assignment reference.
  loop at lto_items_accounting_list  into l_acc_item.        " Loop at account assignment objects 
    lre_exkn =  l_acc_item-model->get_exkn( ).   " Get the EXKN structure.
  endloop.
endloop.

Hope this helps.

Br,

Advait

Read only

0 Likes
1,653

Thanks. it's helped me to solve my issue.

Read only

diego_pinel
Explorer
0 Likes
1,653

Great help!

Thank you so much!!!