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: 

conversion

Former Member
0 Kudos
69

hello gurus ,

hw can I convert 20,00- into 2.0 % its urjent .

thanks in advance .

1 ACCEPTED SOLUTION

Former Member
0 Kudos
45

try this..

DATA: lv_qty TYPE ekpo-menge.

DATA: lv_text(20) TYPE c.

lv_qty = '2000-'.

lv_qty = lv_qty / 1000 * 1.

MOVE lv_qty TO lv_text.

replace '-' with '%' into lv_text.

WRITE: lv_text.

2 REPLIES 2

Former Member
0 Kudos
45

Hi Joy,

You can achive do this with the help of coding.I can tell you the steps.

Eg : You first divide your no by 100.

Then take that no in a character string, decide the length of the string acc to your requirement.

Then use SEARCH STRING command to search for '-' sign and replace this with Space.

Then concatenate '%' with your charcter string.

Rewards Points if helpful.

Regards

Sourabh Verma

Former Member
0 Kudos
46

try this..

DATA: lv_qty TYPE ekpo-menge.

DATA: lv_text(20) TYPE c.

lv_qty = '2000-'.

lv_qty = lv_qty / 1000 * 1.

MOVE lv_qty TO lv_text.

replace '-' with '%' into lv_text.

WRITE: lv_text.