SAP ABAP Message Class SPRX Message Number 070 (Avoid using tables without surrounding tag for individual lines)
Hierarchy
SAP_BASIS (Software Component) SAP Basis Component
   BC-DWB-PRX (Application Component) Proxy Generation
     SAI_PROXY_GENTIME (Package) ES Tools: Proxy Generation
Attribute
Message class SPRX  
Short Description Proxy Generation    
Message Number 070  
Documentation status       Space: object requires documentation
Authorization check Error Message      
Changed On 20130531   
Message Text
Avoid using tables without surrounding tag for individual lines
Help Document

Diagnosis

The interface description defined a repetition group (a strictly table-type structure):

  • <sequence maxOcxurs="unbounded">
  • <choice maxOcxurs="unbounded">
  • <group maxOcxurs="unbounded">

We do not recommend this definition because the individual table rows in the XML instance do not have a surrounding tag.

Example
The XML schema contains:
<element name="Struc">
<complexType>
<sequence>
<element name="Field1" type="string"/>
<sequence maxOccurs="unbounded">
<element name="Field2" type="string" minOccurs="0"/>
<element name="Field3" type="string" minOccurs="0"/>
</sequence>
<element name="Field4" type="string"/>
</sequence>
</complexType>
</element>

A valid XML fragment is as follows:
<Struc>
<Field1>xxx</Field1>
<Field2>yyy</Field2>
<Field3>zzz</Field3>
<Field2>xxx</Field2>
<Field3>yyy</Field3>
<Field4>zzz</Field4>
</Struc>

In this scenario there are several problems for the handling of the mapping between ABAP structures and xml data:

1. If all fields are optional it is impossible to derive all table rows uniquely. In the above example, the ABAP table could have 2, 3 or 4 lines.

2. If some of the optional fields are missing, the simple transformation used for mapping the xml to ABAP will have problems determining when the table lines are finished and might even lose the information of <Field4>, ie there is a risk of dataloss.

3. In some situations, e.g. with tables inside tables, some of which have no line tags, endless loops may occur inside the simple transformation.

System Response

A warning appears for this type.

Procedure

Define the repetition groups with
<element maxOccurs="unbounded" ...>

Procedure for System Administration

History
Last changed on/by 20140121  SAP 
SAP Release Created in   620