cancel
Showing results for 
Search instead for 
Did you mean: 

Standard Program - WDT_ALV

Former Member
0 Kudos

Hi,

Upon Execution this program you will get selection screen and out put alv in the same screen.

is there any way to make it first column as url link & let me know how to find which record is selected from the list.

Appreciate with your help.

Thanks

****Poorna Poorna****

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Since you state that this is a standard application, then you should consider using the Enhancement Framework to make such a change.

http://help.sap.com/saphelp_nw70/helpdata/en/c5/f4b9422e0fb911e10000000a1550b0/frameset.htm

You will likely need one of the method enhancements at the controller level so that you can interact with the ALV model object. You will have to call the APIs of the ALV model to adjust the rendering of the ALV.

Answers (3)

Answers (3)

Former Member
0 Kudos

Plz explain me which respect to this WDT_ALV standard program.

*****Poorna*****

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Go to WDDOINIT of the view MAINVIEW. This is where the ALV initialization logic is. Add the following lines of code to the end of this method:

lr_column = lr_column_settings->get_column( 'AIRLINEID' ).
  DATA link TYPE REF TO cl_salv_wd_uie_link_to_action.
  CREATE OBJECT link.
  link->set_text_fieldname( 'AIRLINEID' ).
  lr_column->set_cell_editor( link ).

This will adjust the rendering of the first column.

http://help.sap.com/saphelp_nw70/helpdata/en/42/fb6a6246a21bc8e10000000a11466f/frameset.htm

Responding to the event is little different however. The ALV raises several standard events for any UI elements within its rendering. You use the ON_CLICK event exposed by the ALV:

http://help.sap.com/saphelp_nw70/helpdata/en/c9/6af78ae2794f71a9f303e7fc19323b/frameset.htm

You can register a callback event handler within your view and register it for this ALV event.

The importing parameter of R_PARAM gives you the index of the row that the action was performed upon.

Former Member
0 Kudos

Hi Thomas,

I have created ALV as per my requirement successfully.

How can i hide a field in ALV - it can/can't be avialble in settlng where you can filter.

But my requirement is how to hide the fields in Webdyn pro alv.

In Normal ECC ALV "no_out" property can be used from the field catalogs but what would be in Webdynrpo?

can you plz suggest me?

********Poorna********

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can "Hide" the field using code, but it is really just removed from view and still available via ALV settings. To completely remove it, the field must not exist in the context node that you bind the ALV to.

Former Member
0 Kudos

yes can you plz let me know the code.

********Poorna**********

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

The code for hiding a column?

data: l_ref_cmp_usage type ref to if_wd_component_usage.
  l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
  if l_ref_cmp_usage->has_active_component( ) is initial.
    l_ref_cmp_usage->create_component( ).
  endif.

  data l_salv_wd_table type ref to iwci_salv_wd_table.
  l_salv_wd_table = wd_this->wd_cpifc_alv( ).
  data l_table type ref to cl_salv_wd_config_table.
  l_table = l_salv_wd_table->get_model( ).
  data l_column type ref to cl_salv_wd_column.
  l_column = l_table->if_salv_wd_column_settings~get_column( 'CLIENT' ).
  l_column->set_visible( cl_wd_uielement=>e_visible-none ).

Former Member
0 Kudos

Yes - as when i click on this cell i wanted to perform some task.

My question:

How do we know which record selected in alv and how to make it cell as link.

Thanks

*****Poorna****

Former Member
0 Kudos

Hi,

Thanks for the reply.

Actually i have copied this program into some Z-program. Reason i given this program is everybody can see in their own system.

Now can you tell me some idea or useval code.

Thanks

Suresh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

So you have already decided to copy the component, then what exactly do you need help with? Do you just want to know how to use a link cell editor?