on 09-16-2014 5:39 PM
Hello ByD experts,
I am facing a problem with the TradeReceivablesPayablesRegister BO.
I want to add a Project ID assigned to the Payables and Receivables according to the assignment done on the corresponding Invoices.
The logic is not hard, but the context of the BO is I think.
Here is how the BO is structured:
Root node: NO Public write access, NOT extensible
Item node: NO Public Write Access, IS extensible
ItemOverview node: NO Public write access, NOT extensible
Finally, the QueryByelements is in the ItemOverview Node.
So what I did is I used the query from the ItemOverview node and I extended the Item node with my require extension field.
However, when I code and I am in the ItemOverview after my query, I cannot use the ToRoot or the ToParent association. This is making impossible for me to go and put a value for my extension field in the Item node.
I already encountered a similar problem with a BO structured the same way as this one (ProjectExpenseView BO).
- Is this due to the fact this BO has no Public Write Access?
- Do all the Business Administration Object have no Public Write Access?
- When a BO or its nodes have NO public write access, does this means we cannot even create our own BO and write in it?
- Finally, do I need to ask SAP to release this BO for Public Write Access?
Thank you all for your attention.
Best regards.
Jacques-Antoine
Hello Jacques-Antoine,
The BO ProjectExpenseView is a view BO . This means it is a copy from another Deployment Unit and therefore complete read-only.
Regarding the query on the ItemOverview node and traversing ToParent or ToRoot: This should work. That's what the Overview nodes are developed for.
Can you explain in detail how to you try to acces the Item node?
Thanks,
Horst
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Horst,
actually for this issue I am in the TradePayableReceivableRegister BO.
So first, I did a query on all the items with the BTD ID containing INV* in order to retrieve all the items coming from Invoices.
Then for each item retrieved, I do another query on the corresponding invoice in order to retrieve the Data I need in the Invoice.
From here I want to assign a value to my RetrievedItem's extension field. But I cannot go in the root node of my RetrievedItem. I can just stay in the ItemOverview.
The only thing available to play with the Root is the RootUUID, on which I could perhaps do a Retrieve().
Here is my sample code:
I hope this can help you to understand better my issue.
Thank you very much for your attention.
Best regards.
Jacques-Antoine
Hello Jacques-Antoine,
The "RetrievedItem" is a data structure not a node. Therefore you see all elements of this data structure but nothing from the node like associations, queries, ...
Please replace the statement "resultData = query.ExecuteDataOnly(..." by "resultData = query.Execute(..."
HTH,
Horst
Hello Horst,
You are right. I did find the ExecuteDataOnly was the issue yesterday.
I changed it and it worked!
Thank you very much for your attention. You just answered to me a question I had regarding the documentation. I never quite well understood what meant the "which just includes business object node data" regarding the ExecuteDataOnly, but now I get it.
Bet regards.
Jacques-Antoine
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.