on 01-19-2009 7:34 AM
Hi,
I am new in WD and I'm trying various scenario for studying this argument. I have this problem: I created a node representing a table with a subnode representing another table. The user give a constraint on which the first table is filled; according to value of the first table, second table is filled. The problem is when the first table is empty: when the constraint given by the user causes a no match on the db table, the internal table to bind to the node is empty, so I don't bind anything, leaving the node empty, but in this way, I get a runtime error, because the subnode tells that lead selection of parent node is not set (because is empty!). I thought that if a node is empty the supply function of the subnode are not called, but it seems it is. So .. how can I leave a node empty without having problem with subnode?
Thanks
Gabriele
Hi Gabriele,
Every time when you read a node you will be having the following code:
Here my node is node_t001 declared in the context.
IF lo_el_node_t001 IS INITIAL.
ENDIF.
you can check whether there is any reference in the lo_el_node_t001, if there is no such reference then you will get a short dump which is one of the reasons of getting a short dump.
Write your logic of binding the table in the else part of the above If statement, and this avoids a shrot dump at runtime, especially, when there is no lead selection, or value.
I hope it helps, as it worked in my scenario.
Good day!
Regards,
Shashi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks,
but the error was too deep. I describe in short here hoping help someone will fall in same error: I binded some lements on the layout on element of the subnode. The problem was that when the node has no elements the subnode was not filled and so there was the runtime error because there were the elments pointing to something not existing. That was why the system tell me that there was no lead selection. The solution in my case was to swap parent node and subnode, so that the one that was subnode, now is the parent node and is always allocated while the subnode that now is the subnode, is allocated only if there are values.
Thanks anyway to all
Gabriele
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gabriele,
The supply function gets triggered in 3 cases:
1) The node collection is initial.
2) The lead selection in the parent node collection is changed.
3) The node collection is invalidated programmatically.
I guess that you have set the "Initialization Lead Selection" property to the parent node because of which as soon as you execute your application the first record of your table has a leadSelection. The subnode then uses this lead selection to fetch the data to fill its node with. Try unchecking the "Initialization Lead Selection" checkbox for the parent node.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.