on 04-02-2014 7:20 AM
Hi, Can you please suggest on below scenario :
I have a Node with a sub node in it .
I am using the supply function on Sub Node to retrieve the date based on Parent Node.
There are two ALV's to display parent and item data. The issue is when a filter(user defined filter) is done on Parent table, the supply function does not work. The value is that of the selected row before setting the filter. Even after removing the filter, the item data is stuck and does not change on Lead Selection.
One thing I noticed is if the child table is a table UI, there is no issue. The only problem is when the second table is ALV
Thanks In Advance
Hi Prashanthi,
Your issue can be resolved as below
METHOD set_alv_data.
DATA lo_node TYPE REF TO if_wd_context_node.
DATA lv_path TYPE string.
DATA lv_index TYPE string.
lv_index = r_param->index.
CONDENSE lv_index.
CONCATENATE wd_this->wdctx_my_parent_node
lv_index
wd_this->wdctx_my_child_node
INTO lv_path SEPARATED BY '.'.
lo_node = wd_context->path_get_node(
path = lv_path
).
DATA lo_interface TYPE REF TO iwci_salv_wd_table.
lo_interface = wd_this->wd_cpifc_alv_child( ). "get the ref of alv comp of child
lo_interface->set_data(
EXPORTING
* only_if_new_descr =
r_node_data = lo_node
).
ENDMETHOD.
The above code sets the data node of child alv based on lead selection of parent alv data.
Note: Replace 'parent_node', 'child_node' with your nodes & 'alv_child' with your alv component name of child alv.
If you want to control the data of child alv on filter function, you can use the event ON_STD_FUNCTION_AFTE and once you define the filter you get the r_param->id = 'SALV_WD_FILTER_DEFINE' & now you can clear data of child alv.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prashanthi,
Yes, your changes will not be there once you set data again.
So, you need to create a method 'CONFIG_ALV_CHILD" and place your alv settings logic inside this method and you call this method wherever required.
Now, after set_data method, call method "config_alv_child" as below
lo_interface->set_data(
EXPORTING
* only_if_new_descr =
r_node_data = lo_node
).
" here goes your alv table settings for the child alv
wd_this->config_alv_child( ).
....
You can call this method in WDDOINIT( ) for initial settings.
Hope this helps you.
Regards,
Rama
Hi Prashanthi,
Are you sure that you are making settings for child alv in that custom method? In any case, you might have called parent alv settings or inside the custom method, you might be referring to parent alv component usage.
If still the issue persists, please share the code, for further analysis.
Regards,
Rama
Hi,
when the filter is applied, does the key fields for supply function are having values.
Just a thought.
Regards
Sree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.