sudhar
Answered On : May 1st, 2006
At new - on change of diffrence:Incase if you waana calculate sub totals for same values in a field you can use the at new statement.ie: for example in a table sflight there are 2 fields carrid ( airline id) and seatsmax( seat available). Incase if you waana calculate the total number of seats available for each carrrid you can sort the table first and using the atnew and sum you can claculate the total seats for each carrid. Atnew will be triggered whenever there is a change in the carrid and the total seats will be returned for each carrid.In the same scenario if you use onchange of it will not return the total seats for each carrid , instead it will return the total seat count for the entire table( ie: for all the carrids in the table.Another diffrence is at new can be used only between loop and end loop whereas on change of can also be used in select- endselect , do -enddo.Another diffrence is while using at new inase if you code any write statements between at new and end at the value for the numeric fields will be returned as 0 and that of no numeric fields will be returned as *(asteriks). But in on change of the orginal values will be returned.Select single * and select upto 1 row diffrence.The select single * from stmt selects only one row form the database table and puts it in to the work area(internal table).The select upto n(where n stands for a integer number) rows stmt selects all the rows from the database table but writes only the specified number of rows specified by the n into the internal table. If its given as upto 1 rows only 1 row is written in to the internal table.

1 User has rated as useful.
Login to rate this answer.
coming to the SD, MM and FICO the volume of data should be small. So for this we can go for SELECT statement. Coming to HR data volume of data should be larage. how it is when u modify a record, in HR it will create a one more record but coming to SD or other modules it overwirte the existing record. so we use LDB in HR.
Login to rate this answer.
other than given answers i am inserting one more select.
SELECT * FROM DB INTO TABLE ITAB FOR ALL ENTRIES IN IT_TABLE WHERE CONDITION.
Login to rate this answer.
tabrez
Answered On : Aug 11th, 2012
on change is obsolete now we used at new it prevent adjacent duplicate when the valve change it will trigger
Login to rate this answer.
Ankit
Answered On : Oct 11th, 2012
Select single * we use when we are not using all primary keys in where clause
select up to 1 Rows we use when we are using all primary keys in where clause
Login to rate this answer.