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: 

AVL report Display problem

Former Member
0 Kudos

Hi,

I am changing a stnadard report program.

Its displying output as ALV list display. As per stnadard program its having 4 push buttons in the report out.

I have to remove those and display the 'Change Layout' button in the output.

I have deleted the push buttons, but i am not able to get the button of 'Change Layout'.

Please provide the reason or logic.

Thanks in Advance.

1 ACCEPTED SOLUTION

I355602
Advisor
Advisor
0 Kudos

Hi,

Use the exclude parameter in the FM.

Append the function code for the buttons you want to remove and the pass this internal table.


*FOR EXCLUDING STANDARD BUTTON FROM ALV TOOLBAR
DATA : it_exclude TYPE slis_t_extab,
       wa_exclude TYPE slis_extab.

*&---------------------------------------------------------------------*
*          FOR EXCLUDING STANDARD BUTTONS FROM ALV TOOLBAR
*&---------------------------------------------------------------------*
  wa_exclude-fcode = '&OUP'.
  APPEND wa_exclude TO it_exclude.
  CLEAR wa_exclude.

  wa_exclude-fcode = '&ODN'.
  APPEND wa_exclude TO it_exclude.
  CLEAR wa_exclude.

  wa_exclude-fcode = '&OAD'.
  APPEND wa_exclude TO it_exclude.
  CLEAR wa_exclude.

  wa_exclude-fcode = '&INFO'.
  APPEND wa_exclude TO it_exclude.
  CLEAR wa_exclude.

"similarly append more function codes for standard buttons that needs to be excluded
"you can get to know the func code for the button by enabling debugging at run time
"and check valus for sy-ucomm and append it to it_exclude

*&---------------------------------------------------------------------*
*          DISPLAY RECORDS IN ALV GRID
*&---------------------------------------------------------------------*
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
   i_callback_program                = sy-repid
   it_fieldcat                       = it_field
   it_excluding                      = it_exclude
 TABLES
   t_outtab                          = it_final
 EXCEPTIONS
   program_error                     = 1
   OTHERS                            = 2.

  IF sy-subrc <> 0.
  ENDIF.

Hope this helps you.

Regards,

Tarun

4 REPLIES 4

Former Member
0 Kudos

Hi Anil,

Please check the layout structure you are passing correctly or not??

Because the change layout willl be associated with the layout strucutre.

check whether u r passing all the detials correctly tot he FM.

If u r using classes let me know.

Please revert incase of further help.

Regads

Abhilash.

I355602
Advisor
Advisor
0 Kudos

Hi,

Use the exclude parameter in the FM.

Append the function code for the buttons you want to remove and the pass this internal table.


*FOR EXCLUDING STANDARD BUTTON FROM ALV TOOLBAR
DATA : it_exclude TYPE slis_t_extab,
       wa_exclude TYPE slis_extab.

*&---------------------------------------------------------------------*
*          FOR EXCLUDING STANDARD BUTTONS FROM ALV TOOLBAR
*&---------------------------------------------------------------------*
  wa_exclude-fcode = '&OUP'.
  APPEND wa_exclude TO it_exclude.
  CLEAR wa_exclude.

  wa_exclude-fcode = '&ODN'.
  APPEND wa_exclude TO it_exclude.
  CLEAR wa_exclude.

  wa_exclude-fcode = '&OAD'.
  APPEND wa_exclude TO it_exclude.
  CLEAR wa_exclude.

  wa_exclude-fcode = '&INFO'.
  APPEND wa_exclude TO it_exclude.
  CLEAR wa_exclude.

"similarly append more function codes for standard buttons that needs to be excluded
"you can get to know the func code for the button by enabling debugging at run time
"and check valus for sy-ucomm and append it to it_exclude

*&---------------------------------------------------------------------*
*          DISPLAY RECORDS IN ALV GRID
*&---------------------------------------------------------------------*
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
   i_callback_program                = sy-repid
   it_fieldcat                       = it_field
   it_excluding                      = it_exclude
 TABLES
   t_outtab                          = it_final
 EXCEPTIONS
   program_error                     = 1
   OTHERS                            = 2.

  IF sy-subrc <> 0.
  ENDIF.

Hope this helps you.

Regards,

Tarun

Former Member
0 Kudos

its working fine.

Thanks a lot

Former Member
0 Kudos

Hi,

I want to use the same logic for Hierachical ALV.

But it is not working for that.

Can you plz help in this regard.

thanks in Advance