Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

to find a largest number

Hello all ,

I had field in ztable name is doc_id.

and it has the data like

Doc_id

121

122

123

124

125

122

like this .i want to pic the largest number in that fields .

Could u please help in this .

thanking you,

urs,

suman

Former Member
Former Member replied

Hi Suman,

Use the below code.

SELECT * From ztable INTO gt_table.

SORT gt_table doc_no descending.

READ gt_table index 1.

You ll have the larggest no. now in gt_table-doc_no.

Br/Manas

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question