Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Make a variable into a string literal

Former Member
0 Likes
579

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

1 REPLY 1
Read only

Former Member
0 Likes
469

Hi,

okay, I've made it after a lot of trial-and-error by using a string-literal out of a single quote by enclosing that in backquotes.

Best regards,

Sapperdapper