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

Read Statement

Former Member
0 Likes
320

Dear Friends,

I have a internal table ktab which have one BUDAT field. Ktab contains data for four months. I want to read the record from ktab into wa_ktab which have maximum day number for that month. (last entry date)

I have tried this,.

loop.

READ TABLE KTAB INTO WA_MTAB WITH KEY MATNR = WA_KTAB-MATNR WERKS = WA_KTAB-WERKS BUDAT(6) = WA_KTAB-BUDAT(6).

endloop.

How can i give condition for maximum day number in budat?

madan.

2 REPLIES 2
Read only

Former Member
0 Likes
303
SORT ktab DESCENDING by budat.

READ ktab INTO wa_mtab WITH INDEX 1.

Tr y this,

Read only

Former Member
0 Likes
303

do this way

sort KTAB descending by budat.
READ TABLE KTAB INTO WA_MTAB INDEX 1.

Regards,

santosh