Skip to Content

How to hide empty tags / elements in SAP Data Services (SDS/BODS)

Apr 19, 2017 at 07:56 PM


avatar image


I've tried searching but haven't succeeded - sorry if this is a common question.

I'd like to use SAP Data Services to export from a database table to XML - we will use something like:

Source table -> Query Transform -> XML File (e.g. Nested Schema Template)

Some of the source fields contain no data i.e. the value of the field is blank or null. The output XML looks like this for an empty field: <SAP_DESCRIPTION></SAP_DESCRIPTION>.

Is there any way to suppress this i.e. to not output the <...></...> and just output nothing? I've tried making the source field Optional - this doesn't work. Thanks, Chris

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Chris Lumb Jun 05, 2017 at 09:27 AM

I also contacted SAP Support - they suggested that this could be done with XML_Map but I'm not sure how.

I think we will end-up doing this via a Python script - either parsing the XML or using regex.

10 |10000 characters needed characters left characters exceeded