Let's follow up this discussion at the Neptune Community
(this forum will be kept in read-only mode)
I can not find any usable examples for this new object. Especially how do I select a row ????
Have you checked out the following example in Neptune Explored ?
You can always download it and import it into your system.
you started asking in a public forum topic, but every time you reply you are opening a new private support ticket.
If you agree, please let's follow in the forum topic so that it helps all other developers. :)
(I will also paste this answer there).
I have to admit I had to guess a bit what you really needed since it was just a one line question:
"I can not find any usable examples for this new object. Especially how do I select a row ????"
Cool. You found the answer, var value = oTreeTable.getSelectedIndex();
Now, regarding your last question: "why ist he TableTree greyed out for sending ?"
as Neptune does not use Nested structures, the Treetable implementation is in fact a flat table on the ABAP side (IT_DATA) which has a "key" and a "parent" field. Then, in runtime (JS) the Flat table is converted into a Nested Structure and set into the TreeTable object.
If you want to send some data back, then you have to use a new model. Tipically it can be a sap.ui.table.
So for example, if you want to send "the user-selected row to the backend", the way to do it is:
1 - on the SelectionChange event of the TreeTable, you get the selected row and therefore you can get each field values (like matnr, date, etc).
2 - put those values in a new model (can be a hidden sap.ui.table or a list).
3 - in your ajax call, send the model which has been poputaled in step 2.
Have you checked out Neptune Explored? Samples, Videos & Documentation www.neptune-software.com/explored
Finally, I have updated the oTreeTable.rowSelectionChange event of the given example so that you can see how to get the values for each field of the selected row.
I am having a hard time understanding:
1 - what do you want to do. (this post started as a question: "how to select a row")
2 - what is the problem that stops you from doing it.
If you can send me a lot of screenshots (the more the better), I will be grateful.
Hi Julian I hope this makes it more clear. I know that is not typical SAP Transaction Logic.
sorry but it is really difficult for me to understand. (specially what oObject - popup is).
It seems the problem you have is that you want to send and receive data to the backend class.
For the "GUID" or whatever other field value you want to send, just create a hidden page or a hidden panel object and bind it to an ABAP structure (workarea).
Then, send back and fort this workarea to the ABAP class in every ajaxCall (so that you never loose its values).
Finally I do not recommend you to use a TreeTable for this scenario. Just use a normal Table, populate it with the values you need and send it back and forth in the ajax calls.
ajax calls (getOnline...) are asynchronous, meaning that the first one you trigger might not be the first backend call that is finished.
Why do you need three ajax calls anyway? Just create one call, trigger your ABAP logic sequentially in the backend, and receive all data models at once:
Hope this is helpful and not more confusing :)
Have a great weekend!
Thanks for the update, Andreas. I am glad to know you moved back to the table. :)
Looking forward to your training in the upcoming week.