天天看点

如何用ABAP读取CDS view association的数据

AG3, view name Zorder_Sys_Status.

This view has an association named _statushelp:

如何用ABAP读取CDS view association的数据

Requirement

I would like to read the guid from host view Zorder_Sys_Status together with its associated data via association _statushelp.

(1) Since there is no existing data type which holds both host view field and associated view fields, you have to create one on your own:

如何用ABAP读取CDS view association的数据

(2) Use the following syntax in ABAP code:

如何用ABAP读取CDS view association的数据
如何用ABAP读取CDS view association的数据
如何用ABAP读取CDS view association的数据

In ST05, select your trace record, and click this button in toolbar:

如何用ABAP读取CDS view association的数据