11-14-2007 11:52 AM
hiii experts..
i am working on a ALv grid and in that i am selecting a row for for updating the changed valuse to DB table..
i am using GET_SELECTED_ROWS for the same . i want to check this seleced row to a DB table and if key fields are changed then i have to give error mesg.
so plz any 1 tell how to check the selected rows against the original DB values..
i tried selcting DB into ITAB
SELECT * FROM Y4ARC_RES_PERIOD INTO CORRESPONDING FIELDS OF TABLE ZT_102.
loop at ZT_102.
IF ZT_102-RES_ID EQ LT_102-RES_ID.
MESSAGE E002(ZMSG).
EXIT.
ENDIF.
and comparing with changed valuse but when we chang key fields and existing key field ..ie..enter r same that condition will not work..
plz suggest
mahesh
11-14-2007 11:56 AM
Hi,
GET_SELECTED_ROWS gives you the selected of the final internal table which is used for display
IF you are using it_outtab for final display of your alv
then get_selected_rows gives you the row index of the table it_outab
by this row index you can find the value related in the final output table
it_outab.
<u><b>Reward points if usefull</b></u>
11-14-2007 12:06 PM