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

Former Member
0 Likes
956

<b></b>Why do we use it_excluding parameter in alv? what is the significance of using it_excluding.

1 ACCEPTED SOLUTION
Read only

Former Member
904

Hi ,

refer

Hi..,

Execute this sample program....

this program eliminates the Sort descending order and Sort ascending order from Menu list and also from the Application toolbar.

tables spfli.

type-pools: slis.

DATA W_FCODE TYPE SLIS_EXTAB-FCODE.

data: t_spfli TYPE SPFLI OCCURS 0 WITH HEADER LINE.

select * from spfli into table t_spfli.

data : t_excluding TYPE SLIS_T_EXTAB .

W_fcode = '&OUP'.

append w_fcode to t_excluding.

W_fcode = '&ODN'.

append w_fcode to t_excluding.

call function 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_STRUCTURE_NAME = 'SPFLI'

  • IS_LAYOUT =

  • IT_FIELDCAT =

IT_EXCLUDING = T_EXCLUDING

tables

t_outtab = T_SPFLI

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

Hope this solves your purpose.

Award points if it helps.

-Gaurang

<b></b>Why do we use it_excluding parameter in alv? what is the significance of using it_excluding.

7 REPLIES 7
Read only

Former Member
0 Likes
904

hi

The optional IMPORTING parameter IT_EXCLUDING is an internal table. It

is only needed if the caller uses the list tool standard interface but

wants to deactivate interface functions which he or she does not need.

In this case the function codes of these standard functions are entered in the table.

if u want to remove any buttons to the default toolbar available for the alv list/grid, you have to pass the name of the function codes (ie buttons) to the internal table, and pass it through IT_EXCLUDING parameter.

hope this info helps.

thx

pavan

**pls reward if helpful

Read only

Former Member
905

Hi ,

refer

Hi..,

Execute this sample program....

this program eliminates the Sort descending order and Sort ascending order from Menu list and also from the Application toolbar.

tables spfli.

type-pools: slis.

DATA W_FCODE TYPE SLIS_EXTAB-FCODE.

data: t_spfli TYPE SPFLI OCCURS 0 WITH HEADER LINE.

select * from spfli into table t_spfli.

data : t_excluding TYPE SLIS_T_EXTAB .

W_fcode = '&OUP'.

append w_fcode to t_excluding.

W_fcode = '&ODN'.

append w_fcode to t_excluding.

call function 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_STRUCTURE_NAME = 'SPFLI'

  • IS_LAYOUT =

  • IT_FIELDCAT =

IT_EXCLUDING = T_EXCLUDING

tables

t_outtab = T_SPFLI

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

Hope this solves your purpose.

Award points if it helps.

-Gaurang

Read only

Former Member
0 Likes
904

Hi,

if u want to remove or add any buttons to the default toolbar available for the alv list/grid we will use it.

rgds,

bharat.

Read only

Former Member
0 Likes
904

hi sunil,

if you have say created a report using REUSE_ALV_GRID_DISPLAY.

and you want to exclude de boxes for row selection in the left of the grid, how can i do that?

This should be basically done by,

U have to check which is its functional code and pass it to fm by parameter IT_EXCLUDING.

DATA: WA_EXCLUDING TYPE slis_extab,

GT_EXCLUDING TYPE slis_t_extab.

WA_EXCLUDING-FCODE = ....

APPEND WA_EXCLUDING TO GT_EXCLUDING.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

............

IT_EXCLUDING = GT_EXCLUDING

Regards,

Jayant

Read only

Former Member
0 Likes
904

Hi,

Check this.

DATA: IT_EXTAB TYPE SLIS_T_EXTAB.

DATA: WA_EXTAB LIKE LINE OF IT_EXTAB.

WA_EXTAB-FCODE = 'APEN'.

APPEND WA_EXTAB TO IT_EXTAB.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = G_PROGRAM

I_CALLBACK_PF_STATUS_SET = G_PF_STATUS

I_CALLBACK_USER_COMMAND = G_USER_COMMAND

IS_LAYOUT = GS_LAYOUT

I_SAVE = 'X'

I_GRID_TITLE = G_TITULO

IT_FIELDCAT = I_FIELDCAT

IT_EXCLUDING = IT_EXTAB

IT_SORT = GS_SORT[]

TABLES

T_OUTTAB = OPERATIONS_DATA

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

IT_EXCLUDING = IT_EXTAB is the key for exclude buttons.

Hope this info helps.

Regards,

Kumar.

Read only

Former Member
0 Likes
904

Using this parameter, the names of the functions can be disabled in the toolbar.

Read only

Former Member
0 Likes
904

Hi sunil,

the below answer may be helpful to you....

if you have say created a report using REUSE_ALV_GRID_DISPLAY.

and you want to exclude de boxes for row selection in the left of the grid, how can i do that?

This should be basically done by,

U have to check which is its functional code and pass it to fm by parameter IT_EXCLUDING.

DATA: WA_EXCLUDING TYPE slis_extab,

GT_EXCLUDING TYPE slis_t_extab.

WA_EXCLUDING-FCODE = ....

APPEND WA_EXCLUDING TO GT_EXCLUDING.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

............

IT_EXCLUDING = GT_EXCLUDING

Regards,

Naveen Tiramdasu,

Gujarat.

Rewards only 10 points