‎2006 Sep 12 2:25 PM
Hi,
I have a requirement as below. I have a long string to be updated based on the database values. The String:
1|10-1234 |009|||||KE| |HALB|M|051399||IN| ||||PRMS|||||||||||||||||||0001||15||0||||||||0|0|0|||||||||||||||||||||||KE||P ||20060729||||||||||||||00|||||NORM||||||||||||||||||||
String+38(6)=>051399; to be modified with a value of size 8 Char =>95123456. But the total no of pipe separators to be maintained. Can you please suggest me a good solution for this.
Thanks and Regards,
Kannan.
‎2006 Sep 12 2:45 PM
Hi kannan,
1. 1234<b>5</b>67890
5 to be replace with PPPPP
1234<b>PPPP</b>67890
2. Just copy paste to get a taste of it.
3.
report abc.
DATA : MYSTR(15) TYPE C.
MYSTR = '1234567890'.
REPLACE MYSTR+4(1) IN MYSTR WITH 'PPPPP'.
WRITE MYSTR.
regards,
amit m.
‎2006 Sep 12 2:27 PM
v_repl = String+38(6).
replace v_repl with '95123456' in str.
Regards,
Ravi
‎2006 Sep 12 2:29 PM
Hi,
Use concatenate.
concatenate lv_str0(38) '95123456' lv_str44
into lv_str.
‎2006 Sep 12 2:39 PM
Hello Kannan,
U can use the replace command for this purpose.
ie) Replace String+38(6) with '95123456' into string.
If useful reward.
Vasanth
‎2006 Sep 12 2:45 PM
Hi kannan,
1. 1234<b>5</b>67890
5 to be replace with PPPPP
1234<b>PPPP</b>67890
2. Just copy paste to get a taste of it.
3.
report abc.
DATA : MYSTR(15) TYPE C.
MYSTR = '1234567890'.
REPLACE MYSTR+4(1) IN MYSTR WITH 'PPPPP'.
WRITE MYSTR.
regards,
amit m.