10-03-2005 5:09 PM
Hello All,
I am working on a SAPscript and I wrote a perform to do some calculation before passing the values to the form.
I am passing BSEG-DMBTR to in_tab-value which comes in as 9,999.00. Now I need to convert it to 9999.00 and do some calculation:
Can any one tell me how I can convert 9,999.00 to 9999.00
Thanks
Pavan
10-03-2005 5:12 PM
10-03-2005 5:22 PM
Hello Srinivas,
I am doing it this way
write in_tab-value to l_dmbtr1 no-grouping. It doesnt work. Any other suggestion?
Thanks
Pavan
10-03-2005 5:28 PM
You should do a write of BSEG-DMBTR not your internal table field. It will work only with numeric source field and a character target field. If your source field is also character then do this.
translate in_tab-value using ', '.<-- there is a comma and space here
condense in_tab-value no-gaps.
l_dmbtr = in_tab-value.
Srinivas
10-03-2005 5:31 PM
Hi
REPLACE ',' WITH SPACE INTO in_tab-value.
CONDENSE in_tab-value no-gaps.
MOVE in_tab-value to BSEG-DMBTR
Max
10-03-2005 5:37 PM
Hello,
Do a SPLIT at ',' and then CONCATENATE. This should also solve your problem.
Regards,
10-03-2005 6:17 PM
write in_tab-value to l_dmbtr1 no-grouping. It doesnt work. Any other suggestion?
The above statement does not work because the in_tab-value is char and try to use the statement
write <currency Type field> to <char type Field> no-grouping.
I think this should work.
10-03-2005 6:51 PM