SAP DERIVED TYPES STATE AREA ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• %state_area ABAP_BDEF_DER_TYP_COMP

%state_area

ABAP_USE
%state_area is a component of BDEF derived types. It is a character string of type string and used as a component of the REPORTED RAP response parameter. It is 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.
In ABAP_EML , state messages can only be accessed via an ABAP_EML READ statement. In this case, the %state_area component is filled with the value %STATE. In all other ABAP_EML statements, the reported response parameter only contains transition messages.
The %state_area component is mainly relevant in the following contexts:
draft scenarios because state messages are persisted (in table RAP_MESSAGES) 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 transition messages.
finalize and check_before_save RAP saver methods in unmanaged RAP business objects
RAP determinations and validations in managed RAP business objects
ABAP_NOTE You must manually invalidate state messages, i. e. remove the assignment of persisted messages, in the RAP BO provider implementation. To identify the messages, use the respective key ( %tky) and %state_area string. For example:

ABAP_EXAMPLE_VX5 APPEND VALUE #( %tky = instance-%tky
%state_area = 'STATE_AREA_NAME' )
TO reported-rap_bo_entity.
ABAP_EXAMPLE_END
You can also use a constant to invalidate all state messages for an instance:

ABAP_EXAMPLE_VX5 APPEND VALUE #( %tky = instance-%tky
%state_area = if_abap_behv=>state_area_all )
TO reported-rap_bo_entity.
ABAP_EXAMPLE_END
Type
The component has the following type: STRING