I am having two tables BKPF
and TOA01
.
- Report should have the following selection screen fields.
Company code(
BUKRS
), Document Number(BELNR
), Fiscal Year(GJAHR
) For ALV report following field should be available in the layout.
BKPF-BUKRS
BKPF-BELNR
BKPF-GJAHR
BKPF-USNAM
TOA01-ARCHIV_ID
TOA01-ARC_DOC_ID
**Link between BKPF and TOA01: TOA01-SAP_OBJECT = 'BKPF' AND TOA01-OBJECT_ID = concatenate -> BKPF-BUKRS + BKPF-BELNR + BKPF-GJAHR.
I want the logic to display (the alv) using two given tables using the link between them (given above).
Please help me with the answer.
If you familiar with ABAP-CDS, you can define two CDS-views. The first one contains the data from table BKPF:
}
The second CDS-View joins BKPF with table TOA01 (according to your condition TOA01-SAP_OBJECT = 'BKPF' AND TOA01-OBJECT_ID = concatenate -> BKPF-BUKRS + BKPF-BELNR + BKPF-GJAHR.):
The tables shown in the ALV can be filled with a select-statement on view
zbooking_doc_and_archiv
.