‎2006 Nov 08 6:59 PM
hi folks,
For a requirement related to Actions infotype in the report I delete the latest record from the database table (PB4000 - related to recruitement). After that I need to delimit the enddate of the last record for the applicant record to '12/31/9999'. I know that I have to use the 'MODIFY' command to update the record in the databse table. To fetch the last record--- shoudl I use RP_RROVIDE LAST... and then use the modify query or can I use the single query statement to fetch the last record and modify?
Any input will be helpful. Thanks
Santhosh.
‎2006 Nov 08 7:00 PM
‎2006 Nov 08 7:10 PM
hi Santhosh,
Since you dont have the complete key to get the last record using a query, its advicable to use RP_PROVIDE LAST..and then modify the table using mdofiy statement (or you can use the relevant function module [RH_PNNNN_MAINTAIN] to modify the table ).
Hope this helps.
Sajan.
Message was edited by: Sajan Joseph
‎2006 Nov 08 7:17 PM
‎2006 Nov 08 7:18 PM
YOu should use RP_PROVIDE_FROM_LAST if you are using a logical database..
Take care just to modify just the endda.. otherwise the whole record will get modified and the other data will be passed with blank.. so use TRANSPORTING when doing modify.
IF you are not using logical database then you can directly do a select to find the last record
Award points if useful
Prince
‎2006 Nov 08 8:40 PM