‎2007 Nov 07 8:14 AM
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.
‎2007 Nov 07 8:35 AM
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
‎2007 Nov 07 8:36 AM
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.