08-01-2013 8:08 AM
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
09-02-2013 7:27 AM
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.
08-01-2013 8:20 AM
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
08-01-2013 9:58 AM
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
08-01-2013 10:44 AM
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.
09-02-2013 7:27 AM
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.