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
488

How to deactivate any one of the fields in the context menu of the ALV grid list o/p ?

suppose if i need to deactivate the menu buttons like ascending button and descending button how can i do that?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
468

HI,

If you want to deactivate the options from the Context menu, you need to use the class CL_CTMENU , in this class there is a method DISABLE_FUNCTIONS. Use this method to deactivate the functions in the context menu.

look at the below link for an example, you will get the answer from the below link

http://help.sap.com/saphelp_nw04/helpdata/en/94/c4a6377cc0c92ce10000009b38f8cf/content.htm

Regards

Sudheer

HI,

If you want to deactivate the options from the Context menu, you need to use the class CL_CTMENU , in this class there is a method DISABLE_FUNCTIONS. Use this method to deactivate the functions in the context menu.

look at the below link for an example, you will get the answer from the below link

http://help.sap.com/saphelp_nw04/helpdata/en/94/c4a6377cc0c92ce10000009b38f8cf/content.htm

Regards

Sudheer

3 REPLIES 3
Read only

Former Member
0 Likes
468

in that case u have to create a new PF status (i.e copy of Standard one ) and Exclude Fcodes .

Regards

Prabhu

Read only

Former Member
0 Likes
468

Hi..,

U need to use the IT_EXCLUDING parameter of the function module REUSE_ALV_GRID_DISPLAY

Execute this sample program....

<b>this program eliminates or disables the Sort descending order and Sort ascending order options from Menu list and also from the Application toolbar.</b>

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'. <i>" Function code of Ascending option</i>

append w_fcode to t_excluding.

W_fcode = '&ODN'. <i>" Function code of Descending option</i>

append w_fcode to t_excluding.

call function 'REUSE_ALV_GRID_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.

<b>reward if it helps u...

sai ramesh</b>

Read only

Former Member
0 Likes
470

HI,

If you want to deactivate the options from the Context menu, you need to use the class CL_CTMENU , in this class there is a method DISABLE_FUNCTIONS. Use this method to deactivate the functions in the context menu.

look at the below link for an example, you will get the answer from the below link

http://help.sap.com/saphelp_nw04/helpdata/en/94/c4a6377cc0c92ce10000009b38f8cf/content.htm

Regards

Sudheer