云服务器价格_云数据库_云主机【优惠】最新活动-搜集站云资讯

免备案CDN_法国服务器_12月免费

小七 141 0

免备案CDN_法国服务器_12月免费

Hi everyone!

I just want to put the light on a feature – in the context of advanced view building with ABAP Core Data Services (CDS) – that is available starting with AS ABAP 7.4 SP8: CDS views with input parameters. Yes, as a developer, you can now parameterize your CDS views. It means you can define one general views which produce context-specific result sets by using parameter values passed at execution time. This means that you do no longer need to create a view for each context!

For example:

Watch the compact video tutorial below. It shows how to create and call parameterized views in ABAP.

Note that CDS views with parameters are not supported on all SAP certified databases – At least SAP HANA does . However, the DDL of the ABAP CDS allows creating and accessing CDS views with parameters independent of the database system.

In case an Open SQL statement SELECT is access such a parameterized view or a view that contains such a view as data source, but the accessed database system does not support them, a non-handleable exception of the class CX_SY_SQL_UNSUPPORTED_FEATURE is raised.

The recommended approach when using a database-specific features (e.g. views with parameters) in ABAP programs is to use the method USE_FEATURES of the class CL_ABAP_DBFEATURES to check whether the accessed database system supports it.**

Example:

IF abap_true = cl_abap_dbfeatures=>use_features(        requested_features =

VALUE #( ( cl_abap_dbfeatures=>views_with_parameters ) ) ).    "Call of CDS view with input parameters      SELECT *        FROM demo_iparameter_02( p_langu       = @sy-langu,                                 p_saving_rate = ‘0.04’,                                 p_lc_status   = @p_status )        INTO TABLE @DATA(lt_data).

cl_demo_output=>display_data(     EXPORTING       value = lt_data       name  = ‘Demo: CDS View with Input Parameters’  ). ELSE.    "alternative implementation cl_demo_output=>display( ‘Database system does not support views with parameters’ ). ENDIF.

Find more detailed information on this topic in the ABAP Keyword Documentation.

,靠谱云服务器,合肥大数据,联网,智能物联,大数据查询