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

SELECTION SCREEN

Former Member
0 Likes
423

Dear all,

I am using product hierarchy filed in my selection screen.

i.e; S_PRODH FOR LIPS-PRODH obligatory,

here i am facing one problem, whenever user enter the value in S_PRODH-low. (LIPS have two values for this same value).

But in select quiery it is fetching data only one record.

my select quires is

SELECT VBELN

MATNR

MATKL

PRODH

LFIMG

ARKTX

VTWEG

MVGR5

SERAIL

FROM LIPS

INTO TABLE IT_LIPS

FOR ALL ENTRIES IN IT_LIKP

WHERE VBELN = IT_LIKP-VBELN

AND MATKL IN S_MATKL

AND PRODH IN S_PRODH "

AND MATNR IN S_MATNR

AND VTWEG IN S_VTWEG

AND MVGR5 IN S_MVGR5

AND SERAIL EQ P_SERAIL.

plz help me..

Regards

margani

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
386

Pretty basic. When using FOR ALL ENTRIES, if the combination of the fields used in the select query is duplicated, only one record is fetched. Make sure you make the combination of fields unique to fetch all records. In your case add POSNR in the select query.

PS: Please use a meaningful subject line in future.

Vikranth

3 REPLIES 3
Read only

Former Member
0 Likes
387

Pretty basic. When using FOR ALL ENTRIES, if the combination of the fields used in the select query is duplicated, only one record is fetched. Make sure you make the combination of fields unique to fetch all records. In your case add POSNR in the select query.

PS: Please use a meaningful subject line in future.

Vikranth

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
386

It depends whether LIKP has both the records or not.

Read only

Former Member
0 Likes
386

Hello,

The 'For all entries' type of search in the query work like select singe in the data base level search. Because of the very same reason, you may have to use all primary keys as part of the search in order to retrieve records accurately.

In your case, it's VBELN & POSNR. I've seen this very problem in the past and this is the only solution, if you would like to use 'For all entries' type search.

Hope this helps <removed by moderator>.

Best Regards,

Gopakumar

Sr.SAP Tech.Lead

Edited by: Thomas Zloch on Sep 16, 2010 5:32 PM - please do not ask for ...