I am trying to create a database view in ABAP Dictionary.
I have given the join condition for tables table_a and table_b as table_a-data = table_b-data.
I have mentioned all the primary key fields in the view fields tab and I have mentioned where conditions where Mandt = '602' and facing the following errors
-
selection condition is not permitted for client
-
field table_a-data does not belong to base table.
I have tried to modify the comparison value but didn't work. also switched the tables order to eliminate the error with base table but didn't work.
You cannot hardcode the client value in selection conditions.
Follow the below steps for proper handling of client in database view
table_a-mandt = table_b-mandt(so that data from cross clients is not used in join condition)MANDTas the first field in View Fields (so that compiler can pass current client as default value during data selection).If you want access to cross-client data, you can achieve the same using
CLIENT SPECIFIEDorUSING CLIENTkey words as below.