‎2006 Oct 31 8:53 AM
Hi Friends,
I have to change the format in the form
It is displaying in this formart
value = 20.000
data = 20.10.2006
I want to display in this format
value = 20
data = 20/10/2006
Thanx in advance,
Venu
‎2006 Oct 31 8:59 AM
Hope this gives you some idea:
data: l_date(10) type c.
CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'
EXPORTING
INPUT = sy-datum
IMPORTING
OUTPUT = l_date.
write:/ l_date.
Alternatively, you can change the date as
concatenate sy-datum+6(2) sy-datum+4(2) sy-datum(4) into l_date separated by '/'.
write:/ l_date.
data: l_dec(6) type p decimals 2 value 2.
data: l_int type i.
write:/ l_dec.
l_int = l_dec.
write:/ l_int.Kind Regards
Eswar
‎2006 Oct 31 8:56 AM
‎2006 Oct 31 9:09 AM
Hi,
The date format is fine, but I am unable to get the value in the proper format(Ex:20) It is displaying 20.000
Thanx in advance,
Venu
‎2006 Oct 31 9:13 AM
‎2006 Oct 31 9:17 AM
Have you tried moving the value to integer and display the same.
Alternatively, you can use WRITE statement with addition
DECIMALS
<b>write:/ l_dec DECIMALS 0.</b>
Kind Regards
Eswar
‎2006 Oct 31 9:21 AM
as u rewared the point i think ur using sapscript.han use like that.
<b>&value(.0)&</b>
‎2006 Oct 31 8:57 AM
declare
data: value(16) type p.
and for date.
use fm.
<b>CONVERSION_EXIT_PDATE_OUTPUT</b>
or
<b>DATA formatted_text TYPE c LENGTH 50.
WRITE sy-datum TO formatted_text MM/DD/YYYY.</b>
‎2006 Oct 31 8:59 AM
Hope this gives you some idea:
data: l_date(10) type c.
CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'
EXPORTING
INPUT = sy-datum
IMPORTING
OUTPUT = l_date.
write:/ l_date.
Alternatively, you can change the date as
concatenate sy-datum+6(2) sy-datum+4(2) sy-datum(4) into l_date separated by '/'.
write:/ l_date.
data: l_dec(6) type p decimals 2 value 2.
data: l_int type i.
write:/ l_dec.
l_int = l_dec.
write:/ l_int.Kind Regards
Eswar
‎2006 Oct 31 8:59 AM
Hi Venu,
The date format inside the field is always YYYYMMDD.
The default format (for display purpose)is based upon user settings.
If we want in some other format,
then we need to write extra code for it
using OFFSET
eg. mm/dd/yyyy
CONCATENATE MYDATE4(2) '/' MYDATE6(2) '/' MYDATE(4)
INTO DTS.
For 20.000, store this value into a variable which is of Interger Type.
*REWARD for all helpful answers
Message was edited by: Palak Limbachiya