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

Retrieve data from LIPS

Former Member
0 Likes
588

I need to retrieve data from LIPS starting from MCH1...

select *

into itab

from mch1 as m

inner join lips as p on

****

But i need the join the be done only on the last record of LIPS do you this it is possible that way or not ?

I don't think so but just to be sure...

2 REPLIES 2
Read only

Former Member
0 Likes
455

can you clearly specify what do you want...

Read only

manuel_bassani
Contributor
0 Likes
455

Hi Stephan,

i presume you want to do the join


select *
into corresponding fields of table itab
from mch1 as m inner join lips as p on p~matnr = m~matnr
                                   and p~charg = m~charg
where p~posnr = ( select max( posnr ) from lips
                   where vbeln = p~vbeln ).

This select statement should read every lips record linked to mch1 (given matnr/charg) and considers only those lips record with the greatest posnr

But i'm not sure if for each mch1 record (matnr/charg) it exists only 1 occurrence of likp...

I hope it will help.

Please consider to reward points for useful answers.

Regards, Manuel