on ‎2022 Feb 15 9:37 AM
Hello,
I have defined a CDS view entity and I get the error message: "CASE (THEN): Maximum data type cannot be determined (CURR,000015) (CURR,000015)"
define view entity ZI_CCS_SettlItems
as select from wbrp
association to parent ZI_CCS_SettlHead as _Head on $projection.SettlmtMgmtDoc = _Head.SettlmtMgmtDoc
{
key wbeln as SettlmtMgmtDoc,
key posnr as SettlmtMgmtDocItem,
@Semantics.amount.currencyCode: 'SettlmtDocCurrency'
case when wbrp.netwr <> 0.00 then wbrp.netwr
else wbrp.netwr
end as test,
@Semantics.amount.currencyCode: 'SettlmtDocCurrency'
cast( case when wbrp.netwr <> 0 then wbrp.netwr
else wbrp.netwrd
end as netwr_lfp ) as ItemNetAmount,
matnr as Product,
arktx as SettlmtMgmtDocItemText,
// _Head.SettlmtDocCurrency as SettlmtDocCurrency,
waers_bv as SettlmtDocCurrency,
_Head // Make association public
}
I tried to cast the field from a data element and also from abap.curr but I get the same error message.
Any idea?
Thank you
Christophe
Request clarification before answering.
...
@Semantics.amount.currencyCode: 'SettlmtDocCurrency'
cast( case
when wbrp.netwr <> 0.00
then cast( wbrp.netwr as abap.dec(15,2) )
else cast( wbrp.netwr as abap.dec(15,2) )
end as NETWR_LFP ) as test,
@Semantics.amount.currencyCode: 'SettlmtDocCurrency'
cast( case
when wbrp.netwr <> 0
then cast( wbrp.netwr as abap.dec(15,2) )
else cast( wbrp.netwrd as abap.dec(15,2) )
end as netwr_lfp ) as ItemNetAmount,
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christophe,
I think there are some Quantity, Currency field related issues in older versions of View entities. Either you can use old DDIC views or you may upgrade the system to latest release. For us in OP2020 we faced the similar error.
Best regards,
Akhilesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.