cancel
Showing results for 
Search instead for 
Did you mean: 

Child node attributes do not appear in ABAP WD

Former Member
0 Kudos

Hi,

I have the following context hierarchy (in ABAP WD):

-Context

---Child_Node_A

-


Sub_Child_NodeB

-


AttributeE_of_Sub_Child_NodeB

-


AttributeF_of_Sub_Child_NodeB

-


AttributeG_of_Sub_Child_NodeB

-


Sub_Child_NodeC

-


AttributeH_of_Sub_Child_NodeC

-


AttributeI_of_Sub_Child_NodeC

-


AttributeJ_of_Sub_Child_NodeC

-


AttributeA_of_Child_Node_A

-


AttributeB_of_Child_Node_A

-


AttributeC_of_Child_Node_A

The attributes A, B, C of Child_Node_A are displayed in an ALV grid and the idea is that when the user selects a row in the ALV grid and clicks on a button, a popup is to be shown with additional details of the selected row in the ALV. In this popup, I have some fields which are mapped to the attributes E, F, G of Sub_Child_NodeB and attributes H, I, J of Sub_Child_NodeC. But when I show the popup the fields are empty.

I use a supply function in the Component Controller to fill Child_Node_A and its children, so typically when the popup appears I should see the attributes of the Sub_Child_Node B and C which are linked to the lead selection of the ALV grid (i.e.: Child_Node_A), right?

By the way, I have linked Child_Node_A from the Component Controller Context to the Context of my Main View and Popup View. Also, I checked in the INIT method of my Main view to see if after the supply function has been called the Sub_Child_Nodes attributes were still there for a given lead selection in the ALV grid and they were. But in my action handler to show the popup window from my Main view, I checked again to see if the Sub_Child_Nodes attributes were still there and they were not.

I hope I was clear enough in my explanation.

Thanks in advance for your help,

Christian

Accepted Solutions (1)

Accepted Solutions (1)

thomas_szcs
Active Contributor
0 Kudos

Hi Christian,

We discussed this problem offline, but I would like to give some feedback on what we found out.

(a) Since Child_Node_A had a supply function that also supplied Sub_Child_NodeB and since Sub_Child_NodeB was a singleton, it was not resupplied. The initial element originated from having Sub_Child_NodeB as 1..1 cardinality. In this case the runtime recreates an initial node element upon invalidation of the node.

(b) The second problem might be related to the ALV. As the ALV does not support child nodes being present for the data displayed, the assumption is that Sub_Child_NodeB might have been invalidated once the data was copied back from the ALV to Child_Node_A.

The solution is to have a supply function for Sub_Child_NodeB as well, which will counter any invalidation at any point in time and will restore the original data.

I am curious if (b) is really the cause of the problem described.

Best regards,

Thomas

Former Member
0 Kudos

Hi Thomas,

Here is some feedback regarding the end result of our discussion:

First of all, what I tried was to keep the single supply function for Child_Node_A and I tried to use a simple table instead of an ALV grid and it work fine. I was able to get my data in the popup window. So as you mentioned in (b), it really was the ALV grid that was causing the invalidation of Sub_Child_Node_B.

So since I did not like the simple table option, I finally kept the ALV grid and created a supply function for each sub node of Child_Node_A. This worked out perfectly!

Thanks again for your help!

Christian

Answers (0)