Consider the following select statement:
Code: Select all
select * into corresponding fields of table itab from mara inner join marc on mara~matnr = marc~matnr where..............
For example HERKR exists in both mara and marc.
Based on my testing, the last table in the join seems to win, so I get the value from marc-herkr in my result.
1) Is this consistent behaviour or is it random hit and miss?
2) Is there a way to explicitly specify which table a single column should come without naming all columns (itab is basically defined as MARC, mara is only in the join to facilitate 'where' conditions).
I did read this in the ABAP knowledge corner which seems to say that I really should name all fields (with table name) I want in the result:
Any hints or suggestions are appreciated.You can, if you wish leave out the table names on the fields if they are unique to that table (ie they do not occur in any other table in the join), however I always include them to make sure that there is no doubt where the data is coming from.
Thanks in advance!