Skip to Content

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 04, 2017 at 09:46 AM

    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

    Add comment
    10|10000 characters needed characters exceeded