‎2007 Nov 13 5:07 AM
Hi gurus,
I jst want some clarification regarding this sample code. I jst wnt to ask on whats the use or purpose of this part of the select statement.....
a~fkart in ('ZUF2','ZUIN','ZUVF','ZUS2','ZC23','ZC24','ZC26','ZUL2','ZUG2') in the sample code below???
select afkart aknumv arfbsk bVKGRP from vbrk as a
inner join knvv as b on akunag = bkunnr into table doc
where rfbsk = 'C'
and a~fkdat in fkdat
and a~erdat in erdat
and a~fkart in ('ZUF2','ZUIN','ZUVF','ZUS2','ZC23','ZC24','ZC26','ZUL2','ZUG2')
and b~VKGRP in VKGRP.
helpful answers would be given points,thanks in advance.
gerald
‎2007 Nov 13 5:12 AM
Hi Jose,
This a~fkart in ('ZUF2','ZUIN','ZUVF','ZUS2','ZC23','ZC24','ZC26','ZUL2','ZUG2') means, only mentioned fkart type in the brackets will fetch.
based on the inner join statement, aprt from all corresponding parameters the given select query will execute.
Suku
‎2007 Nov 13 5:09 AM
it will check all value for where condition.
select afkart aknumv arfbsk bVKGRP from vbrk as a
inner join knvv as b on akunag = bkunnr into table doc
where rfbsk = 'C'
and a~fkdat in fkdat
and a~erdat in erdat
and afkart in ('ZUF2','ZUIN','ZUVF','ZUS2','ZC23','ZC24','ZC26','ZUL2','ZUG2') <b>chk condition</b>and bVKGRP in VKGRP.
‎2007 Nov 13 5:11 AM
hi,
if the vlaue in the field fkart = 'ZUF2' or fkart = 'ZUIN' OR ...
like that for that purpose its better to keep
statement select * from table name where field in ( 'ZUF2','ZUIN',....).
REGARDS
SIVA
‎2007 Nov 13 5:11 AM
Hi,
Basically to select the data where the billing types is either one of them which is given in the list..
'ZUF2','ZUIN','ZUVF','ZUS2','ZC23','ZC24','ZC26','ZUL2','ZUG2'
You can also use a OR for the billing type like this..
where afkart = 'ZUF2' OR afkart = 'ZUIN'....
Thanks
Naren
‎2007 Nov 13 5:12 AM
Hi Jose,
This a~fkart in ('ZUF2','ZUIN','ZUVF','ZUS2','ZC23','ZC24','ZC26','ZUL2','ZUG2') means, only mentioned fkart type in the brackets will fetch.
based on the inner join statement, aprt from all corresponding parameters the given select query will execute.
Suku
‎2007 Nov 13 5:12 AM
Hi,
THe field fkart have lot of values ,but we are filtering out some values..thats why it has given the values which we require..Please check the table vbrk and field fkart..
Regards,
Nagaraj
‎2007 Nov 13 5:13 AM
THE STATEMENT SELECTS THE RECORDS THAT CONTAINS THE VALUES OF THE FIELD FKART IN GIVEN RANGE ONLY. (................................................................................)
‎2007 Nov 13 5:13 AM
HI
a~fkart in ('ZUF2','ZUIN','ZUVF','ZUS2','ZC23','ZC24','ZC26','ZUL2','ZUG2')
means that filed value may be any one from that group of values
‎2007 Nov 13 5:20 AM
hi guys,
i have another question, whats the use of this field .....kinak = ' '......in the below sample code??what does this refer to??
select kschl sakn1 kwert from konv into table con
for all entries in doc
where knumv = doc-knumv
and kinak = ' '
and kschl in ('ZU01','R100','ZC25','ZDTR','ZDTL','ZDTP','ZDDA','ZRET','ZD06','ZDMI','ZDNP','ZDNE','ZDTD',
'ZC20','ZC01','ZC02','ZC03','ZC04','ZC05','ZC06','ZC07','ZC10','ZC14','ZC18','ZM09','ZC19',
'ZC27').
thanks in advance,
gerald
‎2007 Nov 13 5:23 AM
Hi,
If the condition type is inactive then KINAK will be not initial..
In your case KINAK = ' ' means condition is active
Thanks
Naren