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
464

I used select statement in my coding as"

select kunnr parvw kunn2 pernr

into table loc_int_knvp

from knvp for all entries in t_reqd

where kunnr = t_reqd-kunnr

and ( parvw = wc_zn or parvw = wc_zi ).

But performance point of view it is taking somuch time .

So could u please give any alternative solution for that

Please send to jonam38@yahoo.co.in urgently

4 REPLIES 4
Read only

Former Member
0 Likes
431

IF you are using FOR ALL ENTRIES addition to SELECT first check that table is not initial.

<b>if t_reqd[] is not initial.</b>
select kunnr parvw kunn2 pernr 
into table loc_int_knvp 
from knvp for all entries in t_reqd 
where kunnr = t_reqd-kunnr 
and ( parvw = wc_zn or parvw = wc_zi ). 
<b>endif.</b>

Read only

Former Member
0 Likes
431

sort the t_reqd table on kunnr field before the select.

sort t_reqd by kunnr.

select kunnr parvw kunn2 pernr

into table loc_int_knvp

from knvp for all entries in t_reqd

where kunnr = t_reqd-kunnr

and ( parvw = wc_zn or parvw = wc_zi ).

REgards,

Ravi

Read only

Former Member
0 Likes
431

put like this.

if t_redq[] is not initial.

select kunnr parvw kunn2 pernr

into table loc_int_knvp

from knvp for all entries in t_reqd

where kunnr = t_reqd-kunnr

and ( parvw = wc_zn or parvw = wc_zi ).

endif.

and check WC_ZN also.

Regards

Prabhu

Read only

Former Member
0 Likes
431

hi

good

wrong->

select kunnr parvw kunn2 pernr

into table loc_int_knvp

from knvp for all entries in t_reqd

where kunnr = t_reqd-kunnr

and ( parvw = wc_zn or parvw = wc_zi ).

write->

select kunnr parvw kunn2 pernr

into corresponding fileds of table loc_int_knvp

from knvp for all entries in t_reqd

where kunnr = t_reqd-kunnr

and ( parvw = wc_zn or parvw = wc_zi ).

it may reduse of the original time period as itis taking now .

thanks

mrutyun