Skip to Content
0
Former Member
Apr 17, 2008 at 02:34 PM

Optional import parameter in abap webservice

436 Views

I am using ECC 6.40. I have generated a webservice for a function module. In this function module i have an import parameter refering to a structure defined in data dictionary (SE11).

The import parameter is optional. I see this in the virtual interface of the webservice. But i would also like to make each field of the structure optional. Goal is that the WSDL will have nillable fields or minoccurs = 0.

What i would like to have is like the wsdl from the bapi BAPI_CUSTOMER_CREATEFROMDATA1

<xsd:element name="PI_COMPANYDATA" minOccurs="0" type="s0:BAPIKNA106" />

- <xsd:complexType name="BAPIKNA106">

- <xsd:sequence>

- <xsd:element name="TITLE" minOccurs="0">

- <xsd:simpleType>

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="30" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

- <xsd:element name="TITLE_KEY" minOccurs="0">

- <xsd:simpleType>

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="4" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

In my case i get for the my defined structure ZcvClientfilterRec:

<xsd:element name="FilterLow" minOccurs="0" type="tns:ZcvClientfilterRec" />

- <xsd:complexType name="ZcvClientfilterRec">

- <xsd:sequence>

<xsd:element name="Clientno" type="n0:char10" />

<xsd:element name="Clientgroup" type="n0:char2" />

<xsd:element name="Clientstatus" type="n0:char3" />

Can anyone help me with this or tell my how i can generate the wsdl so it looks like the standard bapi