Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent - Convert 9,999.00 to 9999.00

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

just do a WRITE BSEG-DMBTR TO IN_TAB-VALUE NO-GROUPING.

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

Hi

REPLACE ',' WITH SPACE INTO in_tab-value.

CONDENSE in_tab-value no-gaps.

MOVE in_tab-value to BSEG-DMBTR

Max

Former Member
0 Kudos

Hello,

Do a SPLIT at ',' and then CONCATENATE. This should also solve your problem.

Regards,

0 Kudos

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.

0 Kudos

Please close the post if answered.

Thanks,

Srinivas