Skip to Content
0
Former Member
Oct 30, 2012 at 05:18 PM

Make a variable into a string literal

110 Views

Hi,

this may be a very trivial question - nevertheless it's bothering me quite a bit: I have a parameter "Lang", imported from Memory, that holds a language key, 'DE' or 'EN' for instance. Now I want to use this in a Join-expression: A Join expression between any table (e.g. T528B) and its text_table (T528T here) can/ must include a language filter so that the key is really unique and only the one record in the selected language is found. For that to work, however, the language key must be in quotes: > T528T~SPRSL = 'DE' < is valid, > T528T~SPRSL = DE < is not.

A seemingly very simple problem - I have read that string_literals in ABAP commonly use backquotes and that in order to display a backquote, I have to type two backquotes in sequence. Only I'm afraid it doesn't work:

At this point, I have a FIELD-SYMBOL that has the language key, so I say

CONCATENATE `` <LG> `` INTO Joinline_pre.

My hope was that Joinline_pre would then read 'DE' (if the language key in the field-symbol was DE) or 'EN' - but apparently it doesn't: In the debugger, the backquotes don't show up and a subsequent command fails which can only be because of this as nothing else has changed right now.

Can anybody help me out there please?

Thanks a lot!

Best regards,

Sapperdapper