Application Development 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: 

Get the value of AUFNR in BADI ME_PROCESS_REQ_CUST while creating PR

vinay_pasalkar
Participant
0 Kudos

Hi Experts,

I wanted to modify the MRP controller value based on some of Item values while creating or changing Purchase Requisition.

For this I am using the method - PROCESS_ITEM of BADI - ME_PROCESS_REQ_CUST.

I want to capture the value of Order number ( screen field- COBL-AUFNR) in the this method while PR is getting created.

Could you please let me know how I can capture the value of screen field.

Thanks

Vinay

1 ACCEPTED SOLUTION

vinay_pasalkar
Participant
0 Kudos

I got the answer. You have to call method -

im_item->if_acct_container_mm~get_items in order to get the accounting data & then from that we can get the Order number.

4 REPLIES 4

former_member946717
Contributor
0 Kudos

Hi Vinay,

Since you are using a BADI, you can try this. Check if this field COBL-AUFNR has a value (SET PARAMETER) before you enter the BADI. If it has you can use the below syntax

GET PARAMETER ID 'ANR' FIELD lv_aufnr.

This should help. Let me know if it doesnt

0 Kudos

Hi,

When I checked in debugging even if screen field is mentioned as  COBL-AUFNR in technical help,

Value is shown as blank for the COBL-AUFNR.

So where can I pass the value using SET PARAMETER,

Can we get the value by field catalogue or Using the Import parameter IM_ITEM and IM_REF_ITEM

0 Kudos

Try mentioning AUFNR with respect to any other suitable table as you feel it may contain instead of COBL-AUFNR. Also I think IM_ITEM or IM_REF_ITEM should give you this value but I am not sure how to use...maybe you can browse this site or do a where-used list and check how to use it.

vinay_pasalkar
Participant
0 Kudos

I got the answer. You have to call method -

im_item->if_acct_container_mm~get_items in order to get the accounting data & then from that we can get the Order number.