cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro ALV is not displaying

former_member246634
Active Participant
0 Kudos

Hi experts.

As title of this discussion suggests I have a problem with displaying ALV in Web Dynpro. I read many tutorials and everyhing I've done looks ok, but I don't understand why my code isn't working as intended.

1. I've added node GT_PERSONS to ComponentController. In field "Dictionary Structure" i put name of my own structure.

2. I've copied that node to my View (mapping is created).

3. I've created ViewContainerUIElement called "INW_ALL_ITEM" in my View layout and also a button "ShowALV".

4. Here is mine Window Structure:

5. In InterfaceController_Usage node "DATA" is the same type as my node GT_PERSONS and it's mapped with(?) it.

6. I set event to my button, method was created automatically. In this method I put my code (seletcs and other stuff to populate my internal table)

7. Here's the code which in my opinion should bind my data to ALV's node and display it:


DATA lo_nd_item_tab_alv TYPE REF TO if_wd_context_node.

DATA lo_el_item_tab_alv TYPE REF TO if_wd_context_element.

DATA ls_persons TYPE wd_this->element_gt_persons.

lo_nd_item_tab_alv = wd_context->get_child_node( name = wd_this->wdctx_gt_persons ).

lo_nd_item_tab_alv->bind_table( lt_alv_persons ).

   wd_this->gt_persons[] = lt_alv_persons[].

Can you please tell me if I am doing something wrong? If you need more info please tell me about and I'll try to provide it ASAP.

Thank you all in advance

Bartłomiej.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You have to instantiate the ALV component. you wont get ALV as u do binding for tables.

FOllow this document.

http://scn.sap.com/docs/DOC-36117

Answers (5)

Answers (5)

former_member211591
Contributor
0 Kudos

Hi,

please check if the visibility-property of the ALV's viewcontainer is set to "none" or maybe you have a transparent  container surrounding your ALV's viewcontainer with visibility = none.

That easy?

regards

ismail

former_member246634
Active Participant
0 Kudos

Visibility is set to "Visible" in ALV's viewcontainer and transparent container.

//Still doesn't work

Former Member
0 Kudos

Vijay Vikram gave the rigth answer:     

You have to instantiate the ALV component. you wont get ALV as u do binding for tables.

FOllow this document.

http://scn.sap.com/docs/DOC-36117

Former Member
0 Kudos

Change the layout from flow to matrix layout and put it as MATRIX head data. it will appear.

former_member246634
Active Participant
0 Kudos

I changed layout of the container where UIElement is, but nothing changed.

harsha_jalakam
Active Contributor
0 Kudos

Hi Borucki ,


Please correct the lines marked in bold. The table has been binded with empty internal table , so I guess it showing empty




DATA lo_nd_item_tab_alv TYPE REF TO if_wd_context_node.

DATA lo_el_item_tab_alv TYPE REF TO if_wd_context_element.

DATA ls_persons TYPE wd_this->element_gt_persons.

lo_nd_item_tab_alv = wd_context->get_child_node( name = wd_this->wdctx_gt_persons ).


wd_this->gt_persons[] = lt_alv_persons[].


lo_nd_item_tab_alv->bind_table( lt_alv_persons ).




Regards,

Harsha

 

former_member246634
Active Participant
0 Kudos

Your solution could work if I was binding "gt_persons" table.

Maybe something is wrong with UIElement properties:

harsha_jalakam
Active Contributor
0 Kudos

I guess UI properties are fine, are you able to see all other elements in the view?Please try making the Table component as the default view again and try activating the entire component and give a try

former_member246634
Active Participant
0 Kudos

Everything is visible apart from my ALV. I compared it to some tutorials and other ALV made by someone else in the same package that I work with and everything (code, bindings, mappings etc.)  looks the same. I have no idea why my ALV is not visible.

harsha_jalakam
Active Contributor
0 Kudos

Hi Borucki ,


Can you please let us what error you are facing? Is the alv not visible or the data is not showing up in the table?


Regards,

Harsha

former_member246634
Active Participant
0 Kudos

ALV is not visible. I can't see anything.

harsha_jalakam
Active Contributor
0 Kudos

Hi Borucki,

Make sure that you have embedded correct Table component into the ViewContainer UI element. It is possible that you might have created 2 alvs mapped data to one and embedded table component of other into ViewContainer.

Regards,

Harsha

matt
Active Contributor
0 Kudos

Have you mapped your data context to that of the ALV component? It's an external mapping.

former_member246634
Active Participant
0 Kudos

If you are talking about this part then I think it's mapped.