‎2007 Aug 21 10:27 AM
Hi Experts,
maybe this question is far to simple, but I just can't find out what escape sequences to use for ABAP.
The problem ist, that I want to build a string via CONCATENATE like:
CONCATENATE '/'' <fs>-field '/'' INTO string.
The string shall look like 'value_from_<fs>-field' . The / are the wrong escape characters here. My question is what character do I have to use?
Regards
Torsten
‎2007 Aug 21 10:37 AM
try this
data: output(40).
concatenate 'field1' '''' 'field2' into output.
write:/ output.is this what you want ?
the '' is the escape sequence for apostrophe and since it is a string type, it should be enclosed in another set of ''
hence it becomes ''''
Message was edited by:
Kris Donald
‎2007 Aug 21 10:37 AM
try this
data: output(40).
concatenate 'field1' '''' 'field2' into output.
write:/ output.is this what you want ?
the '' is the escape sequence for apostrophe and since it is a string type, it should be enclosed in another set of ''
hence it becomes ''''
Message was edited by:
Kris Donald
‎2007 Aug 21 11:00 AM
Hi Kris,
yes '''' was what I was looking for. Is ' the general escape character for ABAP?
Regards
Torsten
‎2007 Aug 21 11:52 AM
Hello Torsten,
I'm not sure, but when it comes to strings, only the apostrophe needs an escape sequence since everything else is accepted as a character
‎2007 Aug 21 1:25 PM
‎2007 Aug 21 10:39 AM
hi
Just write this:
variable = <fs_field>.
write: / variable.
Regards
Preeti