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

String Manipulation - Finding and Getting Text

Former Member
0 Likes
453

I have two tasks to do:

1. "NINE HUNDRED EIGHTY-NINE Rupees NINETY Paise" --> what I want to do is find "Rupees" from the text and delete starting from "Rupees" until the end of the text.

2. "989.90" ---> I want to find the position of "." and get everything beyond that point so i can get just "90"

Thanks! Credits will be given

3 REPLIES 3
Read only

Former Member
0 Likes
420

Hi Jill,

Try this.....

data: rs(100) type c,

rs1(100),

ps1(100).

rs = 'NINE HUNDRED EIGHTY-NINE Rupees NINETY Paise'.

SPLIT rs AT 'Rupees' into rs1 ps1.

write: rs1.

**Reward if useful

Regards,

Archana

Read only

0 Likes
420

thanks this worked!

Read only

former_member195698
Active Contributor
0 Likes
420

Try this.

1) Use the Keyword Search. It will give you the position of the required word in SY-FDPOS.

data:wf(100) type c.

wf = 'eight hundred fifty rupee five paisa'.

search wf for 'rupee'.

write : wf+(sy-fdpos).

2) Move The Number to a character field. Use SPLIT at '.' into two variables. The first character field will give you the required number.

Message was edited by:

Abhishek Jolly