on 11-06-2014 1:23 PM
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.
You have to instantiate the ALV component. you wont get ALV as u do binding for tables.
FOllow this document.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Change the layout from flow to matrix layout and put it as MATRIX head data. it will appear.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you mapped your data context to that of the ALV component? It's an external mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.