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 query

Former Member
0 Likes
490

Hi Friends,

I want to pick condition value kwert for condtion type zcdj

from invoice No .

i used this query its not working.

loop at i_vbtab.

i_vbtab-xyz = i_vbtab-vbeln.

modify i_vbtab.

endloop.

SELECT kschl kwert FROM konv

INTO CORRESPONDING FIELDS OF TABLE i_konv1

for all entries in i_vbtab

WHERE kschl = 'zcdj'

and knumv = i_vbtab-xyz

and sakn1 >= '0006105430'

and sakn1 <= '0006106430'.

pls help.

4 REPLIES 4
Read only

Former Member
0 Likes
462

Hi,

modify the query.

loop at i_vbtab.

i_vbtab-xyz = i_vbtab-vbeln.

modify i_vbtab.

endloop.

SELECT kschl kwert FROM konv

INTO CORRESPONDING FIELDS OF TABLE i_konv1

for all entries in i_vbtab

WHERE kschl = 'ZCDJ'

and knumv = i_vbtab-xyz

and sakn1 >= '0006105430'

and sakn1 <= '0006106430'.

Regards,

Morris Bond.

Reward Points if Helpful.

Read only

Former Member
0 Likes
462

Hi,

loop at i_vbtab.
i_vbtab-xyz = i_vbtab-vbeln.
modify i_vbtab.
endloop.
SELECT kschl kwert FROM konv
INTO CORRESPONDING FIELDS OF TABLE i_konv1
for all entries in i_vbtab
WHERE kschl = 'ZCDJ'
and knumv = i_vbtab-xyz
and sakn1 >= '0006105430'
and sakn1 <= '0006106430'.

User this Query

Edited by: Brown on Mar 31, 2008 6:03 AM

Read only

Former Member
0 Likes
462

Hi,

Instead of using the condition KONV-KNUMV = VBRK-VBELN,

use the condition KONV-KNUMV - VBRK-KNUMV.

Try the below code.



loop at i_vbtab.
  i_vbtab-xyz = i_vbtab-knumv.
  modify i_vbtab.
endloop.
SELECT knumv kopos kschl kwert FROM konv
INTO CORRESPONDING FIELDS OF TABLE i_konv1
for all entries in i_vbtab
WHERE knumv = i_vbtab-xyz
and kschl = 'ZCDJ'
and sakn1 >= '0006105430'
and sakn1 <= '0006106430'

Hope this helps. Rwd points if helpful.

Thanks,

Balaji

Read only

Former Member
0 Likes
462

Hi,

In where Condition Write the condition type in CAPS(ZCDJ)

Regards

Sandipan