on 08-23-2014 11:25 AM
Hi
I see in the agentry server, WorkOrderEditBapi source,
tbl.appendRow();
tbl.setRow(0);
and then starting to set vaues. appendrow will add the row at the end.
setrow for move the pointer to that row.
why in this code after appending , move the pointer to beginning and start to set the values there.it will overrites the values right?
i don't get the point..help needed..
Regards,
Manivannan
Tags edited by: Michael Appleby
Manivannan,
There probably aren't any rows yet in whatever table that is. That is why it is safe to set it to the first row after the append. Normally it goes like this:
tbl.appendRow();
tbl.setRow(tbl.getNumRows()-1);
You could change it if desired, but my guess is that there will only be the one row in the table in whatever routine is running there during the edit.
Jason Latko - Senior Product Developer at SAP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jason for the reply.
My thought is we could write like as you suggest and it is one of the best way..but i see the out of box code,why it is written like that? is there any justification.And if only one row is there, we don't need to setRow..and appendRow will automatically move the pointer to there..
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.