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

hi all oops

Former Member
0 Likes
286

hi all

i would like to know how to creat gui status in the oops. since i am new to this, steps are expected

here is my code

class lcl_handle_events definition.

public section.

methods: on_user_command for event added_function of cl_salv_events

importing e_salv_function,

on_double_click for event double_click of cl_salv_events_table

importing row column.

endclass.

data : event_handler type ref to lcl_handle_events.

start-of-selection.

select * into corresponding fields of table ispfli from spfli up to 100 rows .

call method cl_salv_table=>factory

importing

r_salv_table = gr_table

changing

t_table = ispfli.

gr_table->set_screen_status(

pfstatus = 'SALV_TABLE_STANDARD'(001)

report = sy-repid

set_functions = gr_table->c_functions_all ).

gr_events = gr_table->get_event( ).

create object event_handler.

set handler event_handler->on_user_command for gr_events.

set handler event_handler->on_double_click for gr_events.

gr_selections = gr_table->get_selections( ).

gr_selections->set_selection_mode( 1 ).

gr_table->display( ).

class lcl_handle_events implementation.

method on_user_command.

  • Get the selection rows

data: lr_selections type ref to cl_salv_selections.

data: lt_rows type salv_t_row.

data: ls_rows type i.

data: message type string.

case e_salv_function.

when 'MYFUNCTION' .

lr_selections = gr_table->get_selections( ).

lt_rows = lr_selections->get_selected_rows( ).

read table lt_rows into ls_rows index 1.

read table ispfli into xspfli index ls_rows.

concatenate xspfli-carrid xspfli-connid xspfli-cityfrom xspfli-cityto into message separated by space.

message i001(000) with 'You pushed the button!' message .

endcase.

Endmethod.

method on_double_click.

data: message type string.

data: row_c(4) type c.

row_c = row.

concatenate 'Row' row_c 'Column' column into message separated by space.

message i001(000) with 'You double-clicked on ' message.

endmethod.

thanx

rocky

hi all

i would like to know how to creat gui status in the oops. since i am new to this, steps are expected

here is my code

class lcl_handle_events definition.

public section.

methods: on_user_command for event added_function of cl_salv_events

importing e_salv_function,

on_double_click for event double_click of cl_salv_events_table

importing row column.

endclass.

data : event_handler type ref to lcl_handle_events.

start-of-selection.

select * into corresponding fields of table ispfli from spfli up to 100 rows .

call method cl_salv_table=>factory

importing

r_salv_table = gr_table

changing

t_table = ispfli.

gr_table->set_screen_status(

pfstatus = 'SALV_TABLE_STANDARD'(001)

report = sy-repid

set_functions = gr_table->c_functions_all ).

gr_events = gr_table->get_event( ).

create object event_handler.

set handler event_handler->on_user_command for gr_events.

set handler event_handler->on_double_click for gr_events.

gr_selections = gr_table->get_selections( ).

gr_selections->set_selection_mode( 1 ).

gr_table->display( ).

class lcl_handle_events implementation.

method on_user_command.

  • Get the selection rows

data: lr_selections type ref to cl_salv_selections.

data: lt_rows type salv_t_row.

data: ls_rows type i.

data: message type string.

case e_salv_function.

when 'MYFUNCTION' .

lr_selections = gr_table->get_selections( ).

lt_rows = lr_selections->get_selected_rows( ).

read table lt_rows into ls_rows index 1.

read table ispfli into xspfli index ls_rows.

concatenate xspfli-carrid xspfli-connid xspfli-cityfrom xspfli-cityto into message separated by space.

message i001(000) with 'You pushed the button!' message .

endcase.

Endmethod.

method on_double_click.

data: message type string.

data: row_c(4) type c.

row_c = row.

concatenate 'Row' row_c 'Column' column into message separated by space.

message i001(000) with 'You double-clicked on ' message.

endmethod.

thanx

rocky

1 REPLY 1
Read only

former_member199581
Active Participant
0 Likes
268

You can create the GUI Status for an OO program in the same way you create it in a Standard Program..

Just launch SE80, set your program, rigth-click -> create -> GUI Status.

Hope this helps,

Roby.