Xis:nill – Constant function (SAP Standard function) example
Requirement:
In case if source system sends any tags(elements) EMPTY then target system expects in <tag-name xis:nil=”true”> format. In general if source tag(element) is EMPTY we will send <tag-name/>. To achieve this we have to use xis:nil –constant function.
Example
Test1: With input value
Test 2: Without element(tag) from source
If source tag is not populated, it will generate target tag with xsi:nil attribute=”true” when we use xis:nil –constant function
<empresa_rut_numero xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
In my case its proxy to file and I don’t have any issue for creating target element with attribute(xis:nil) and namespace(xmlns:xsi) as shown below
<empresa_rut_numero xsi:nil="true"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
In some cases(SOAP request and response) system will reject with xmlns:xsi namespace then you have to apply SAP Note#1786611 ( see the note for more details) to accept that message.