on ‎2018 Mar 28 11:26 AM
Request clarification before answering.
Finally I have resolved on my own. My system is S/4 Hana system. Hence both ERP and EWM are in the one system. Here is the solution.
Once the Warehouse task is created, we need to confirm the warehouse task. While confirming the task, Picking and packing will be happened at the same time. If you need any reference, check this class /SCWM/CL_SIM_ODLV_RT_DLV_I ->ACTION_CONFIRM_PICK.
The logic is as follows.

FUNCTION zscwm_who_confirm.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(IV_LGNUM) TYPE CHAR4
*" VALUE(IV_TANUM) TYPE /SCWM/TANUM
*" VALUE(IV_WHO) TYPE CHAR10
*" EXPORTING
*" VALUE(ET_LTAP_VB) TYPE /SCWM/TT_LTAP_VB
*" VALUE(ET_BAPIRET) TYPE BAPIRETTAB
*"----------------------------------------------------------------------
DATA :lv_who TYPE /scwm/de_who,
lv_lgnum TYPE /scwm/lgnum,
ls_ordim_o TYPE /scwm/ordim_o,
lt_conf TYPE /scwm/to_conf_tt,
ls_conf TYPE /scwm/to_conf,
lt_ltap_vb TYPE /scwm/tt_ltap_vb,
lv_tanum TYPE /scwm/tanum.
lv_who = iv_who.
lv_lgnum = iv_lgnum.
lv_tanum = iv_tanum.
*To fetch the status Open Warehouse Orders
SELECT SINGLE *
FROM /scwm/ordim_o
INTO ls_ordim_o
WHERE lgnum = lv_lgnum
AND tanum = lv_tanum
AND tostat = ' '
AND who = lv_who.
IF ls_ordim_o IS NOT INITIAL.
MOVE-CORRESPONDING ls_ordim_o TO ls_conf.
ls_conf-squit = abap_true. "Confirm
APPEND ls_conf TO lt_conf.
CALL FUNCTION '/SCWM/TO_CONFIRM'
EXPORTING
iv_lgnum = lv_lgnum
* IV_SUBST = ' '
iv_qname = sy-uname
* IV_CRETO = ' '
* IV_WTCODE =
* IV_UPDATE_TASK = 'X'
* IV_COMMIT_WORK = 'X'
* IV_PROCESSOR_DET = ' '
it_conf = lt_conf
* IT_CONF_EXC =
* IT_CONF_SERID =
IMPORTING
et_ltap_vb = lt_ltap_vb
et_bapiret = et_bapiret.
ENDIF.
ENDFUNCTION.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saran,
It is highly recommended not to use SELECT QUERY directly on these standard tables. Instead you can use the function modules /SCWM/TO_READ_SINGLE(for reading single warehouse task) /SCWM/TO_READ_MULT(for reading multiple warehouse tasks). The same WHO input can be provided.
Regards,
Aswath.
Hi Aswath,
Thanks for your suggestion. I'll use the mentioned FM's as per suggested by you.
Thanks,
Saran.
Hi Marco,
Based on my requirement I have passed only the required fields at that time. Now that requirement was finished long back and I cannot check the coding also.
Regards,
Saran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saran,
You allready solve your question however,
You can use FM /SCWM/TO_CONFIRM for confirming warehouse task.
And than you can Pack after confirming your warehouse task. using FM: /SCWM/TO_CREATE_MOVE_HU
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Saran,
when you confirm the warehouse task and pack the stock that you picked in those warehouse tasks, the status of the outbound delivery order (/SCWM/PRDO) gets updates automatically. There is no other c´mechanism to change those status values.
Regards,
Katrin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 16 | |
| 6 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 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.