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

sql_exp - sql_string not possible with NUMC columns?

peter_langner
Active Contributor
0 Likes
1,039

In the ABAP 7.40 documentation ist says:


"sql_exp - sql_string


Syntax

... operand1 && operand2  [&& operand3 ... ] ...

Effect

Character string expression in Open SQL. The operator && chains the character strings in two adjacent operand to a single character string. The operands can have the following data types:

  • Dictionary types CHAR, DATS, CLNT, CUKY, LANG, NUMC, TIMS, and UNIT for columns of database tables or views.
  • ABAP type c, n, d, and t for host variables.
  • Text field literal of type c. Empty text field literals cannot be specified.

The operator && can only be used to chain the elementary operands stated above. Any other expressions cannot be chained."

But when I try to concatenate two database columns with type NUMC the syntax check say, that only type CHAR is allowed for string concatenation.

, what did I do wrong?

Thank you in advance,

Peter

1 ACCEPTED SOLUTION
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
0 Likes
704

Oooops ...

Has the dang documentation writer (that's me) simply believed what the dang developer (that's the buddy sitting directly in front of me, nice guy by the way) has told him instead of testing it thoroughly enough.

Unfortunately, only CHAR, CLNT, LANG, CUKY, UNIT and c are supported with operator && up to now.

I adjust the documentation in SP09  (that's the current version, I'm working on). But maybe, that's also the SP, where the restriction will be abolished anyway (the problem as always in Open SQL - and meanwhile also in ABAP CDS - is, that each database must deliver the same result for all possible combinations and a lot of testing has to be done before the functionality can be released).

Sorry for that and thanks for notifying me!

Horst

1 REPLY 1
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
0 Likes
705

Oooops ...

Has the dang documentation writer (that's me) simply believed what the dang developer (that's the buddy sitting directly in front of me, nice guy by the way) has told him instead of testing it thoroughly enough.

Unfortunately, only CHAR, CLNT, LANG, CUKY, UNIT and c are supported with operator && up to now.

I adjust the documentation in SP09  (that's the current version, I'm working on). But maybe, that's also the SP, where the restriction will be abolished anyway (the problem as always in Open SQL - and meanwhile also in ABAP CDS - is, that each database must deliver the same result for all possible combinations and a lot of testing has to be done before the functionality can be released).

Sorry for that and thanks for notifying me!

Horst