I added a new timestamp dec-15 field to an existing cds view. When I try to access it via web browser using this new field as a filter, it fetches the data. However, it gives 'STRING_SIZE_TOO_LARGE' while loading it via excel. It shows data preview just fine.
What could be the issue?
Further, I tried this using other machines. On my own machine, it gives the error 'property does not exist' in excel, while works in the browser.
define view ZTV_I_AH
as select from srmprotocol
{
key poid_id,
key timestamp,
key xuser as ChangedBy,
arg1 as ChangedFrom,
arg2 as ChangedTo,
arg_string as FieldChanged_code,
substring(display_name, 7, 10) as CaseId,
tstmp_to_dats( timestamp,
abap_system_timezone( $session.client,'NULL' ),
$session.client,
'NULL' ) as timestamp_date,
concat( concat(cast( SUBSTRING( cast( timestamp as abap.char( 30 )), 7, 2) as abap.dats ), '.'),
concat(cast( SUBSTRING( cast( timestamp as abap.char( 30 )), 5, 2) as abap.dats ),
concat('.', cast( SUBSTRING( cast( timestamp as abap.char( 30 )), 1, 4) as abap.dats )))) as ChangedDate,
tstmp_to_tims( timestamp,
abap_system_timezone( $session.client,'NULL' ),
$session.client,
'NULL' ) as ChangedTime_ts,
substring( cast(timestamp as abap.char( 23 )), 1, 14 ) as timestamp_char,
concat( concat(cast( SUBSTRING( cast( timestamp as abap.char( 30 )), 9, 10) as abap.tims ), ':'),
concat(cast( SUBSTRING( cast( timestamp as abap.char( 30 )), 11, 12) as abap.tims ),
concat(':', cast( SUBSTRING( cast( timestamp as abap.char( 30 )), 13, 14) as abap.tims )))) as ChangedTime_2,
cast( substring( cast(timestamp as abap.char( 23 )), 1, 14 ) as abap.numc( 30 ) ) as timestamp_numc,
cast( cast( substring( cast(timestamp as abap.char( 23 )), 1, 15 ) as abap.numc( 23 ) ) as abap.dec( 15, 0 ) ) as timestamp_decm
////// EOM: ADDED BY RMANE 03.03.2021/////////
}
where
sps_id = 'ZNBR_SPS_CASE'
and act_id = 'ATTRIBUTE_CHANGE'
define view ZTV_I_AH_01 as select from ZTV_I_AH {
key poid_id, key timestamp, key ChangedBy,
ChangedFrom,
ChangedTo,
FieldChanged_code,
CaseId,
timestamp_date,
ChangedDate,
ChangedTime_ts,
substring( timestamp_char, 9, 14 ) as time_char,
concat(concat(concat(concat(substring( timestamp_char, 9, 2 ), ':' ), substring( timestamp_char, 11, 2 )), ':'),
substring( timestamp_char, 13, 2 )) as time_char2,
substring( timestamp_char, 9, 2 ) as HOURS_1 }
define view ZTV_I_AH_02
as select from ZTV_I_AH_01
{
key poid_id,
key timestamp,
key ChangedBy,
ChangedFrom,
ChangedTo,
FieldChanged_code,
CaseId,
timestamp_date,
ChangedDate,
ChangedTime_ts,
DATS_TIMS_TO_TSTMP(timestamp_date, ChangedTime_ts,abap_system_timezone( $session.client,'NULL' ),
$session.client,
'NULL' ) as UTCTDATETIME,
time_char,
time_char2,
case
when HOURS_1 < '12' then 'AM'
else 'PM'
end as SCHEDULED
define view ZTV_C_AH
as select from ZTV_I_AH_02
@Consumption.hidden: true
key poid_id,
key ChangedBy,
CaseId,
timestamp_date as ChangedDate,
ChangedTime_ts as ChangedTime,
UTCTDATETIME as UTCdatetime, //NEW
ChangedFrom,
ChangedTo,
FieldChanged_code
}
Apparently, EXCEL doesn't handle DEC15 very well. I converted it to NUMC and it is now working fine.