Application Development 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: 

ALV grid disply with edit columns in output

former_member190312
Active Participant
0 Kudos

Hi all,

i am using CALL METHOD MY_GRID->SET_TABLE_FOR_FIRST_DISPLAY

to display the output in alv format.there is 3 edit columns in output display.

if i fill one field & then put 'ENTER' then other two fields of that row should be filled with the appropriate data from the program.still control should be in output display.

which method i should use to go inside the program when i put 'ENTER' on any field of ALV output disply & how to use those methods inside the program.

i need some materials regarding OOPS (class, method ) . now i want to put OOPS concept in alv display.

correct answers will be rewarded.

Thanks & regards

1 ACCEPTED SOLUTION
3 REPLIES 3

franois_henrotte
Active Contributor
0 Kudos

you have to create a local class that listens to event DATA_CHANGED

you will get a parameter of class CL_ALV_CHANGED_DATA_PROTOCOL and you can get list of modified cells in attribute MT_MOD_CELLS

then you have to fill your internal table accordingly (your fields to be filled) and to refresh the display

also, if you want to validate data, you can add an error message to protocol by calling method ADD_PROTOCOL_ENTRY of this object

Former Member
0 Kudos

hI

YES YOU CAN DO IT BY DOING LIKE THIS

FOR THAT FIELD WHEN YOUR DECLARING FIELDCATALOG

ONE MORE OPTION IN FIELDCATALOG AS -EDIT = 'X'.

THEN THAT FIELD WILL BE EDITABLE IN THE OUTPUT DISPLAY

REWARD IF USEFULL

EXAMPLE

XFIELD IS FIELDCATALOG NAME

XFIELD-FIELDNAME = 'MATNR'.

XFIELD-SELTEXT_L = 'Material Number'. " Change coloumn headers

XFIELD-OUTPUTLEN = 18.

<b>XFIELD-EDIT = 'X'.</b>

APPEND XFIELD TO BFIELD.