2007 Mar 20 11:54 PM
Hello all,
I am concatenating something like this -
condense l_bstkd.
concatenate '~'
l_bstkd
'~' into ltext.
The sample result of the above would look like
ltext = xyz.
My requirement now is let us say l_bstkd is blank. In this case the above will result in l_text = ~~.
But I need a space between ~'s when l_bstkd is blank so that l_text = ~ ~.
Suggestions please
2007 Mar 20 11:58 PM
Hi,
Try this..
IF l_bstkd IS INITIAL.
concatenate '~'
'~' into ltext SEPARATED BY SPACE.
ELSE.
concatenate '~'
l_bstkd
'~' into ltext.
ENDIF.
Thanks,
Naren
Hello all,
I am concatenating something like this -
condense l_bstkd.
concatenate '~'
l_bstkd
'~' into ltext.
The sample result of the above would look like
ltext = xyz.
My requirement now is let us say l_bstkd is blank. In this case the above will result in l_text = ~~.
But I need a space between ~'s when l_bstkd is blank so that l_text = ~ ~.
Suggestions please
2007 Mar 20 11:58 PM
Hi,
Try this..
IF l_bstkd IS INITIAL.
concatenate '~'
'~' into ltext SEPARATED BY SPACE.
ELSE.
concatenate '~'
l_bstkd
'~' into ltext.
ENDIF.
Thanks,
Naren
2007 Mar 21 12:01 AM
Hi,
thanks for the reply. I know we could do something like this. but my problem is I have like 7 char fields which I am concatenating. I think its impractical to apply your logic to handle all the 7 char fields.
what do you think?
2007 Mar 21 12:05 AM
after concatenation you can write statemnet like this
Replace '~' with ' ~' in <string name>
2007 Mar 21 12:00 AM
you need to check
if l_bstkd is initial
concatenate '~'
l_bstkd
'~' into ltext seperated by space.
endif.
2007 Mar 21 12:02 AM
2007 Mar 21 12:04 AM
folks,
actually I am concatenating total 7 char fields into ltext. how to handle all the 7 char fields at the same time.
2007 Mar 21 12:10 AM
Hi,
Okay..Do this..
After the concatenate..
CONCATENATE '~'... ~' into L_TEXT.
IF L_text = '~~'.
L_text = '~ ~'.
ENDIF.
Thanks,
Naren