on 12-20-2018 9:54 AM
Hi,
I want to do a JOIN with a Like Operator.
SELECT s~*,t~BUKRS, t~BUTXT FROM smmain as s inner join t001 as t ons~VARIANTE LIKE t~BUKRS into CORRESPONDING FIELDS OF TABLE @et_entitysetwhere UNAME = '755285'.
Unfortunately the Workbench tells me, that only Data type C is allowed for this. Even though, the fields are already data type C.
How can I do this LIKE Operation with table fields?
Best regards
Jo
I tried in my system and my conclusion is that it is not possible with OPEN SQL. This SQL statement can be executed with Native SQL (cl_sql_statment). But I am not sure about the result you intended to have because I suppose there is no '%' in t001.bukrs. What data is there in your tables smmain and t001 (smmain.variante and t001.bukrs) ? Can you show example of entries that you want to join ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I understand your point. Of course you are right.
Cant I do something like a CONCAT.
SELECT s~*,t~BUKRS, t~BUTXT FROM smmain as s inner join t001 as t ons~VARIANTE LIKE CONCATENATE( '%' t~BUKRS '%') into CORRESPONDING FIELDS OF TABLE @et_entitysetwhere UNAME = '755285'.
I'm not very familiar with ABAP, so I'm not quite sure about that.
Best regards
Johannes
you cant put a field after LIKE, it have to a variable or a value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
8 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.