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 statement

Former Member
0 Likes
1,354

tables : mvke,vbak,vbap.

data : itab like mvke occurs 0 with header line .

Get the material pricing group (field MVKE-KONDM) from the material master of the current material (MVKE where MVKE-VKORG = VBAK-VKORG and MVKE-VTWEG = VBAK-VTWEG and MVKE-MATNR = VBAP-MATNR).

for this..i writen like that

select kondm

from mvke

into table itab

where vkorg = vbak-vkorg AND

vtweg = vbak-vtweg AND

matnr = vbap-matnr.

loop at itab.

write : / itab-kondm.

endloop.

no data is there kindly help me out.

Thanks & regards

Kavitha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,253

between into and table 'corresponding fields' is missing.

7 REPLIES 7
Read only

Former Member
0 Likes
1,253

And what is in VBAK and VBAP at the time of this read.

Read only

0 Likes
1,253

i declared tables vbak vbap

Read only

Former Member
0 Likes
1,254

between into and table 'corresponding fields' is missing.

Read only

Former Member
0 Likes
1,253

hi kutti

your query is absolutely fine.

after ur select query check

if sy-subrc eq 0.

if it is equal to 4 it means there is no kondom satisfying the where condition.

regards

ravish

<b>plz rerward points if helpful</b>

Read only

0 Likes
1,253

your code seems to b ok

but just chek that is there any record related to all three tables

use inner join for better code.

just chk the tables for the record

reward points to all helpful answers

Read only

Former Member
0 Likes
1,253

Hi,

First of all you need to get all the of values VBAK basing on some condition of you requirement into internal table use this internal to get the avalues from MVKE table by using for all entries. And then loop the final internal table for output.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
1,253

hi,

one reason is the input which gave n the value that exists for that field may not be same.

for this use FM CONVERSION_EXIT_ALPHA_INPUT and pass the parameter and use out obtained from fm in sleect option.

another may be remaining conditions may be false check them also. or go for OR relational operator if required.

if helpful reward some points.

with regards,

Suresh Aluri.