cancel
Showing results for 
Search instead for 
Did you mean: 

Using CDS ABAP code exit with unlimited character length

felixw
Explorer
0 Kudos
157

Hello community,

I used the ABAP code exit feature as described e.g. here. I add the following two lines to my cds view:

      @ObjectModel.virtualElementCalculatedBy: 'ABAP:My_Class'
      cast( '' as abap.char( 256 )) as ExitResults

This works fine. However, the result is restricted to 256 characters. Is it somehow possible to get rid of this limitation and have a unlimited length for the result calculated?

Thanks for your suggestions.

View Entire Topic
nicknf
Explorer
0 Kudos

Using a calculated field has slightly changed (see here).

The field can be defined with:

            @ObjectModel.virtualElementCalculatedBy: 'ABAP:Z_MY_CALC_CLASS'
      virtual fieldString: z_my_data_element,

The element z_my_data_element can then be of tye string