cancel
Showing results for 
Search instead for 
Did you mean: 

/SCWM/TO_CREATE_WHR Create Putaway Warehouse Task for inbound delivery

Fanuel
Discoverer
279

Hi Experts, 

I have a problem when using FM /SCWM/TO_CREATE_WHR for creating Putaway warehouse task. 

Scenario is like below

  1. There's an inbound delivery which has 1 item but this item is packed in the >1 HU (in my case, there're 2 HUs, each HU stored in the different Bin and there's a rule that 1 Bin couldn't have more than 1 HU).

  2. I only filled this 6 parameters to IT_CREATE_WHR. This is working fine for 1 HU for 1 delivery.  

 

<ls_create_whr_putaway>-rdoccat "(Inbound Delivery Doc Cat)
<ls_create_whr_putaway>-rdocid  "(Inbound Delivery Doc ID)
<ls_create_whr_putaway>-ritmid  "(Inbound Delivery Item ID)

<ls_create_whr_putaway>-nlpla   "(Target S.Bin)
<ls_create_whr_putaway>-nltyp   "(Target S.Type)
<ls_create_whr_putaway>-nlber  ​ "(Target HU)

CALL FUNCTION '/SCWM/TO_CREATE_WHR'
  EXPORTING
    iv_lgnum       = '0100'
    iv_process     = wmegc_whr_proc_pu
    iv_to_init     = 'X'
    iv_bname       = sy-uname
    it_create_whr  = lt_create_putaway_single
    iv_update_task = ' '
    iv_commit_work = abap_true
  IMPORTING
    ev_tanum       = lv_wt_result
    et_ltap_vb     = lt_ltap_vb
    et_bapiret     = lt_bapiret
    ev_severity    = lv_severity.

 

However, it doesn't worked for the case which 1 delivery item has more than 1 HU, which each HU has stored in the different bin.


The error is:
No mixed storage permitted in storage type WH00. Maximum 1 HU per bin.

  • I've check the selected bin that passed to the FM are empty.

anyone have an idea which parameter that I might need to maintain, in order to create a putaway warehouse task for each HU?

Thanks!
Fanuel

View Entire Topic
FlorianMann
Discoverer
0 Kudos

Hi Fanuel,

this must have something to do with the storage type customizing SPRO -> EWM -> Master Data -> Define storage type 

FlorianMann_0-1739264320040.png

I think in your storage type WH00 is mixed stock not allowed on one bin.

What is the result if you leave <ls_create_whr_putaway>-nlber empty? Would the system find another bin? 

 

Regards

Florian 

 

Fanuel
Discoverer
0 Kudos

Hi Florian, Thanks for your reply.

Yes, the Storage Type is mean to be only have 1 HU. 

for my case which 1 delivery item has 2 HU, i did Loop the HU, then for each HU i assigned to the different Warehouse Type, and Storage Bin. which I did have 1 internal table with 2 lines.

  • Both line have same information on DOCCAT, DOCID, ITEMID from inbound delivery
  • Each line have each unique HU, S. Type, S. Bin.

 to be more clear, below is the code inside the loop

 

LOOP AT lt_delivery_hu_data INTO ls_delivery. 
   APPEND INITIAL LINE TO lt_create_putaway_single ASSIGNING FIELD-SYMBOL(<ls_create_whr_putaway>).
   <ls_create_whr_putaway>-rdoccat = ls_delviery-doccat. "(Inbound Delivery Doc Cat)
   <ls_create_whr_putaway>-rdocid  = ls_delivery-docid. "(Inbound Delivery Doc ID)
   <ls_create_whr_putaway>-ritmid  = ls_delivery-itemid. "(Inbound Delivery Item ID)

   <ls_create_whr_putaway>-nlpla   = ls_delivery-lgpla.   "(Target S.Bin)
   <ls_create_whr_putaway>-nltyp   = ls_delivery-lgtyp.   "(Target S.Type)
   <ls_create_whr_putaway>-nlber  ​ = ls_delivery-huident. "(Target HU)

   CALL FUNCTION '/SCWM/TO_CREATE_WHR'
     EXPORTING
       iv_lgnum       = is_data_to_process-lgnum
       iv_process     = wmegc_whr_proc_pu
       iv_to_init     = 'X'
       iv_bname       = sy-uname
       it_create_whr  = lt_create_putaway_single
       iv_update_task = ' '
       iv_commit_work = lv_commit
     IMPORTING
        ev_tanum       = lv_wt_result
        et_ltap_vb     = lt_ltap_vb
        et_bapiret     = lt_bapiret
        ev_severity    = lv_severity
ENDLOOP.

 

My aim is to create a single putaway warehouse task for each HU, is that the correct approach?
or Should I remove the Target S.Bin, S. Type and HU from the parameters so the system will determine itself?