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

conversion

Former Member
0 Kudos
125

hello gurus ,

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

thanks in advance .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
101

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
Read only

Former Member
0 Kudos
101

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

Read only

Former Member
0 Kudos
102

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.