cancel
Showing results for 
Search instead for 
Did you mean: 

Latest value from the table

Former Member
0 Kudos

Hi All,

I am new to WDA development.I am trying to fetch the basic amount(bet01) from table PA0008 by using the following query.

select bet01 from pa0008 into table lt_lta where pernr =lv_pernr

How can I make sure that whether I am getting the latest value(basic amount) or not?the value will be different during different periods based on begda since it is a basic amount.Please help to get the latest value(basic amount) from the table and also please tell me how to get the older value.

Thanks,

Reddy.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI

You can first sort by begda or enda as you wish and then

read table etc.

which will bring the latest entry

regards

yuval

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ksr,

If u want to retrieve based on the dates , append your Select query with one more WHERE condition based on dates...

OR

Try to retrieve Begda,bet01 from the table PA0008 into a internal table and sort the internal table by begda to get old and new values...

Thanks,

Naga Prakash

Former Member
0 Kudos

hi

insert : 'and where enda=sy-datum'

regards

yuval