這是自已編寫運算有28 29 30 31的天數月份不易計算
此時可以呼叫一個Function來達成
CALL FUNCTION 'DAY_IN_WEEK'
EXPORTING
datum = sy-datum
IMPORTING
WOTNR = c.
CALL FUNCTION 'DAY_IN_WEEK'
EXPORTING
datum = sy-datum
IMPORTING
WOTNR = c.
*&---------------------------------------------------------------------*
*& Form GET_CURRENCY
*&---------------------------------------------------------------------*
FORM GET_CURRENCY USING P_WAERS
CHANGING P_FACTOR.
CALL FUNCTION 'CURRENCY_CONVERTING_FACTOR'
EXPORTING
CURRENCY = P_WAERS
IMPORTING
FACTOR = P_FACTOR
EXCEPTIONS
TOO_MANY_DECIMALS = 1
OTHERS = 2.
ENDFORM. " GET_CURRENCY
CALL FUNCTION 'MURC_ALL_BATCH_FACTORS_NEW'
EXPORTING
if_matnr = mkopf-matnr
IF_KZDCH = chargen_ebene
IF_MEINS = mkopf-basme
if_meinh = if_meinh1
tables
it_sel_charg = ms_charg_bestand[]
it_sel_werks = ms_werks_bestand[]
it_mcha_objek = gt_mcha_objek
it_mch1_objek = gt_mch1_objek
it_objek = gt_objek
et_conv_tab = lt_conv_tab
EXCEPTIONS
NOT_FOUND = 1
NO_BATCH_CONVERSION = 2
OTHERS = 3.