on 2021 Feb 10 11:53 AM
Dear All,
Can anyone please help me find Open warehouse quantity field while creating a task for an Inbound or an Outbound delivery in EWM.
We have a requirement where we need to display this open quantity in Fiori before creating a task using task creation FM. This quantity is calculated from Open WT and Confirmed WT. I want to know if any standard FM or Class/Method available to get this data for a DocID and ItemID.
Regards
Dharma Tej
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi Dharma,
Please use the below code snippet. I considered inbound delivery and took the open putaway quantity. You can leverage for outbound deliveries as well, just change the service provider reference to /scdl/cl_sp_prd_out and qty_role will be 'PI'. Get source docid and itemids as per your process and populate workarea l_wa_docid.
DATA lo_sp TYPE REF TO /scdl/cl_sp_prd_inb.
DATA: lt_sp_k_item TYPE /scdl/t_sp_k_item_addmeas,
l_wa_sp_k_item TYPE /scdl/s_sp_k_item_addmeas,
lt_a_item_addmeas TYPE /scdl/t_sp_a_item_addmeas,
lv_rejected TYPE boole_d,
lt_return_codes TYPE /scdl/t_sp_return_code.
l_wa_sp_k_item-docid = l_wa_docid-docid.
l_wa_sp_k_item-itemid = l_wa_docid-itemid.
l_wa_sp_k_item-qty_role = 'PU'.
l_wa_sp_k_item-qty_category = 'OPEN'.
APPEND l_wa_sp_k_item TO lt_sp_k_item.
CREATE OBJECT lo_sp.
lo_sp->select( EXPORTING inkeys = lt_sp_k_item
aspect = /scdl/if_sp_c=>sc_asp_item_addmeas
IMPORTING outrecords = lt_a_item_addmeas
rejected = lv_rejected
return_codes = lt_return_codes ).
Thanks
Sunil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dharma,
Please pass quantity role as 'AQ' and keep rest of the code as is and try.
l_wa_sp_k_item-qty_role = 'AQ'.
Regards
Sunil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunil,
Thank you for sharing the code solution! Finally got it working for both Inbound and Outbound.
Regards,
Dharma Tej.
| User | Count |
|---|---|
| 12 | |
| 11 | |
| 8 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.