Hello Sanjana,
Here is a sample of my suggestion.
Data: string1a(20) type C,
string1b(20) type c,
string1c(20) type c,
string1d(20) type c.
Data: len1 type i,
offset1 type i.
start-of-selection.
split at space string1 into string1a string1b string1c string1d.
*-->get the length of the first split
len1 = strlen(string1a)
*--> we interested in the last character...so get the offset
offset1 = len1 - 1.
*-->test to see if the last character is a delimiter.
if string1+offset1(1) eq ':'
concatenate string1a string1b into string1 separate by '_'.
else.
concatenate string1a string1b into string1.
endif.
*--> do the same for the other sub-strings...of course test to see if they are not initial.
Thank you,
John
<removed by moderator> if helpful. Or ask if you need more help
Message was edited by: Manish Kumar