Skip to Content
Author's profile photo Fred K

How to show Items (Nodes) using a Root-Level Query

Hi everyone,

This is the solution to the problem of Root-Level Query How custom queries work on OWL. Special thanks to Horst Schaude who gave me the idea. The main problem is that only Root-Level elements can be shown (bound) to the datamodel. So if a BO contains nodes, the node-level elements can only be used for searching and no more.Here is the solution. NodeID of the RootLevel query. That NodeID is automatically generated when the RootLevel query is createdIf we have the NodeID of an instance, we can get everything of that instance. That is the idea. So simple.

RLCQ1.png

We are going to perform a BO Operation READ using that NodeID.

Ok. So when do we need to show the details?

Whenever we select any row of the datalist.
Then, we are going to READ the BO on OnLeadSelectionChange event of that datalist.

1. First , add an Advance List Pane to the pain container not to the detail area of the already-existing Advance List Pane.

           RLCQ2.png

2.Bind the new DataList with Item of SalesOrder and bind the Item elements as shown below.

            RLCQ3.png

3. Add the NodeID from SalesOrder to Root in datamodel. We are going to need that NodeID for READ operation.

  

RLCQ4.png

4. Create an Event handler of BO Operation READ.

RLCQ5.png

5. Assign the event handler to the OnLeadSelectionChange event of RootLevel in datamodel.

RLCQ6.png

6. Done. Let’s activate and test it.

RLCQ7.png

RLCQ8.png

Update : The above set up is not needed anymore to show the item node instances. Just bind the Item data list with the Item node under ToParent of the query in Data Model. (RootLevel->ToParent->Item)

Thanks for reading.

Fred.

 

 

Assigned Tags

      7 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo GHANSHYAM KAMANI
      GHANSHYAM KAMANI

      Hi Fred,

      Can you please help in reading Item data using ItemNodeID/ItemUUID ?

      https://answers.sap.com/questions/178833/how-to-read-specific-bo-item-data-in-xbo-using-ite.html

       

      Thanks,

      Ghanshyam

      Author's profile photo Fred K
      Fred K
      Blog Post Author

      Hi Ghansyam,

       

      You have already accepted Host's answer. You still cannot get it right?

       

      Best Regards,

      Fred

      Author's profile photo GHANSHYAM KAMANI
      GHANSHYAM KAMANI

      Yes Fred,

      Somehow I am not able to read selected line item? Can you please advise?

      What should be the datamodel to read user specific line item in Opportunity.xbo if Opportunity is having more than 2 line items?

       

      Thanks,

      Ghanshyam

       

      Author's profile photo Fred K
      Fred K
      Blog Post Author

      Hi Ghanshyam,

       

      I have never done with 3-level nodes on standard screens.

      1. Source screen must have an output with ItemUUID which can be triggered whenever an item is selected.
      2. Root of EC should be in Item level (not sure it is possible or not)

       

      I recommend you to create a sperate custom BO which has Item as Root and ItemQuantityPlan as Item.

      businessobject CustomEC{

      [AlternativeKey] uuid: UUID ; // to hold ItemUUID from source screen

      node ItemQuantityPlan[0,n]{

        element AnualQuantity: Quantity;

       ...

       ...

      }

      }

      Bind your EC with above business object and add it to source screen.

      ※These are just suggestion because I cannot test it right now.

      Cloud Application Studio: Add EC with custom BO to standard screen ...

      Best Regards,

      Fred

      Author's profile photo GHANSHYAM KAMANI
      GHANSHYAM KAMANI

      Thanks Fred.

      Already implemented using custom BO concept. As its just a READ operation, I was thinking of any better alternate solution rather than going for extra creation of table(Custom BO).

       

      Thanks,

      Ghanshyam

      Author's profile photo Fred K
      Fred K
      Blog Post Author

      Hi Ghanshyam,

       

      Opportunity BO is yet not node-extensible in ByD. And I have access only to ByD.

      And I cannot find any outport in Opportunity OIF screen that can give ItemUUID.

       

      Best Regards,

      Fred

      Author's profile photo GHANSHYAM KAMANI
      GHANSHYAM KAMANI

      Hi Fred,

      In SAP C4C, Opportunity BO is extensible, which gives selected line ITEMUUID in Outport.

      Btw, Problem resolved.

       

      Thanks,

      Ghanshyam