Error – 1 No association “_ZR_ZISPFLI_1_GPR” is defined for “ZR_ZISCARR_1”.
Error – 2 The association “_ZR_ZISFLIGHT_1_GPR” cannot be used for a “dependent by” relationship.
Dear Community Members
@Andre_Fischer ,
1. Created 3 Information view based on sflight , spfli , scarr namely – ZISFLIGHT_1 , ZISPFLI_1 , ZISCARR_1
define view entity ZISFLIGHT_1 as select from sflight
association[0..1] to ZISPFLI_1 as _zispfli_1 on $projection.Carrid = _zispfli_1.Carrid and
$projection.Connid = _zispfli_1.Connid
association[0..1] to ZISCARR_1 as _ZISCARR_1 on $projection.Carrid = _ZISCARR_1.Carrid
{
key carrid as Carrid,
key connid as Connid,
key fldate as Fldate,
@Semantics.amount.currencyCode: ‘currency’
price as Price,
currency as Currency,
planetype as Planetype,
seatsmax as Seatsmax,
seatsocc as Seatsocc,
@Semantics.amount.currencyCode: ‘currency’
paymentsum as Paymentsum,
seatsmax_b as SeatsmaxB,
seatsocc_b as SeatsoccB,
seatsmax_f as SeatsmaxF,
seatsocc_f as SeatsoccF,
// Exposed Association
_zispfli_1,
_ZISCARR_1
}
define view entity ZISPFLI_1 as select from spfli
association[0..1] to ZISFLIGHT_1 as _zisflight_1 on $projection.Carrid = _zisflight_1.Carrid and
$projection.Connid = _zisflight_1.Connid
association[0..1] to ZISCARR_1 as _ZISCARR_1 on $projection.Carrid = _ZISCARR_1 .Carrid
{
key carrid as Carrid,
key connid as Connid,
countryfr as Countryfr,
cityfrom as Cityfrom,
airpfrom as Airpfrom,
countryto as Countryto,
cityto as Cityto,
airpto as Airpto,
// fltime as Fltime,
deptime as Deptime,
arrtime as Arrtime,
// @Semantics.quantity.unitOfMeasure : ‘distid’
// distance as Distance,
// distid as Distid,
fltype as Fltype,
period as Period,
//Exposed Association
_zisflight_1,
_ZISCARR_1
}
define view entity ZISCARR_1 as select from scarr
{
key carrid as Carrid,
carrname as Carrname,
currcode as Currcode,
url as Url
}
2. Crated root view , child view and grandchild(Leaf ) view on above information view namely
and did parent , child relationship
ZR_ZISFLIGHT_1 , ZR_ZISPFLI_1 , ZR_ZISCARR_1
define root view entity ZR_ZISFLIGHT_1
as select from ZISFLIGHT_1
composition [1..*] of ZR_ZISPFLI_1 as _ZR_ZISPFLI_1_CH
{
key Carrid,
key Connid,
Fldate,
@Semantics.amount.currencyCode: ‘Currency’
Price,
Currency,
Planetype,
Seatsmax,
Seatsocc,
@Semantics.amount.currencyCode: ‘Currency’
Paymentsum,
SeatsmaxB,
SeatsoccB,
SeatsmaxF,
SeatsoccF,
/* Associations */
_ZISCARR_1,
_zispfli_1,
_ZR_ZISPFLI_1_CH
}
define view entity ZR_ZISPFLI_1
as select from ZISPFLI_1
association to parent ZR_ZISFLIGHT_1 as _ZR_ZISFLIGHT_1_PR on $projection.Carrid = _ZR_ZISFLIGHT_1_PR.Carrid
and $projection.Connid = _ZR_ZISFLIGHT_1_PR.Connid
composition [0..1] of ZR_ZISCARR_1 as _ZR_ZISCARR_1
{
key Carrid,
Connid,
Countryfr,
Cityfrom,
Airpfrom,
Countryto,
Cityto,
Airpto,
Deptime,
Arrtime,
Fltype,
Period,
/* Associations */
_ZISCARR_1,
_zisflight_1,
_ZR_ZISFLIGHT_1_PR,
_ZR_ZISCARR_1
}
define view entity ZR_ZISCARR_1
as select from ZISCARR_1
association to parent ZR_ZISPFLI_1 as _ZR_ZISPFLI_1_P on $projection.Carrid = _ZR_ZISPFLI_1_P.Carrid
association [1..1] to ZR_ZISFLIGHT_1 as _ZR_ZISFLIGHT_1_GPR on $projection.Carrid = _ZR_ZISFLIGHT_1_GPR.Carrid
// ZR_ZISFLIGHT_1 is root view(Grand parent )
{
key Carrid,
Carrname,
Currcode,
Url,
// Make association public
_ZR_ZISPFLI_1_P,
_ZR_ZISFLIGHT_1_GPR
}
Creating BDL , Its showing error.
managed; // implementation in class zbp_r_zisflight_1 unique;
strict ( 2 );
define behavior for ZR_ZISFLIGHT_1 //alias <alias_name>
implementation in class zcl_bp_ZR_ZISFLIGHT_1 unique
persistent table SFLIGHT
lock master
authorization master ( instance )
//etag master <field_name>
{
create;
update;
delete;
association _ZR_ZISPFLI_1_CH { create; }
}
define behavior for ZR_ZISPFLI_1 //alias <alias_name>
implementation in class zcl_bp_ZR_ZISPFLI_1 unique
persistent table SPFLI
lock dependent by _ZR_ZISFLIGHT_1_PR
authorization dependent by _ZR_ZISFLIGHT_1_PR
//etag master <field_name>
{
update;
delete;
field ( readonly ) Carrid, Connid;
association _ZR_ZISFLIGHT_1_PR;
association _ZR_ZISCARR_1 { create; }
}
define behavior for ZR_ZISCARR_1 //alias <alias_name>
implementation in class zcl_bp_ZR_ZISCARR_1 unique
persistent table SCARR
lock dependent by _ZR_ZISPFLI_1_GPR
authorization dependent by _ZR_ZISFLIGHT_1_GPR
//etag master <field_name>
{
update;
delete;
field ( readonly ) Carrid;
association _ZR_ZISPFLI_1_P;
association _ZR_ZISFLIGHT_1_GPR;
}
I was getting below error too, need to know why this error comes.
Need Expert Help.