Get Example source ABAP code based on a different SAP table
• INTERNAL ABAP_BDL_BODY
ABAP_RAP - internal>
ABAP_SYNTAX ... internal ...>
What does it do? Defines a RAP BO operation> as internal>. That means that the operation in question can only be accessed from within the ABAP behavior pool>, for example from an action>, a validation>, or a determination>. When an external RAP BO consumer> tries to execute an internal RAP BO operation, a runtime error > occurs. internal> can be applied to the following operations:
standard operations>
operations for associations>
actions>
functions>
determine actions>
draft actions> This feature is provided by the RAP framework>. No implementation in the ABAP behavior pool> is required.
Latest notes:
If an operation is marked as internal>, feature control> is not supported. Feature control is for external access control and is not required for internal operations.
precheck>> is not available for internal operations.
authorization:update>> is not available for internal operations. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 The following example shows a managed BDEF that defines the internal action calculateTotalAmount> and the on modify> determination calcTotal>. BDEF DEMO_RAP_INTERNAL The internal action multiplies the value of field Quantity> with the value of field Amount> and inserts the result into field Total> per entity instance. It is executed from the ABAP behavior pool by the on modify> determination calcTotal>. Code snippet: determination that triggers the internal action: METH BP_DEMO_RAP_INTERNAL(CCIMP)=>CALCTOTAL For the full ABAP behavior pool implementation, see BP_DEMO_RAP_INTERNAL==========CCIMP>>. The ABAP class CL_DEMO_RAP_INTERNAL>> uses EML> to access the RAP business object:
It creates five new entity instances by specifying values for the fields Amount> and Quantity>. Code snippet: ABEXA 01528
Using the AB_SQL SELECT> statement, the content of the underlying database table is displayed. Result: for each entity instance, the value of the field Total> is calculated. IMAGE ABDOC_INTERNAL.png 433 135 ABAP_EXAMPLE_END