Quantcast
Viewing all articles
Browse latest Browse all 10482

Re: Abap logic

Try something like below:

 

data: string(50) type c,

symbol1(1) type c,

symbol2(1) type c,

symbol3(1) type c,

part1(10)  type c,

part2(10)  type c,

part3(10)  type c,

part4(10)  type c.

 

symbol1 = '"'.

symbol2 = ','.

symbol3 = '+'.

 

 

string = 'abc,"sunil,kumar",100,"praveen,kumar".'.

 

SPLIT string AT symbol INTO part1 part2 part3 part4.

 

concatenate symbol1 part1 symbol1 into part1.

replace all occurrences of symbol2 in part2.

concatenate symbol1 part3 symbol1into part3.

replace all occurrences of symbol2 in part4.

 

 

concatenate part1 part2 part3 part4 into string separated by symbol3

 


Viewing all articles
Browse latest Browse all 10482

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>