'STRING_SIZE_TOO_LARGE' 通过 Excel Odata 连接访问 ABAP CDS 时

'STRING_SIZE_TOO_LARGE' while accessing ABAP CDS via Excel Odata connection

我在现有的 CD 视图中添加了一个新的时间戳 dec-15 字段。当我尝试使用这个新字段作为过滤器通过网络浏览器访问它时,它会获取数据。但是,它在通过 excel 加载时给出 'STRING_SIZE_TOO_LARGE'。它显示数据预览很好。

可能是什么问题?

此外,我用其他机器试过了。在我自己的机器上,它在 excel 中给出错误 'property does not exist',而在浏览器中工作。

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

}

显然,EXCEL 不能很好地处理 DEC15。我将它转换为 NUMC,现在工作正常。