Skip to Content

How to add nodes within a Custom Object to a custom datasource?

We have a custom business object with a node.

The customer wants all the data (elements on the root and elements on the node) to be added to a datasource.

However, when we create the datasource on the root node there is no option to select the subnode's fields to be included.

If we create the datasource on the subnode then the report does not show the root node's ID.

Is it possible to include al the elements from the root node and all subnodes in a custom datasource?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 17 at 07:10 PM

    Hi ,

    As per Sap standards you can create based on node then only you will get root Fields in data sources,other wise you will get only root data fields. And

    Root field stores single value only but node and sub-node values ready store multiple values for same array

    If you want complete data like root and node.

    Create a data source for only Node then automatically root elements will come.

    If you have sub node create forsubnode then node,Root fields automatically come...

    Regards,

    Patan Rabbani

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 18 at 01:54 PM

    You need to create two separate data sources via the SAP Cloud Applications Studio.

    1. Create a data source with the subnode as the anchor. Include the primary key (or alternative key) from the root node in this data source via the ToRoot association.

    2. Create a data source with the root node as the anchor.

    Now, create a third data source from the ByDesign application, which is a join of the above two. The join should be a left outer join with the second data source (the one which has a root node as the anchor) as the main one, & then add all the characteristics that you need from either node.

    This third data source should give you all entries in both the nodes including the ones where the subnode does not have any entries.

    Add comment
    10|10000 characters needed characters exceeded