Application Development 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: 

Move OOALV toolbar to Application toolbar

Former Member
0 Kudos
112

Hi experts,can we move OOALV toolbar to Application toolbar?

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos
83

No it is not possible ,instead you can try with CL_SALV_TABLE if you are on higher versions.

5 REPLIES 5

Former Member
0 Kudos
83

Hello,

This is not possible as we would be using Custom Container for this.

Thanks and Regards,

Venkat Phani Prasad Konduri

former_member188685
Active Contributor
0 Kudos
84

No it is not possible ,instead you can try with CL_SALV_TABLE if you are on higher versions.

0 Kudos
83

Thanks Vijay, by using CL_SALV_TABLE can we have the same toolbar? Iam using ECC 6.0.Can u give any example?

0 Kudos
83

check this sample code.

report  ztest_salv.

data: alv type ref to cl_salv_table.
types: begin of ty_tab,
         carrid type sflight-carrid,
         connid type sflight-connid,
       end of ty_tab.
data: col_tab type ref to cl_salv_columns_table,
      col type ref to cl_salv_column_table.

data: col_ref type   salv_t_column_ref,
      wa like line of col_ref.

data: it_flight type standard table of ty_tab.

select carrid connid from sflight into table it_flight
up to 10 rows.

cl_salv_table=>factory(
  importing
    r_salv_table   = alv
  changing
    t_table        = it_flight
       ).
"get all the columns
col_tab = alv->get_columns( ).
col_ref = col_tab->get( ).
"loop each column
loop at col_ref into wa.
  "Conditionally set the column type as key or non key
  if wa-columnname   = 'CARRID'.
    col ?= wa-r_column.
    col->set_key( abap_true ).
    col->set_cell_type( 5 ).
  endif.
endloop.
data: lr_functions type ref to cl_salv_functions_list.
lr_functions = alv->get_functions( ).
lr_functions->set_all( abap_true ).
alv->display( ).

0 Kudos
83

Thanks Vijay,but the toolbar I was asking was OOALV toolbar,like insert/Delete/Add rows buttons,the toolbar Iam getting is REUSE_ALV.....toolbar.Hope Iam clear in my questian.