Ansicht
Dokumentation

ABAPDERIVED_TYPES_CONTROL - DERIVED TYPES CONTROL

ABAPDERIVED_TYPES_CONTROL - DERIVED TYPES CONTROL

Fill RESBD Structure from EBP Component Structure   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

%control

%control is a component group in BDEF derived types.

It is a structure that contains all key and data fields of a RAP BO instance as components and is used to get information on what fields are provided (e. g. in the context of CREATE or UPDATE operations) or requested (e. g. in the context of READ operations) by RAP BO providers or RAP BO consumers respectively. For this, the value of each field in the control structure is basically a flag indicating, for example, whether the field has been provided or requested during the current transaction or not. Hence, the data fields do not retain their original line type. In many cases, the control structure is filled implicitly and automatically, for example, in the context of RAP MODIFY operations using the ABAP word SET FIELDS WITH. Yet, depending on the context, the explicit specification of %control is mandatory. For example, in the context of a RAP MODIFY operation using the ABAP word FROM (e. g. ... CREATE FROM ... or ... UPDATE FROM ...), %control must be specified.

For specifying the values of the fields, the constants provided in the interface IF_ABAP_BEHV can be used: if_abap_behv=>mk-.... For example, if fields are set with the value if_abap_behv=>mk-on (which stands for 01; off is 00) in a CREATE operation, they are respected by the operation.

In READ operations, the keys must always be used and returned. Hence, unmarking the keys in %control in the context of managed scenarios are ignored.

Type

The components of the %control structure have the following type: ABP_BEHV_FLAG

  • CREATE
  • UPDATE
  • READ IMPORT
  • CHANGE

The component also occurs within the %target component in the context of create- or read-by-association operations.

Example

The following source code section taken from DEMO_RAP_DERIVED_TYPES_CONTROL demonstrates the component %control.

Example

The following source code section taken from DEMO_RAP_DERIVED_TYPES_CONTROL demonstrates how %control might be specified and enabled for all fields for all RAP BO instances in the superstructure of an request.

The example Using %control demonstrates the use of %control with a managed RAP BO.






ROGBILLS - Synchronize billing plans   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 4020 Date: 20240418 Time: 043354     sap01-206 ( 68 ms )