Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

alv navigation

Former Member
0 Likes
715

My zPROGARM is displaying one ALV output. When an user select one record/cell

its navigate to particular Tcode. but user wants if they click on perticular field then only it has to navigate to perticular tcode not from all records and fields.

1 ACCEPTED SOLUTION
Read only

ascm
Explorer
594

As i did something last week, here is a part of that coding...

Initiate:

try.
        data(salv) = cl_salv_gui_table_ida=>create( iv_table_name = 'EGERR' ).
....
        salv->selection( )->set_selection_mode( if_salv_gui_selection_ida=>cs_selection_mode-single ).
        salv->display_options( )->enable_double_click( ).
        set handler on_double_click for salv->display_options( ).

        salv->fullscreen( )->display( ).
      catch .... into data(lo_exc).
        message lo_exc type 'I'.
    endtry.

Add a double click method to the class.

    class-methods on_double_click for event double_click of if_salv_gui_table_display_opt
      importing ev_field_name
                  eo_row_data
                  sender.

Inside the double click Method:

  method on_double_click.
*-----------------------------------------------------------------------------------------------------------------
    data row_data type zimm_logistikgmc.
*-----------------------------------------------------------------------------------------------------------------

    eo_row_data->get_row_data( exporting iv_request_type = if_salv_gui_selection_ida=>cs_request_type-all_fields
                                importing es_row = row_data ).


    case ev_field_name.
      when 'SERIALNUMMER'.
        set parameter id: 'SER' field row_data-serialnummer,
                          'MAT' field row_data-materialnummer.
        call transaction 'IQ03' and skip first screen.
....

As i did something last week, here is a part of that coding...

Initiate:

try.
        data(salv) = cl_salv_gui_table_ida=>create( iv_table_name = 'EGERR' ).
....
        salv->selection( )->set_selection_mode( if_salv_gui_selection_ida=>cs_selection_mode-single ).
        salv->display_options( )->enable_double_click( ).
        set handler on_double_click for salv->display_options( ).

        salv->fullscreen( )->display( ).
      catch .... into data(lo_exc).
        message lo_exc type 'I'.
    endtry.

Add a double click method to the class.

    class-methods on_double_click for event double_click of if_salv_gui_table_display_opt
      importing ev_field_name
                  eo_row_data
                  sender.

Inside the double click Method:

  method on_double_click.
*-----------------------------------------------------------------------------------------------------------------
    data row_data type zimm_logistikgmc.
*-----------------------------------------------------------------------------------------------------------------

    eo_row_data->get_row_data( exporting iv_request_type = if_salv_gui_selection_ida=>cs_request_type-all_fields
                                importing es_row = row_data ).


    case ev_field_name.
      when 'SERIALNUMMER'.
        set parameter id: 'SER' field row_data-serialnummer,
                          'MAT' field row_data-materialnummer.
        call transaction 'IQ03' and skip first screen.
....
1 REPLY 1
Read only

ascm
Explorer
595

As i did something last week, here is a part of that coding...

Initiate:

try.
        data(salv) = cl_salv_gui_table_ida=>create( iv_table_name = 'EGERR' ).
....
        salv->selection( )->set_selection_mode( if_salv_gui_selection_ida=>cs_selection_mode-single ).
        salv->display_options( )->enable_double_click( ).
        set handler on_double_click for salv->display_options( ).

        salv->fullscreen( )->display( ).
      catch .... into data(lo_exc).
        message lo_exc type 'I'.
    endtry.

Add a double click method to the class.

    class-methods on_double_click for event double_click of if_salv_gui_table_display_opt
      importing ev_field_name
                  eo_row_data
                  sender.

Inside the double click Method:

  method on_double_click.
*-----------------------------------------------------------------------------------------------------------------
    data row_data type zimm_logistikgmc.
*-----------------------------------------------------------------------------------------------------------------

    eo_row_data->get_row_data( exporting iv_request_type = if_salv_gui_selection_ida=>cs_request_type-all_fields
                                importing es_row = row_data ).


    case ev_field_name.
      when 'SERIALNUMMER'.
        set parameter id: 'SER' field row_data-serialnummer,
                          'MAT' field row_data-materialnummer.
        call transaction 'IQ03' and skip first screen.
....