Ansicht
Dokumentation

ABAPDERIVED_TYPES_STATE_AREA - DERIVED TYPES STATE AREA

ABAPDERIVED_TYPES_STATE_AREA - DERIVED TYPES STATE AREA

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

%state_area

%state_area is a component of BDEF derived types. It is a string and used as a component of the reported response parameter and filled by the RAP BO provider.

If this component is filled, the framework interprets a message as state message. Otherwise, a message is interpreted as a transition message.

The %state_area component is mainly relevant for the RAP BO provider in draft scenarios since state messages are persisted until the state of the RAP BO is changed. The string provided is not relevant for the RAP BO consumer. The RAP BO consumer is only interested in knowing whether the message is a transition message or not.

You must manually invalidate state messages, i. e. remove persisted messages, in the RAP BO provider implementation. To identify the messages, use the respective key (%tky) and %state_area string. For example:

Example

APPEND VALUE #( %tky        = instance-%tky
                %state_area = 'STATE_AREA_NAME' )
TO reported-BUSINESS_OBJECT_ENTITY.


You can also use a constant to invalidate all state messages for an instance:

Example

APPEND VALUE #( %tky        = instance-%tky
                %state_area = if_abap_behv=>state_area_all )
TO reported-BUSINESS_OBJECT_ENTITY.


In , state messages can only be accessed via an READ statement. In all other statements, the reported response parameter only contains transition messages.

Type

The component has the following type: STRING

  • REPORTED [EARLY$|LATE]

See more details on message handling in the Development Guide for the ABAP RESTful Application Programming Model, section Messages.

Example

The following source code section taken from the BP_DEMO_MANAGED_ROOT_REPORTED=CCIMP of the global class of the behavior pool BP_DEMO_MANAGED_ROOT_REPORTED demonstrates the component %state_area in the context of a method implementation for a validation that checks field values of RAP BO instances before saving. See the executable program for this example further down.

The example Example for message-related BDEF derived type components demonstrates the use of various BDEF derived type components including %state_area with a managed RAP BO.






CPI1466 during Backup   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 4054 Date: 20240616 Time: 101849     sap01-206 ( 49 ms )