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

Select statement for most recent value in a table

Former Member
0 Likes
891

Hi all,

I need to select most recent value from a table . I dont have any date or time field in that table . Can one help me in this issue

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
855

what are the fields available??

you can sort the table and read it.

Cheers,

amit

Hi all,

I need to select most recent value from a table . I dont have any date or time field in that table . Can one help me in this issue

7 REPLIES 7
Read only

Former Member
0 Likes
856

what are the fields available??

you can sort the table and read it.

Cheers,

amit

Read only

0 Likes
855

Hi amit

Table name is CDPOS . I need to get recent change nr.can u give me the detail description?

Read only

0 Likes
855

You can go to CDHDR and get the most recent updates and then use the key fields to get the corresponding data from CDPOS.

Rob

Read only

0 Likes
855

Hi Priya,

there is another table CDHDR. this gives the details with time and date.

based on the changenr you can select the data from this table and get the recent data.

Read only

0 Likes
855

Priya U can link table CDPOS with CDHRD and Table CDHDR has both date and time in it.

Objectid and objectclas is same in both the tables.

Hope this helps,

shreekant

Read only

Former Member
0 Likes
855

Hi,

Just check this thread:

U will find the solution here.

Regards,

Kumar

Read only

Former Member
0 Likes
855

select fields into itab1 from CDPOS where <condition>.

describe table itab1 lines v_count.

read table itab1 index v_count.

This will give the last record (most recent record).