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

How to remove Sort button from ALV

Former Member
0 Likes
1,081

Hi Experts,

How to remove sort button from ALV List.

I have requirement where I need to remove the sort button from ALV list.

Kindly give me useful clues.

Higher points will be awarded for the useful inputs.

Thanks in Advance,

Dharani

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
913

try to call ur(copied) pf-status.

set pf-status exculding 'fcode'.

Regards

prabhu

5 REPLIES 5
Read only

Former Member
0 Likes
913

try this..

SET PF-STATUS 'STATUS' EXCLUDING 'SORT'.

Read only

Former Member
0 Likes
914

try to call ur(copied) pf-status.

set pf-status exculding 'fcode'.

Regards

prabhu

Read only

Former Member
0 Likes
913

Dharani,

You need to copy the PF status into Z-PF Status, and need to remove the sort button and again this Modified (Z-PF Status) needs to be attached to the ALV Function moduel.

This clue may help u out.

Regards,

Sujatha.

Read only

Former Member
0 Likes
913

Hi..,

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.

regards,

sai ramesh

Read only

Former Member
0 Likes
913

Copy a standard PF-STATUS from any of the example demo programs for alvs.

foe eg: SAPLKKBL Status STANDARD_FULLSCREEN into your own status in SE41.

Then call the set pf-status statement as follows:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
    I_CALLBACK_PROGRAM                = W_REPID
    I_CALLBACK_PF_STATUS_SET          = 'PF_STATUS'

FORM PF_STATUS
USING P_EXTAB TYPE SLIS_T_EXTAB.                            "#EC CALLED
p_extab-fcode = >Cpde for SORT>.
append p_extab. 
  SET PF-STATUS 'STAT1' EXCLUDING P_EXTAB.
ENDFORM.  

Regards,

Ravi