‎2008 Aug 07 2:31 PM
Hello
I am using this function module to calculate the difference between the number of days using factory calendar. The function module is working fine but it is not giving the output. It is not generating the result. here is the code for the function module
please can you check and let me know what can be the reason
DATA:
DURATION_F TYPE F.
IF START_DATE IS INITIAL
AND END_DATE IS INITIAL.
MESSAGE E032 RAISING PARAMETERS_NOT_VALID.
Bitte geben Sie ein gültiges Start- und Enddatum an
ENDIF.
IF FLG_UNITS IS INITIAL.
PERFORM TIME_UNITS.
FLG_UNITS = 'X'.
ENDIF.
IF UNIT = SPACE.
UNIT = UNIT_DAY.
ENDIF.
PERFORM DURATION_COMPUTE
USING
START_DATE
START_TIME
END_DATE
END_TIME
FACTORY_CALENDAR
UNIT
CHANGING
DURATION_F
START_DATE
END_DATE
START_TIME
END_TIME.
DURATION = DURATION_F.
ENDFUNCTION.
‎2008 Aug 07 2:40 PM
when calling the function module get the duration field as output
write that output on the list