cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SE16H outer join query

former_member782373
Discoverer
0 Likes
2,300

Hi,When I try to make a joint query by SE16H,I don't get the satisfactory result.

At first,I created an outer join definition of the table BSEG.In this outer join definition, I defined one secondary table BKPF .But when I excuted the query, the fileds of the BKPF are empty.Can anybody help?Thanks a lot!

Kane

Accepted Solutions (0)

Answers (1)

Answers (1)

oleksandr-sap-dev
Discoverer
0 Likes

Hi, I guess I am late but I will answer anyway.

CONSTANT is used secondary method . For that method is necessary to provide the exact value that has to be to be filtered in the secondary table to show in the REFERENCE/CONSTANT field. In this case the rows could be:

GJHAR             CONSTANT            2022
BUKRS             CONSTANT            AAA
BELNR             CONSTANT            12345678

That will show exacty the same information for every row.

If what is wanted is to relate every row of BKPF to a row of BSEG the method REFERENCE is used. Then in REFERENCE/CONSTANT goes the name of the field in the "source" table (usually there is only one, the primary table, but sap offers the option to join several tables among them so it is possible to have a table, join it with an intermidate one and use some of its fields as keys to the third) and in the FROM TABLE the source table is specified. In this case the rows would be:
GJHAR             REFERENCE            GJHAR        BSEG
BUKRS             REFERENCE            BUKRS        BSEG
BELNR             REFERENCE            BELNR        BSEG