Introduction

Service Objects when used to return complex structures will not do so correctly under the following circumstances:

  • The Service Object's method is executed but when more than one complex structure is returned only one of the structures has data
  • The direction for the parameter is set to IN/OUT, which means the result of method execution will be blank

Error Scenario

The error occurs when a Service Object is created using a BAPI and the Service Method writes data to a field within SAP. The BAPI parameter requirements differ from the manner in which they are treated by SAP. For example, on the Service Object's Method Edit screen the Service Object has been created with the paramter set to required, but SAP treats them as optional.

To work around the above problem, the Service Method parameters could be created with the direction parameter set to IN/OUT. However, if this approach is used then when the method is executed the resulting return structure is blank.

The hotfix will resolve the two issues that were described in scenario above:
  • When the Service Object's method is executed but when more than one complex structure is returned only one of the structures has data
  • When a custom function is created using "In/Out" direction settings for properties, the return struct is blank

Error Resolution

The corresponding Hotfix to resolve this issue is not available as a public download. Please contact your regional support center to get the Hotfix.