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

select querry

Former Member
0 Likes
659

Hi friends

Can any one tell me what is wrong in the select querry, its not picking the data.

SELECT vbelv

posnv

vbeln

posnn

FROM vbfa INTO TABLE lt_vbfa

FOR ALL ENTRIES IN lt_lips

WHERE vbelv = lt_lips-vbeln

AND posnv = lt_lips-posnr

AND vbtyp_v = 'J'

AND vbtyp_n = 'M'.

Regards,

Venu

7 REPLIES 7
Read only

Former Member
0 Likes
628

Hello Venu,

Check the table VBFA is having data for these where conditions.

If useful reward.

Vasanth

Read only

Former Member
0 Likes
628

check the vbtyp_v = 'J'

AND vbtyp_n = 'M' values.There may not be any data for this

Read only

Former Member
0 Likes
628

Nothing wrong in the select query.

Before writing the select query with for all entries

Check, if not lt_lips[] is initial.

Check the internal table lt_lips contains data also check the database for the condtion you have given in the select query.

Regards,

Prakash.

Read only

Former Member
0 Likes
628

check in Debug, wheather PosNR having leading ZERO...

Read only

Former Member
0 Likes
628

First check whether data is present in VBFA.

One more thing that you need to keep in mind that before using the table in select query with FOR ALL ENTRIES chcek whether that table is initial or not. If its initial whole data from database table will be selected.

But in your case no data is selectd. So the reason might be data is not present in VBFA.

Best Regards,

Vibha

*Please mark all the helpful answers

Read only

Former Member
0 Likes
628

check this also,

SELECT vbelv

posnv

vbeln

posnn

FROM vbfa INTO TABLE lt_vbfa

FOR ALL ENTRIES IN lt_lips

WHERE vbelv = lt_lips-vbeln

AND posnv = lt_lips-posnr

AND ( vbtyp_v = 'J'

OR vbtyp_n = 'M' ). (use of AND is correct..?)

Read only

Former Member
0 Likes
628

hi Venu,

there is nothing wrong with your select statement .. in debug mode check whether data is getting populated in to it_lips for that data check whether the data is available in vbfa ... i feel that your select statement is failing as it is not satisfying all the criteria that you have in where statement ... so it is data in sufficiency problem.

Regards,

Santosh