
Processing Default and Initial Values
Use
For an initial interface parameter in ABAP, you do not know whether the parameter was given a value or not. In addition, there are XSD standards that cover default values. The following standard procedure exists for proxy generation:
Standard Procedure for Default Handling
|
Outbound Interface |
When generating the XML data stream, the default value is set in all initial fields. |
|
Inbound Interface |
Inbound processing of the proxy framework sets empty and missing tags to the default value before the application is called. |
To improve performance, optional, initial, scalable elements with a default value are suppressed in the message.
You can override this standard procedure.
Prerequisites
If you choose to override the standard procedure this will affect system performance. This is because the additional information must be evaluated when you construct the message or it must be supplied during parsing. For this reason, both outbound and inbound proxies have the attribute
extended_xml_handling:The attribute is not set in both cases in the default setting (
extended_xml_handling = space).Controlling at the Sender
The ABAP proxy generation functions generate control tables of type
PRXCTRLTAB (line type PRXCTRL) for each complex type. This component has the name CONTROLLER (not to be confused with the parameter CONTROLLER of the method EXECUTE_SYNCHRONOUS or EXECUTE_ASYNCHRONOUS). Using this table you can define for each individual field whether it is to occur in the message, and how. For a table line, set the field FIELD to the ABAP field names, the field VALUE to a value from the type pool sai, and attach the line to the table. The field VALUE can have the following values:Value Range for Field VALUE of Table CONTROLLER
|
Value |
Meaning |
|
sai_ctrl_initial |
Field appears with type-correct initial value in the message; it controls default handling and performance optimization. Value is ignored for structures or complex types. |
|
sai_ctrl_nil |
The value xsi:nil is sent in the message for this field. |
|
sai_ctrl_none |
Field does not occur in message, but independently of this value and the default. |
Interpretation of the Control Table on the Receiver Side
On the inbound side as well, the control table is generated in the same way as every other structure. In this case, the Proxy Framework completes the control table during parsing with values that the application can then evaluate.
Possible Values of the Field VALUE or the CONTROLLER table on the Inbound Side
|
Value |
Meaning |
|
sai_ctrl_initial |
Initial value is send for the field. |
|
sai_ctrl_nil |
The value xsi:nil was sent in the message for this field. |
|
sai_ctrl_none |
Field not part of the message. |