on 12-04-2008 10:20 AM
hi ,
I want to condense the space which is coming in the string .
CONCATENATE lv_ystring 'years' lv_mstring '.5' 'months' INTO lv_total
SEPARATED BY space.
The output is coming like this :
2 years 2 .5 months
in my application
Actually , I want to condense the space b/w ' 2' and ' .' . The output should be 2.5 instead of 2 .5 .
How can I do so ??
Use
CONDENSE variable NO-GAPS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
data lv_tmp type string.
concatenate lv_mstring '.5' into lv_tmp.
CONCATENATE lv_ystring 'years' lv_tmp 'months' INTO lv_total
SEPARATED BY space.
Thanks
Chitrali
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This question is no way related to WDA. Please use Normal ABAP forum to post such messages in the future.
There are various ways to do it. Simplest way would be to split the code as follows:
CONCATENATE lv_ystring 'years' lv_mstring INTO lv_total
SEPARATED BY space.
concatenate lv_total '.5' into lv_total.
concatenate lv_total 'months' into lv_total separated by space.
Otherways would be use to regex functionality to replace the blank space prior to the point.
Regards
Rohit Chowdhary
Edited by: Rohit Chowdhary on Dec 4, 2008 4:05 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.