cancel
Showing results for 
Search instead for 
Did you mean: 

How to Implement OVS in Dynamic ALV

Former Member
0 Kudos

Hello All,

I have a dynamic alv for which i need to display one column with OVS . Kindly let me know how to achive this functionality.

i am able to populate and display the data in ALV but unable to understand how to achive OVS in ALV display Kindly Help .

Regards,

Sana.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi, Sana.

Okay, in dynamic ALV realizing OVS is the same with normal.

(1). Add the component "WDR_OVS" as one used component in your WD.

(2).In your dynamic ALV columns, set the OVS input mode to your desired column. Just one EXAMPLE:


* Get ALV columns
  CALL METHOD l_value->if_salv_wd_column_settings~get_columns
    RECEIVING
      value = lt_columns.
* Loop columns
  LOOP AT lt_columns INTO ls_column.

*set OVS for the column
    if  ls_column-id = 'CARRID'.
         "first get your Context NODE information
        co_dynnode_info = lo_node->get_node_info( ).
        "second, set the OVS for the context attribute
        CALL METHOD co_dynnode_info->set_attribute_value_help
           EXPORTING
                name            = ls_column-id
                value_help_mode = if_wd_context_node_info=>c_value_help_mode-ovs
                 value_help      = 'OVS_COMP'.  "Your OVS used component
    endif.

(3).Now, you can implement the event "OVS" of your OVS used component, for example in Component controller.

Note: method type (Event handler); Event (OVS); Component (your declared OVS used component)

Now, you can realize it as usual.

I don't know whether it is clear, hope it can help u a little.

Very glad to discuss with u about this topic.

Best wishes.

Endloop.

Former Member
0 Kudos

Hello Can Tang,

It was the excatly the one which i was searching and trying to achive it. Thanks for the quick reply.

I tried to follow the exact process described by u. But still the column which i want is not displayed as F4 rather it is just greyed out .

Steps Followed :

1. created used component OVS_PHASE and used it in Component controller.

2. loop at columns

lr_root_info = node->get_node_info( ).

CALL METHOD lr_root_info->set_attribute_value_help

EXPORTING

name = lr_column_all->id

value_help_mode = if_wd_context_node_info=>c_value_help_mode-ovs

value_help = 'OVS_PHASE'.

this is what exactly i did ..But Still my column in not displayed as F4 ... Suggest me if i am missing anythng..

Regards,

Sana.

Former Member
0 Kudos

hi, Sana.

Thanks and glad to discuss with you about this topic.

In addition to the coding you post out,

First check you define the column as "Read-Only", i guess maybe you use "Input field" as your Cell editor in ALV, pls follow:


*   Init input control
    CREATE OBJECT lr_input
      EXPORTING
        value_fieldname = ls_column-id.
    lr_column->set_cell_editor( lr_input ).
   lr_input->set_read_only( abap_false ).

And, the most important, you should implement your OVS event handler:


3).Now, you can implement the event "OVS" of your OVS used component, for example in Component controller.
Note: method type (Event handler); Event (OVS); Component (your declared OVS used component)
Now, you can realize it as usual.

Hope it can help you a little,

Best wishes.

Former Member
0 Kudos

Hello Can Tang,

I solved my Problem by following your described procedure thanks a ton for your kind help...

I was missing the input field set cell editor part ..

Regards,

Sana.

Answers (0)