2007 Aug 07 4:22 PM
Hi All,
I have created one screen on which with one Input/Output field, I am
displaying the Amount (Bseg-wrbtr).
But I need to dispaly this amount using the folowing formats based on user setting.
If USR01-DCPFM = 'X'
then display Bseg-wrbtr in 1,234,567.89 format
elseif USR01-DCPFM = 'Y'
then display Bseg-wrbtr in 1 234 567,89 format
elseif USR01-DCPFM = BLANK
display Bseg-wrbtr in 1.234.567,89 format
endif.
I have issue that how to convert my Amount in different formats.
Is there a standard Fun Mod whom I pass the Amount and USR01-DCPFM value,
so that it can convert the Amount in required format.
Currently Amount is coming as 486956380.60.
I need to format this amount to different formats based on condition.
Please guide soon.
Hi All,
I have created one screen on which with one Input/Output field, I am
displaying the Amount (Bseg-wrbtr).
But I need to dispaly this amount using the folowing formats based on user setting.
If USR01-DCPFM = 'X'
then display Bseg-wrbtr in 1,234,567.89 format
elseif USR01-DCPFM = 'Y'
then display Bseg-wrbtr in 1 234 567,89 format
elseif USR01-DCPFM = BLANK
display Bseg-wrbtr in 1.234.567,89 format
endif.
I have issue that how to convert my Amount in different formats.
Is there a standard Fun Mod whom I pass the Amount and USR01-DCPFM value,
so that it can convert the Amount in required format.
Currently Amount is coming as 486956380.60.
I need to format this amount to different formats based on condition.
Please guide soon.
2007 Aug 07 4:35 PM
DATA: lc_wrbtr(16) TYPE c.
WRITE Bseg-wrbtr to lc_wrbtr.
Regards.
2007 Aug 07 4:41 PM
HI,
Take a Decimal variable
data : v_curr type p decimals 2.
v_curr = '486956380.60'
If USR01-DCPFM = 'X'
then display Bseg-wrbtr in 1,234,567.89 " No Conversion is requried taken care automatically
elseif USR01-DCPFM = 'Y'
replace ',' with space into v_curr.
replace '.' with ',' into v_curr.
then display Bseg-wrbtr in 1 234 567,89 format
elseif USR01-DCPFM = BLANK
replace '.' with '#' into v_curr.
replace ',' with '.' into v_curr.
replace '#' with ',' into v_curr
display Bseg-wrbtr in 1.234.567,89 format
endif.
Thanks,
Mahesh
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |