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: 

Not Getting the icons on ALV toolbar while using OOPS ALV

spartans007
Participant
0 Kudos
2,063

Hello,

I want to enable the ABC Analysis and Word processing in Specific.

I have use the cl_salv_functions_list Method . Below is my code.

Can Someone please help me out to Enable the ABC Analysis and Word Processing?

Thank You.


  DATA: lo_gr_alv       TYPE REF TO cl_salv_table,
        lo_gr_functions TYPE REF TO cl_salv_functions_list.

  DATA: "lo_selections type ref to cl_salv_selections,
    lo_columns TYPE REF TO cl_salv_columns,
    lo_column  TYPE REF TO cl_salv_column_table.

  DATA: lo_header  TYPE REF TO cl_salv_form_layout_grid,
        lo_h_label TYPE REF TO cl_salv_form_label,
        lv_text    TYPE char100.


*Create alv object.
  TRY.
      CALL METHOD cl_salv_table=>factory
        IMPORTING
          r_salv_table = lo_gr_alv
        CHANGING
          t_table      = gt_sel.

    CATCH cx_salv_msg.

  ENDTRY.

* Show all alv functions.
  lo_gr_functions = lo_gr_alv->get_functions( ).
  lo_gr_functions->set_all( abap_true ).
  lo_gr_functions->set_abc_analysis( abap_true ).
  lo_gr_functions->set_export_wordprocessor( abap_true ).

* Fit the columns
  lo_columns = lo_gr_alv->get_columns( ).
  lo_columns->set_optimize( abap_true ).


* Display alv
  lo_gr_alv->display( ).
1 ACCEPTED SOLUTION

xiaosanyu
Participant
1,866
lo_gr_alv->set_screen_status( pfstatus      = 'STANDARD_FULLSCREEN'
                              report        = 'SAPLSLVC_FULLSCREEN'
                              set_functions = lo_gr_alv->c_functions_all
).

add after "ENDTRY"

9 REPLIES 9

xiaosanyu
Participant
1,867
lo_gr_alv->set_screen_status( pfstatus      = 'STANDARD_FULLSCREEN'
                              report        = 'SAPLSLVC_FULLSCREEN'
                              set_functions = lo_gr_alv->c_functions_all
).

add after "ENDTRY"

1,866

Or same solution, but using a custom copy of standard SALV GUI status SAPLSALV_FUNCTIONS_STATUS / SALV_TABLE_STANDARD + these extra function codes:

  • ABC analysis: &ABC
  • Word Processing: &AQW

0 Kudos
1,865

I was able to enable the ABC analysis. But When i tried to use it, it shows me an error as below.

TYPE "LIFNR" is unknown.

What else needs to be done?

Any help or support on this issue

Sandra_Rossi
Active Contributor
0 Kudos
1,865

Weird that ABC analysis is not proposed anywhere in standard full screen ALV, but is proposed in standard container mode via the Export button...

spartans007
Participant
0 Kudos
1,865

There is No export button available.

Sandra_Rossi
Active Contributor
0 Kudos
1,865

I agree with you, it's what my previous comment says. Maybe my comment is not clear enough: you have tried the fullscreen SALV, and my comment is to say that if you display SALV inside a CL_GUI_CONTAINER control, you can see the buttons above where you can select ABC Analysis. These are two completely different things that SALV inside CL_GUI_CONTAINER control proposes ABC Analysis to the user as a menu option instead of a button, and that fullscreen SALV doesn't propose anything (neither menu option nor button). The only option in fullscreen SALV to run the ABC analysis is to type &ABC in the command field, but it's more a temporary workaround.

spartans007
Participant
0 Kudos
1,865

Thank you so much this solution worked for me.

1,865

Please use the COMMENT button for comments, asking for complements, adding details, replying to a comment or a proposed solution or to the OP question, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.

If you want to target someone, if this person has posted an Answer, use the button COMMENT, if this person is the Original Poster of the question he/she will be automatically informed, otherwise copy/paste their hyperlinked name so that the person receives a warning (NB: @ doesn't work/but typing this character will suggest hyperlinked names).

0 Kudos
1,865

Ok i will