Application Development and Automation 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: 
Read only

modify the query

Former Member
0 Likes
584

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.

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
543

I hope you are not directly updating a standard SAP table.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
543

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

Read only

0 Likes
543

Yes I do... Is there a better way?

Thanks

Vinu

Read only

Former Member
0 Likes
543

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

Read only

0 Likes
543

Thanks a lot. Helpful answers

Vinu