0% found this document useful (0 votes)
121 views4 pages

Timestamp and Picking Method Analysis

The document describes logic for determining bin allocation and checking availability of items in bins. It loops through a list of items, checks if they have a stock GUID, determines the storage type, and either appends the item to a list for picking or logs a message if the available quantity is less than required. Key steps include calling functions for bin determination, querying warehouse data, and logging messages.

Uploaded by

bkpbkpsap01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views4 pages

Timestamp and Picking Method Analysis

The document describes logic for determining bin allocation and checking availability of items in bins. It loops through a list of items, checks if they have a stock GUID, determines the storage type, and either appends the item to a list for picking or logs a message if the available quantity is less than required. Key steps include calling functions for bin determination, querying warehouse data, and logging messages.

Uploaded by

bkpbkpsap01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

/SCWM/SAPLPUT_BIN_DET / /SCWM/LPUT_BIN_DETF26

FORM / BIN_DETERMINATION_2

/SCWM/SAPLL03A / /SCWM/LL03AF0D

FORM / STRATEGIEN

* SOURCE DATA
CALL FUNCTION '/SCWM/REM_BIN_DET_INT'

FUNCTION / /SCWM/REM_BIN_DET_INT

/SCWM/SAPLREM_BIN_DET / /SCWM/LREM_BIN_DETF12

FORM / SRC_BIN_DET

DATA : lv_date TYPE sy-datum,


lv_time TYPE sy-uzeit,
lt_docno TYPE /scwm/dlv_docno_itemno_tab,
ls_docno TYPE /scwm/dlv_docno_itemno_str,
lt_whr_headers TYPE /scwm/dlv_header_out_prd_tab,
ls_whr_headers TYPE /scwm/dlv_header_out_prd_str,
lt_whr_items TYPE /scwm/dlv_item_out_prd_tab,
ls_whr_items TYPE /scwm/dlv_item_out_prd_str,
ls_val_num TYPE /scwm/dl_chval_num_str,
lc_operator TYPE /scwm/dl_chval_num_str-value_relation,
ls_include_data TYPE /scwm/dlv_query_incl_str_prd,
ls_read_options TYPE /scwm/dlv_query_contr_str,
lfl_highest TYPE /scwm/dl_chval_num_str-value_from,
lt_return TYPE bapirettab,
lobj_log TYPE REF TO /scwm/cl_log,
ls_custo TYPE zcorin04400,
ls_qmat TYPE /scwm/s_aqua_int,
ln_tmplt TYPE /scwm/wavehdr-tmplt,
ldec_comp_dt TYPE /scwm/wavehdr-load_comp_dt,
ld_date TYPE sydatum,
ls_dates TYPE /scdl/dl_date_str,
lti_time TYPE syuzeit,
lts_time(8) TYPE p,
lv_ts TYPE timestampl,
ln_replen TYPE /sapapo/matlwh-zzdays_replen,
lraw_scuguid TYPE /scwm/t300_md-scuguid,
lraw_entitled TYPE but000-partner_guid,
ln_days_max TYPE /sapapo/matlwh-zzdays_max,
lc_docno TYPE /scwm/waveitm-docno,
ln_itemno TYPE /scwm/waveitm-itemno,
lc_matnr_22 TYPE /sapapo/matid,
lv_msgv1 TYPE symsgv,
lc_msgv1 TYPE symsgv,
lc_msgv2 TYPE symsgv,
lc_msgv3 TYPE symsgv,
lc_msgv4 TYPE symsgv,
lc_matid TYPE symsgv,
fl_query_made TYPE char1,
lt_zto001 TYPE TABLE OF zto001ewm,
ls_zto001 TYPE zto001ewm,
lc_act_type TYPE /scwm/lagps-act_type,
ls_quan TYPE /scwm/quan,
lt_waveitm TYPE TABLE OF /scwm/waveitm,
ls_waveitm TYPE /scwm/waveitm,
ls_zscwm_pipa_instr TYPE zscwm_pipa_instr,
ls_whr_hdr TYPE /scwm/dlv_header_out_prd_str,
ls_partyloc TYPE /scdl/dl_partyloc_str,
lt_maturation TYPE tt_maturation,
lt_zscwm_pipa_instr TYPE TABLE OF zscwm_pipa_instr.

DATA ls_mat_uom TYPE /scwm/s_material_uom.

FIELD-SYMBOLS:
<ls_maturation> TYPE ty_maturation.

* Apply result
ev_set = 'X'.

et_qmat_cus = it_qmat.

BREAK-POINT ID z_warehouse_task.

* Get customizing

SELECT SINGLE * INTO ls_custo FROM zewm0001


WHERE gap = FITGAPE002

AND lgnum = is_ltap-lgnum


AND entitled = is_ltap-entitled
AND BLOCK (BULK ITEM) = From Product master BULK ITEM.

CHECK sy-subrc IS INITIAL.

CLEAR et_qmat_cus.

* LOG
CALL FUNCTION '/SCWM/TO_LOG_GET_INSTANCE'
EXPORTING
iv_lgnum = is_ltap-lgnum
IMPORTING
eo_prot = lobj_log.
IF lobj_log IS NOT BOUND.
CREATE OBJECT lobj_log
EXPORTING
iv_nolog = space
iv_created_date = sy-datum
iv_created_time = sy-uzeit
iv_lgnum = is_ltap-lgnum.
* iv_balobj = '' See table BALOBJ
* iv_balsubobj = ''.
ENDIF.

CLEAR lc_matnr_22.
CALL FUNCTION 'GUID_CONVERT'
EXPORTING
iv_guid_x16 = is_ltap-matid
IMPORTING
ev_guid_c22 = lc_matnr_22
EXCEPTIONS
no_unicode_support_yet = 1
parameters_error = 2
OTHERS = 3.
IF sy-subrc IS NOT INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_MDLPD_OUTPUT'
EXPORTING
input = ls_qmat-matid
IMPORTING
output = lc_matid.

TRY.
CALL FUNCTION '/SCWM/WHR_QUERY'
EXPORTING
it_docno = lt_docno
iv_doccat_whr = 'PDO'
is_read_options = ls_read_options
* is_exclude_data = ls_exclude_data
is_include_data = ls_include_data
IMPORTING
et_whr_items = lt_whr_items
et_whr_headers = lt_whr_headers
et_return = lt_return.
CATCH /scdl/cx_delivery.
ENDTRY.

LOOP AT it_qmat INTO ls_qmat.

Compare required quantity and available quantity in Pallet.

If ls_qmat-GUID_STOCK is intial

APPEND ls_qmat TO et_qmat_cus.


elseif

Determine storage type is reserve storage type or picking storage type.

If picking storage type then

APPEND ls_qmat TO et_qmat_cus.

Elseif  storage type is reserve bin


IF IV_ANFML < ls_qmat-QUAN

In this case no need to append this line into et_qmat_cus and


same time need to display in the log.
CALL METHOD lobj_log->add_message
EXPORTING
ip_msgty = 'W' " lobj_log->msgty_info
ip_msgid = 'ZEWM'
ip_msgno = '001'
ip_msgv1 = lc_msgv1
ip_msgv2 = lc_msgv2
ip_msgv3 = lc_msgv3.
ip_msgv4 = lc_msgv4.
* ip_msg =
* ip_param =
* ip_row =
* ip_field =.
CONTINUE.
HU nb° &1 in bin &2 removed, quantity &3 is less required quantity
&4.

* Information Message
CALL FUNCTION 'CONVERSION_EXIT_HUID_OUTPUT'
EXPORTING
input = ls_qmat-huident
IMPORTING
output = lc_msgv1.
lc_msgv2 = ls_qmat-lgpla.

endif
ENDLOOP.

You might also like