Skip to Content
0

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

Dec 04, 2017 at 08:05 AM

234

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Florian Pfeffer
Dec 04, 2017 at 09:46 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Pfeffer,

Issue resolved using the currency field in the Select statement

Regards

Faisal

0