cast( '' as abap.char(255)) as text
PUBLIC SECTION.
INTERFACES if_sadl_exit_calc_element_read.
LOOP AT lt_calculated_data ASSIGNING FIELD-SYMBOL(<fs_data>).
<fs_data>-text = 'Awesomeness'.
ENDLOOP.
@AbapCatalog.sqlViewName: 'ZV_SFLIGHT_SQL'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'CDS view on SFLIGHT'
define view zv_sflight_cds
as select from sflight
{
//sflight
key carrid,
key connid,
key fldate,
price,
currency,
planetype,
seatsmax,
seatsocc,
paymentsum,
seatsmax_b,
seatsocc_b,
seatsmax_f,
seatsocc_f,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:ZCL_CDS_FUNCTION'
cast( '' as abap.char(255)) as text
}
CLASS zcl_cds_function DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_sadl_exit_calc_element_read.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_cds_function IMPLEMENTATION.
METHOD if_sadl_exit_calc_element_read~calculate.
DATA:
lt_calculated_data TYPE STANDARD TABLE OF zv_sflight_cds WITH DEFAULT KEY.
MOVE-CORRESPONDING it_original_data TO lt_calculated_data.
LOOP AT lt_calculated_data ASSIGNING FIELD-SYMBOL(<fs_data>).
<fs_data>-text = 'Awesomeness'.
ENDLOOP.
MOVE-CORRESPONDING lt_calculated_data TO ct_calculated_data.
ENDMETHOD.
METHOD if_sadl_exit_calc_element_read~get_calculation_info.
ENDMETHOD.
ENDCLASS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
4 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |