call ABAP consumer service without removing empty tags which has initial values

I admit that the header of this post is complicated enough. I will try to simplify it. Recently one of my friend was getting an error message from an external webservice because he was calling the service but some of the fields of the service were empty or let’s say they had initial values. In this case generated XML payload by SAP does not contain these fields tags in the final XML document. In finally maybe because of a configuration in the provider side, the service was giving an error because of missing tags. After googling we have found out that there is a way of sending these tags despite their missing values. Let’s assume we do not have to fill PHONE and EMAIL fields but we want to add <phone></phone> and <email> </email> fields. Then the following code scnippet will help you.



You may also like