RKE_SELECT_FACTDAYS_FOR_PERIOD Factory Calendar Day
Calculation of day and average daily stock by shipping factory
data: lt_rke_dat type table of rke_dat.
loop at gt_out assigning field-symbol(<fs_tmp_t070>).
call function 'RKE_SELECT_FACTDAYS_FOR_PERIOD'
exporting
i_datab = sy-datum
i_datbi = <fs_tmp_t070>-endda
i_factid = 'ZX' "Tcode : scal, u can create a calendar there.
tables
eth_dats = lt_rke_dat "All days
exceptions
date_conversion_error = 1
others = 2.
if sy-subrc <> 0.
* Implement suitable error handling here
endif.
<fs_tmp_t070>-stday = lines( lt_rke_dat ).
if <fs_tmp_t070>-stday eq 0.
<fs_tmp_t070>-avgda = <fs_tmp_t070>-menge / 1.
else.
<fs_tmp_t070>-avgda = <fs_tmp_t070>-menge / <fs_tmp_t070>-stday.
endif.
clear: lt_rke_dat[].
endloop.
endform.
Yorumlar
Yorum Gönder