cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting and Hiding of column in ALV Grid

Former Member
0 Kudos

i have the requirement to sort my report in ALV

the reqt. is like this

Parameter Code  Parameter  Section  Value
  1               P2         S1       50
                             S2       55
  2               P1         S5       30
                             S6       40
  3               P3         S7       60
                             S8       80  

i have to sort it by parameter code i use the fm of alv of sorting this works fine, but my requirement is that i don't want to display Parameter code in the output, if i do so then the report is sorted on the basis of parameter

i.e P1 then P2 and then P3, can any one tell me is there is a way to hide the Parameter Code.

i hope i have clear mye requirement.

thanx

abhishek suppal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In the fieldcatalog just set

for parametercode

<b>fcat-NO_OUT = 'X'</b>.

It will get sorted bit it wont be displayed.

Hope this helps.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

SORT ITAB BY PARAMETER_CODE.

In the:


FORM F9002_MODIFY_FIELD_CAT TABLES P_FIELDCAT STRUCTURE LVC_S_FCAT.

  FIELD-SYMBOLS : <LFS_FIELDCAT> TYPE LVC_S_FCAT.

  LOOP AT P_FIELDCAT ASSIGNING <LFS_FIELDCAT>.

    CASE <LFS_FIELDCAT>-FIELDNAME.

      WHEN 'PARAM_CODE'.
<b>        <LFS_FIELDCAT>-NO_OUT  = 'X'.</b>
    ENDCASE.

  ENDLOOP.

ENDFORM.

Regards,

Anjali