SAP BDL STRICT 2



Get Example source ABAP code based on a different SAP table
  



ABAP_RAP - strict(2)
...
strict(2);
...

What does it do?
The addition strict(2) enables BDEF strict mode, version 2. When strict mode is switched on, outdated syntax which normally produces a syntax check warning leads to a syntax check error. Strict mode version 2 introduces mainly stricter checks for the RAP BO contract. Contract violations lead to runtime errors, instead of failed assertions. Strict mode version 2 is a prerequisite for releasing a RAP BO under the C0 contract, extend.
Strict mode version 2 must always appear as the second line in a RAP behavior definition.
Strict mode version 2 applies all checks from strict mode version 1, plus some additional syntax checks.
A complete list of additional syntax requirements in BDEF strict mode version 2 is provided in the development guide for the ABAP RESTful Application Programming Model, section Strict Mode - Implementation Requirements .
Related information:
RAP BDL - BDEF Strict Mode
RAP BDL - strict

ABAP_EXAMPLE_VX5
The following RAP behavior definition DEMO_RAP_BASE_DET_VAL is based on the CDS view entity DEMO_RAP_BASE_DET_VAL. It is intended to be released as API for extensibility under the C0 contract. Therefore, it uses strict(2).
ABAP_NOTE This RAP behavior definition demonstrates the design of a released API, but it is not actually released for C0.
ABAP_NOTE This example is intentionally kept short and simple and serves demonstration purposes only. The RAP handler methods of the ABAP behavior pool are not implemented here.
BDEF DEMO_RAP_BASE_DET_VAL
ABAP_EXAMPLE_END