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: 

GET_SELECTED_ROWS

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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>

0 Kudos

hii

thank you..

i will do the same..

thank uuuuuuuu

mahesh