‎2005 Oct 25 4:21 PM
hi all,
select *
appending table cvbfa
from vbfa
where vbelv = :vs_vbelv.
and
select *
appending table cvbfa
from vbfa
where vbelv = vs_vbelv.
‎2005 Oct 25 4:27 PM
It looks like the first one may be "Native SQL" rather than "Open SQL".
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm
Regards,
RIch Heilman
‎2005 Oct 25 5:19 PM
Hello KP,
Your second statement doesn't seem to me a Native SQL statement!! It's just another (lesser used) way of writing the first statement.
For example -
data itab type table of spfli.and
data : itab type table of spfli.are both equivalent statements. However, I'm sure that you agree that the colon operator is generally used whn multiple statements need to be <i>chained</i> together.
For example -
data : itab1 type table of spfli,
itab2 type table of sflight.
This is certainly the more preferred way of declaring data.
Similarly, in your case, you could actually have written something like -
data vs_vbelv type vbelv.
data vb_vbelv type vbelv.
data cvbfa type table of vbfa.
select *
appending table cvbfa
from vbfa
where vbelv = : vs_vbelv ,
vb_vbelv .
The SELECT statement above would otherwise have to be written as -
select *
appending table cvbfa
from vbfa
where vbelv = vs_vbelv.
select *
appending table cvbfa
from vbfa
where vbelv = vb_vbelv .So instead of writing two different select statements, you write only one of them.
Hope that clears the doubt you had.
Regards,
Anand Mandalika.
‎2005 Oct 25 5:38 PM
‎2005 Oct 25 5:44 PM
rich,
i believe we could get away from using ranges like this too.
select * from xxxx into yyyy where
xxxx-zzzz in ( const1 , const2, ....constn ).
thanks guys for all the answers.
‎2005 Oct 26 5:15 AM
Hello KP,
Honestly, I thought I had <i>answered</i> this question. This post is still marked as 'unanswered'. Could you please close this thread by either
1) rewarding 10 points to an answer
or
2) choosing the option "Solved it on my own" ?
Regards,
Anand Mandalika.