Skip to Content

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

Hello,

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • 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.

    Add comment
    10|10000 characters needed characters exceeded