Welcome To SAPEWM HELP
Ask questions and get real answers from real Experts. Get instant solutions for your SAP Extended Warehouse Management ABAP FICO BASIS and other Modules challenges. Experts from SAP community will help you resolve you issues, optimize processes, and provide guidance.
Create A New AccountOur Statistics
- Questions 274
- Answers 49
- Best Answers 0
- Users 22
Function module/BAPI/Class for Cancel pick in SAP EWM
Try following code, It will work FUNCTION zewm_f_cancel_pick. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IV_LGNUM) TYPE /SCWM/LGNUM *" VALUE(IT_DOCID) TYPE /SCWM/DLV_DOCID_ITEM_TAB *" VALUE(IV_QNAME) TYPE TRFCQNAM *"-----------Read more
Try following code, It will work
FUNCTION zewm_f_cancel_pick.
*”———————————————————————-
*”*”Local Interface:
*” IMPORTING
*” VALUE(IV_LGNUM) TYPE /SCWM/LGNUM
*” VALUE(IT_DOCID) TYPE /SCWM/DLV_DOCID_ITEM_TAB
*” VALUE(IV_QNAME) TYPE TRFCQNAM
*”———————————————————————-
WAIT UP TO 2 SECONDS.
DATA: lo_hu_mon TYPE REF TO zcl_ewm_cancpick_mon.
DATA: lv_noexecute TYPE sy-input.
DATA: lt_ret TYPE bapirettab.
DATA: lv_msg TYPE msgtx.
*–Append message for queue start
MESSAGE s171 INTO lv_msg.
PERFORM add_message TABLES lt_ret
USING lv_msg.
*–Get HU List
TRY.
DATA(lo_dlv) = /scwm/cl_dlv_management_prd=>get_instance( ).
DATA(ls_read_options) = VALUE /scwm/dlv_query_contr_str( data_retrival_only = abap_true ). “lock_result = abap_true
DATA(ls_include) = VALUE /scwm/dlv_query_incl_str_prd( head_status = abap_true ).
lo_dlv->query(
EXPORTING
iv_doccat = /scdl/if_dl_c=>sc_doccat_out_prd
it_docid = it_docid
is_read_options = ls_read_options
is_include_data = ls_include
IMPORTING
et_headers = DATA(lt_headers)
et_hu_headers = DATA(lt_hu_headers)
et_hu_items = DATA(lt_hu_items)
eo_message = DATA(lo_message) ).
CATCH /scdl/cx_delivery INTO DATA(lx_dlv).
ENDTRY.
*–Cancelpick Delivery
lo_hu_mon = zcl_ewm_cancpick_mon=>get_instance( ).
lo_hu_mon->/scwm/if_mon_hu~cancel_hu_pick(
EXPORTING
iv_lgnum = iv_lgnum
it_data = lt_hu_headers
).
DATA(lt_return) = lo_hu_mon->get_message( ).
*–Append message for queue ending
MESSAGE s172 INTO lv_msg.
PERFORM add_message TABLES lt_ret
USING lv_msg.
*–form return table for the queue
IF lt_ret[] IS NOT INITIAL.
APPEND LINES OF lt_ret TO lt_return.
ENDIF.
IF VALUE #( lt_return[ type = ‘E’ ]-type OPTIONAL ) = ‘E’.
/spe/cl_qrfc_services=>end_queue_processing(
EXPORTING
it_message = lt_return ” Table with BAPI Return Information
).
ENDIF.
/spe/cl_qrfc_services=>end_queue_processing(
EXPORTING
it_message = lt_return ” Table with BAPI Return Information
).
*create Queue FM for update
CALL FUNCTION ‘TRFC_SET_QIN_PROPERTIES’
EXPORTING
qin_name = iv_qname
no_execute = lv_noexecute
EXCEPTIONS
invalid_queue_name = 1
OTHERS = 2.
CALL FUNCTION ‘ZEWM_F_CANCEL_PICK_MOVE’
IN BACKGROUND TASK AS SEPARATE UNIT
DESTINATION ‘NONE’
EXPORTING
iv_lgnum = iv_lgnum
it_hu_hdr = lt_hu_headers
it_hu_itm = lt_hu_items.
COMMIT WORK AND WAIT.
/spe/cl_qrfc_services=>end_queue_processing(
See lessEXPORTING
it_message = lt_return ” Table with BAPI Return Information
).
ENDFUNCTION.
How to Pallet Packing in SAP ECC
How to Do Pallet Packing in SAP ECC (Nesting an Outer Box HU into a Pallet HU) Question I need to pack an already-built outer box (a lower-level Handling Unit) onto a pallet HU in SAP ECC using standard function modules. What's the correct sequence, and how do I build the packing request so the boxRead more
How to Do Pallet Packing in SAP ECC (Nesting an Outer Box HU into a Pallet HU)
Question
I need to pack an already-built outer box (a lower-level Handling Unit) onto a pallet HU in SAP ECC using standard function modules. What’s the correct sequence, and how do I build the packing request so the box gets nested inside the pallet? Below is the approach I used.
Answer
The concept here is HU nesting — like Russian nesting dolls: the product sits in a box, and that box (the outer box HU) sits on a pallet (the pallet HU). This routine performs one nesting step: placing the outer box into the pallet.
The key is to follow the standard sequence in order — Refresh → Get/Lock HUs → Pack → Post. Skipping any step (especially the refresh or the lock) is the usual cause of packing that “works once then silently fails.”
Building the packing request (
ls_pack_req):venum/exidv→ the target pallet HU (what you pack into)sub_hu_venum/sub_hu_exidv→ the content outer box HU (what gets packed)pagew→ weight,veanz = 1→ one unit,velin = 3→ item category for HU-in-HU (packing a whole HU, not loose material)The four SAP standard function modules used:
HU_PACKING_REFRESHHU_GET_HUSHU_PACKING_AND_UNPACKINGHU_POST(if_commit = 'X')After each call,
sy-subrcis checked. On failure, the SAP message is captured into the status field and the routine exits; on success, the record is stamped with status, date, time, and user.Code
What is the use of SAP Cloud Connector in SAP BTP, and how do you set it up step by step?
Was just browsing sapewmhelp.com and was impressed the layout. Nicely design and great user experience. Just had to drop a message, have a great day! we7f8sd82
Was just browsing sapewmhelp.com and was impressed the layout. Nicely design and great user experience. Just had to drop a message, have a great day! we7f8sd82
See lessWhy Is Warehouse Task Not Getting Created Automatically in SAP EWM?
If warehouse tasks (WT) are not getting created automatically in SAP EWM, it usually means there is an issue with configuration, master data, or process determination. Even if the delivery is created, EWM will only create WT when all required settings are correct. Step-by-Step Troubleshooting StepRead more
How to Fix qRFC Queue Errors Blocking Inbound Delivery Processing in SAP EWM?
qRFC queue errors are one of the most common issues in SAP EWM, and they can block inbound delivery processing completely.If queues are stuck in SMQ2, it usually means something failed during data transfer between S/4HANA and EWM. Step-by-Step Troubleshooting Step 1: Check the Queue Error (Most ImpRead more
How to Use /SCWM/MON for Troubleshooting Issues in SAP EWM Step-by-Step?
Transaction /SCWM/MON (EWM Monitor) is one of the most powerful tools in SAP EWM for troubleshooting warehouse issues quickly.If used correctly, it can help you identify problems in minutes instead of hours. Step-by-Step Guide to Use /SCWM/MON Step 1: Open Monitor Go to: /SCWM/MON Enter your WarehoRead more
See lessWhy Is Outbound Delivery Not Getting Distributed from S/4HANA to SAP EWM?
This is a very common issue in SAP EWM where outbound delivery is created in S/4HANA but not visible in EWM.In most cases, the problem is related to queues, integration, or missing master data. Step-by-Step Troubleshooting (Easy Way) Step 1: Check Queue (Most Important) Go to: SMQ1 (Outbound QueueRead more
See lessHow to Configure Warehouse Order Creation Rules (WOCR) in SAP EWM Step-by-Step?
Warehouse Order Creation Rules (WOCR) play a critical role in SAP EWM as they control how warehouse tasks (WT) are grouped into warehouse orders (WO) for execution. If WOCR is not configured correctly, warehouse orders may not be created as expected. Step-by-Step Configuration of WOCR 🔹 1. Define WRead more