Hi,
I'm trying to leverage the functionality of path expressions in a following scenario:
We have a simple [0..*] association of an entity business transaction header with another entity business partner. The ABAP CDS View for a business transaction could look something like this:
@AbapCatalog.sqlViewName: 'BTRAN' define view btran_ddl as select from crmd_orderadm_h as btrn_header association [1..*] to bt_bp as partners on $projection.guid = partners.header_guid { key btrn_header.guid as guid, btrn_header.object_id as h_object_id, ... // further fields from crmd_orderadm_h partners // publishing association for use in other CDS views }
The target data source BT_BP is another CDS view containing data on business partner. In the last line of SELECT list, the association PARTNERS is stated to be accessible by other CDS views which build on top of BTRAN.
Now let's say I want to create another view CONTRACT. A contract is a special case of a business transaction with a specific transaction type. In this view I'd like to access the association PARTNERS to display information on different business partners:
@AbapCatalog.sqlViewName: 'CONTRACT' define view contract_ddl as select from btran { key btran.guid as guid, ... // further fields partners.name as partner_name, // accessing PARTNERS partners.function as partner_function // accessing PARTNERS } where btran.object_type = 'BUS2000113'
The syntax check on this view returns the error message: Component PARTNERS does not exist or is not active
Am I missing something?
Thanks,
Marek