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

While selecting vbep-ETENR

Former Member
0 Likes
749

Hi all,

I want to select data from vbep however what I need while selecting is this:

The select sentence:

Select single * from vbep where vbeln EQ xlips-vgbel and posnr EQ xlips-vgpos.....

and what I need after this is that vbep-etenr should be the max of data that comes.

How can I do that.

Thanks.

2 REPLIES 2
Read only

Former Member
0 Likes
529

Hi

First of all Always Give all the Primary Key while using Select Single..

In your case Etenr itself is missing ..

In other case if you want to get Highest Etenr after select..

take all the records in Internal Table using Order by Primary key in the select .

Then read the first Index .

Hope this is OK.

Praveen

Read only

Former Member
0 Likes
529

Hi,

data:wf_etenr like vbep-etenr.

after writing the select statment what you used.use the following statement to get the data

select single max( etenr ) into wf_etenr from vbep where vbeln = xlips-vgbel and posnr = xlips-vgpos.

If this answer satisfies your answer,please reward me the points.

if it is not fullfilled your requirement,reply me.