cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

EWM Cancel picking

Former Member
0 Likes
4,689

Hi,

I want to do the cancel picking and create WT for each and every product that is picked. Following is the situation :

1) All the products are kept in HU.

2) So the picking is done from HU and putback (cancel picking) should also be through HU

3 )There are comlete HU picking and partial HU picking

4) In case of partial Hu picking, anotehr HU is created which takes multiple products.

5) We also want to have one click transaction so while unpacking the Hu with multiple prodcuts all teh prodcuts should be packed in different Hus as we have packing specifications created for each product.

6) Completely picked HU should be directed to a bin automatically.

One delivery has 300-400 line items. So we need this automation so in case of cancel picking we should not work on it manually.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member479886
Discoverer

/SCWM/CANCPICK

I created a test program that will release stock for ODO after Picking Completed flag is set.


*&---------------------------------------------------------------------*
*& Report ZRELEASE_STOCK
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
report zrelease_stock.

* Local Data

data: lt_key_dlv type standard table of /scwm/s_aspk_dlv_cancpick,
      ls_key_dlv type /scwm/s_aspk_dlv_cancpick.

data: gx_cancpick    type ref to /scwm/cl_cancpick_sp,
      gv_rejected    type boole_d,
      gs_inparam     type /scwm/s_sp_q_cancpick,
      gs_val_def     type /scmb/s_default_values_det,
      gt_val_defs    type /scmb/t_default_values_det,
      gx_attr_hndler type ref to /scmb/cl_attribute_handler,
      gx_msg_hndler  type ref to /scmb/cl_message_handler.

parameters: p_docno  type /scdl/db_proci_o-docno obligatory.

data: wa_docid type /scdl/db_proch_o-docid,
      wa_lgnum type /scwm/lgnum.

data pt_data type /scdl/db_proci_o occurs 0.
data: ls_data type /scdl/db_proci_o.

start-of-selection.


  clear:  gs_val_def.

  gs_val_def-v_fieldname    = 'LGNUM'.
  gs_val_def-v_mandatory    = abap_true.
  gs_val_def-v_memoryid     = '/SCWM/LGN'.
  gs_val_def-v_checkbox     = abap_false.
  gs_val_def-v_no_dropdown  = abap_true.
  append gs_val_def to gt_val_defs.

  /scmb/cl_ees_defaults=>init( iv_identifier        = '/SCWM/CANCPICK'
                               iv_values_structure  = '/SCWM/S_SP_DEFAULT_CANCPICK'
                               iv_extended          = abap_true
                               it_values_definition = gt_val_defs                   ).

  create object gx_attr_hndler.
  create object gx_msg_hndler.
  create object gx_cancpick
    exporting
      io_attribute_handler = gx_attr_hndler
      io_message_handler   = gx_msg_hndler.

  clear:  gs_inparam.
  gs_inparam-docno_h = p_docno.

  clear ls_key_dlv.
* Get ODO Item Data
  refresh pt_data.
  select * into table pt_data
    from /scdl/db_proci_o
    where docno = p_docno.
  if not pt_data[] is initial.
    loop at pt_data into ls_data
      where itemtype = 'OBSP'.
      move-corresponding ls_data to ls_key_dlv.
      append ls_key_dlv to lt_key_dlv.
    endloop.

    gx_cancpick->/scmb/if_sp_transaction~cleanup( /scmb/if_sp_transaction=>sc_cleanup_end ).
    gx_cancpick->/scmb/if_sp_query~execute( exporting inparam = gs_inparam
                                                      query   = /scwm/if_sp_cancpick_c=>sc_qry_cancpick_item ).
    gx_cancpick->/scmb/if_sp_action~execute( exporting  aspect = /scwm/if_sp_cancpick_c=>sc_asp_item
                                                        inkeys = lt_key_dlv
                                                        action = /scwm/if_sp_cancpick_c=>sc_act_unassign_stock ).

    gx_cancpick->/scmb/if_sp_transaction~save( exporting  synchronously = abap_false
                                               importing  rejected      = gv_rejected ).

    case gv_rejected.
      when abap_false.
        commit work and wait.
        gx_cancpick->/scmb/if_sp_transaction~cleanup( /scmb/if_sp_transaction=>sc_cleanup_commit ).
      when abap_true.
        rollback work.
        gx_cancpick->/scmb/if_sp_transaction~cleanup( /scmb/if_sp_transaction=>sc_cleanup_commit ).
      when others.
    endcase.
  endif.
sushant_wanjari
Contributor
0 Likes

Hi Pankaj,

Looking at your requirement, it looks you need a custom solution to have automation in place.

standard method would be to use /SCWM/CANCPICK and then use the 'Release + HUWT foreground' button to direct the single pallet to a full pallet location and the mixed pallet to repack work center. You can then unpack the mixed pallet and create a new pallet for each material and then do the putaway.

For your automated solution, there are standard FM's available to suggest the putaway bin based on the PACI.

regards,

Sushant