Application Development and Automation 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: 
Read only

Function Module to convert currency field.

Former Member
0 Likes
588

Hi,

I have a requirement where in the value of a field called 'rwbtr' in table 'reguh' is to be changed to ****123.4 from 123.4.

In other words, I want to have a function module if any, to convert the spaces of the field to *.I checked the conversion routine tab in the database table but there is no conversion routine associated with it.Please suggest to solve the problem.Its urgent!!

Thanks,

Sandeep.

2 REPLIES 2
Read only

Former Member
0 Likes
421

Hi,

First you can move the field to anoth character field of say length 16.then equate this char field to reguh-rwbtr.Then use translate using the string ' *'.

*

Have a look at the following code. You may copy & see the results.

Tables reguh.
*
DATA: w_x(16),
     w_y(2) value ' *'.
*
Select Single * from reguh
where laufi = 'VIDH1'
and   laufd  = '20010718'.
*
w_x = reguh-rwbtr.
break-point.
Translate w_x using w_y.
break-point.

In select replace hardcoded values so that it will retrieve a record from reguh on your system.

I hope this helps,

Regards

Raju Chitale

Edited by: Raju Chitale on May 7, 2008 11:55 AM

Read only

Former Member
0 Likes
421

Done