‎2007 Jan 04 5:36 AM
Hi,
I have one problem in following coding.
the condition is like that
select-options: s_kunnr for kna1-kunnr,
s_name1 for kna1-name1.
if not s_kunnr is initial.
perform kunnr_data.
else.
perform name1_data.
endif.
if not s_kunnr is initial.
select * from kna1 into corresponding fields of table lt_kna1 for all entries in s_kunnr where kunnr = s_kunnr-low.
endif,
form kunnr_data.
*under this subroutine there are some condition & we are appending multiple entries in s_kunnr.
endform.
*actually we are getting problem in above select statement.
*suppose we have 50 entries in s_kunnr then what I have to use in where condition so that it will fetch all the records based s_kunnr(rembember s_kunnr having 50 entries).
‎2007 Jan 04 5:37 AM
select * from kna1 into corresponding fields of table lt_kna1 for all entries in s_kunnr where <b>kunnr in s_kunnr</b>.
‎2007 Jan 04 5:39 AM
Hi,
use
select * from kna1 into corresponding fields of table lt_kna1 for where kunnr in s_kunnr.
Regards,
Sonika
‎2007 Jan 04 5:39 AM
‎2007 Jan 04 5:40 AM
Hi Neha,
Declare an <b>internal table of type kna1-kunnr</b>.
use this internal table to <b>fill multiple enties</b> instead of s_kunnr.
Now use select * from dbtab <b>for all entries</b> in itab_kunnr where............
Hope this helps,
Pragya
‎2007 Jan 04 5:54 AM
Hi Kishan,
If I used the mentioned select statment I am getting error "the where condition does not refer to the FOR ALL ENTRIES table."
Could you please suggest me?
‎2007 Jan 04 5:56 AM
select * from kna1 into corresponding fields of table lt_kna1 where kunnr in s_kunnr.
s_kunnr-- is not a internal table.just write down ur requirment i m trying to solve it.
kishan negi
‎2007 Jan 04 5:57 AM
Hi,
u don't need to write for all entries, it will work without it
select * from kna1 into corresponding fields of table lt_kna1 for where kunnr in s_kunnr.
Regards,
Sonika
‎2007 Jan 04 5:58 AM
check this way...
loop at s_kunnr.
select * from kna1 into corresponding fields of table lt_kna1 for all entries in s_kunnr where kunnr = s_kunnr-low.
endloop.
or else...
select * from kna1 into corresponding fields of table lt_kna1 for all entries in s_kunnr where kunnr IN s_kunnr.
‎2007 Jan 04 6:00 AM
Dear Neha,
Please correct the following SQL Statement:
if not s_kunnr is initial.
select * from kna1 into corresponding fields of table lt_kna1 for all entries in s_kunnr where kunnr <b>IN</b> s_kunnr-low.
endif.
Regards,
Abir
***********************************
Don't forget to award Points *
‎2007 May 09 6:02 AM
hi neha,
select * from kna1 into corresponding fields of table lt_kna1 for all entries in s_kunnr where kunnr in s_kunnr.
with regards,
suresh babu