‎2008 Nov 25 9:11 AM
hi
how can we convert from packed to time format.
for ex: 5.83(packed) = 05:50 (hh:mm)
Thanks,
‎2008 Nov 25 9:34 AM
Hello Sami,
Plz try this bit of code:
DATA:
V_TIME1 TYPE P DECIMALS 2 VALUE '5.83',
V_TIME2 TYPE CHAR7,
V_MINS TYPE I.
V_MINS = V_TIME1 * 60.
CALL FUNCTION 'CONVERSION_EXIT_SDURA_OUTPUT'
EXPORTING
INPUT = V_MINS
IMPORTING
OUTPUT = V_TIME2.
CLEAR V_MINS.
‎2008 Nov 25 9:34 AM
Hello Sami,
Plz try this bit of code:
DATA:
V_TIME1 TYPE P DECIMALS 2 VALUE '5.83',
V_TIME2 TYPE CHAR7,
V_MINS TYPE I.
V_MINS = V_TIME1 * 60.
CALL FUNCTION 'CONVERSION_EXIT_SDURA_OUTPUT'
EXPORTING
INPUT = V_MINS
IMPORTING
OUTPUT = V_TIME2.
CLEAR V_MINS.
‎2008 Nov 25 11:02 AM
Thanks ,
but the output was in char format but i want in time format.
‎2008 Nov 25 11:16 AM
Hey Sami,
Did you check the output after the Conv. Exit call. Plz check & see. Its in HH:MM format )
BR,
Suhas
‎2008 Nov 25 11:26 AM
Dear,
I check it when we execute it shoes time format but my requirement is to store in a ztable,when we stored in ztable it gives problem.
‎2008 Nov 25 11:30 AM
Hello Sami,
Wat is the data element for the TIME field in the Z-Table. Try to format the time from the Conv. Routine to that value & then store in Z-Table.
BR,
Suhas
‎2008 Nov 25 11:31 AM
Hi Ali,
Declare the variable type as sy-uzeit.
Hope this will work.
Regards,
Nitin.