You want to select data from two tables and store the result in as structure.
Table PARTNER contains the fields PARTJD and KIND.
Table CONTRACT contains the fields CONTJD, CONT_TYPE and DIVISION.
The structure is defined as follows
DATA: BEGIN OF wa_result,
Part_id type partner-partjd, cont_id type contract-cont_id,
ConMype TYPE contract-cont_type,
END of wa_result,
Lt_result type table of wa_result.
How can you replace the following SELECT statement with an outer join?
SELECT partjd from partner INTO wa_result WHERE kind = 'Residential'.
SELECT contjd from CONTRACT into wa_result-cont_id WHERE part EQ
wa_partner-part_id And DIVISION eq 'Water'.
Append wa_result to lt_result.
ENDSELECT.
If sy-subrc<>0. CLEAR wa_result-cont_id
APPEND wa_result TO lt_result. ENDIF.
ENDSELECT.
Please choose the correct answer.
Currently there are no comments in this discussion, be the first to comment!