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 grid

Former Member
0 Likes
621

Hi all,

i want to make the output values in alv grid to be non editable....how do i do that?

regards,

sheeba.

1 ACCEPTED SOLUTION
Read only

peter_ruiz2
Active Contributor
0 Likes
582

hi,

ALV Grid is non-editable by default but you can set the EDIT_MODE field of the ALV Layout to 1 if you want it editable.

  • editable ALV Grid

EDIT_MODE = 1

  • non-editable ALV Grid

EDIT_MODE = 0

Regards,

Peter

hi,

ALV Grid is non-editable by default but you can set the EDIT_MODE field of the ALV Layout to 1 if you want it editable.

  • editable ALV Grid

EDIT_MODE = 1

  • non-editable ALV Grid

EDIT_MODE = 0

Regards,

Peter

3 REPLIES 3
Read only

Former Member
0 Likes
582

just remove these lines in populating your fieldcat

l_fieldcat-input = 'X'. "Making the field editable

l_fieldcat-edit = 'X'.

if if they are 'X' make this properties ' ' .

do reward

Read only

Former Member
0 Likes
582

Hi,

by default grid will be non editable.u don't need to do anything.

see this sample.


TABLES:LFA1.

SELECT-OPTIONS:LIFNR FOR LFA1-LIFNR.

DATA:BEGIN OF ITAB OCCURS 0,
     LIFNR LIKE LFA1-LIFNR,
     NAME1 LIKE LFA1-NAME1,
     LAND1 LIKE LFA1-LAND1,
     ORT01 LIKE LFA1-ORT01,
     REGIO LIKE LFA1-REGIO,
     SORTL LIKE LFA1-SORTL,
END OF ITAB.

SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE LIFNR
IN LIFNR.

TYPE-POOLS:SLIS.

DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
 EXPORTING
   I_PROGRAM_NAME               = SY-REPID
   I_INTERNAL_TABNAME           = 'ITAB'
   I_INCLNAME                   = SY-REPID
  CHANGING
    CT_FIELDCAT                  = FCAT.


CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
   I_CALLBACK_PROGRAM                = SY-REPID
   I_GRID_TITLE                      = 'VENDOR DETAILS'
   IT_FIELDCAT                       = FCAT
  TABLES
    T_OUTTAB                          = ITAB.

rgds,

bharat.

Read only

peter_ruiz2
Active Contributor
0 Likes
583

hi,

ALV Grid is non-editable by default but you can set the EDIT_MODE field of the ALV Layout to 1 if you want it editable.

  • editable ALV Grid

EDIT_MODE = 1

  • non-editable ALV Grid

EDIT_MODE = 0

Regards,

Peter