‎2007 Jan 23 11:51 AM
Hi All,
In our object,there is a table control with an input enble column ,say index no.
Suppose user entered index no. = 5 at line no 17 and again he has entered index no. = 5 at line no 201.
The requirment is we have to stop the user setting the cursor at line no. 201 telling this no. is alredy entered.
Can anyone plz help on this?
Thx in Adv.
‎2007 Jan 23 11:55 AM
hi rajarshi,
i am still learning abap.
how would it be if u go for a sorted table with the editing field as it's primary key?
this is just my attempt to understand the situation.
i apologize if this is silly.
regards.
‎2007 Jan 23 12:00 PM
Vara,
No isues , but this sorted table can't solve this problem.
I appreciate your kind effort...
‎2007 Jan 23 11:56 AM
Hi,
For that table control a Internal table will be linked to that i mean the entried will ge in an internal table in the PAI of that screen.
so there,after the Loop of the table control write a Module, and in that module check the entry whether is already existed or not, i mean loop that internal table and search for that one,
Regards
Sudheer
‎2007 Jan 23 11:59 AM
Hello,
Do like this.
In PAI of the screen.
<b>LOOP AT ITAB.
MODULE CHECK_INDEXNO.
ENDLOOP:
Module check_indexno.
read table itab with key indexno = wa_itab-indexno.
if sy-subrc = 0.
Message...
endif.
endmodule.</b>
Vasanth
‎2007 Jan 23 12:03 PM
Vasant,
This thing can stop the user but we need to locate the cell by setting the cursor.
Regds.