cancel
Showing results for 
Search instead for 
Did you mean: 

Hana Studio Inconsistency in Reference Field Warning for table ACDOCA while creating CDS view

faisal_khan
Participant
0 Kudos

Hi,

While creating ABAP project in HANA Studio, we are using the ACDOCA table to sum the total cost against the Order Numbers. Using the sum function on ACDOCA.CO_OSL field we get the following warning: Inconsistency in field for ZACDOCA-CO-OSL. the diagnosis being :A reference field and a reference table were defined for the field of a base table of the view. The reference table is the base table of the view, but the reference field was not included in the view. Therefore it is not possible to replace the reference field with the corresponding view field.

Our code is:

define view Z_Acdoca as select from acdoca

{ key acdoca.rclnt,

key acdoca.rldnr,

key acdoca.rbukrs,

key acdoca.gjahr,

key acdoca.docln,

key acdoca.belnr,

acdoca.aufnr as OrderNo,

@DefaultAggregation:#SUM

acdoca.co_osl as TotCost}

where acdoca.aufnr = '000011XXXXXX''

Can anyone explain the issue and its solution?

Due to above issue when we create the KPI on this CDS view to show as a Tile, no data is returned.

Thanks

Faisal

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor

The message says that you have to add the currency field which is reference in the amount field (co_osl), because it makes no sense to aggregate amounts with different currencies.

This message is a technical message and appears of course also if you have just a single currency in the affected records.

Regards,
Florian

faisal_khan
Participant
0 Kudos

Thanks Pfeffer,

Issue resolved using the currency field in the Select statement

Regards

Faisal

Answers (0)