11-13-2007 5:21 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
11-13-2007 5:24 AM
fkart -> Billing Type
chk condition for = ZUF2','ZUIN','ZUVF','ZUS2','ZC23','ZC24','ZC26','ZUL2','ZUG2'
if sy-subr = 0 "record finf else not match record.
11-13-2007 5:26 AM
hi,
in table VBRK
field FKART
there should be values only 'ZUF2','ZUIN','ZUVF','ZUS2','ZC23','ZC24','ZC26','ZUL2','ZUG2'
the select statement will select data where values for FKART are given there only.
Regards,
Sandeep Kaushik
11-13-2007 5:28 AM
Hi,
ur select statement will fetch the records with fkart = 'ZUF2' or 'ZUIN' or 'ZUVF' or 'ZUS2' or 'ZC23' or 'ZC24' or 'ZC26' or 'ZUL2' or 'ZUG2'.
rgds,
bharat.
11-13-2007 5:31 AM
HI
a~fkart in ('ZUF2','ZUIN','ZUVF','ZUS2','ZC23','ZC24','ZC26','ZUL2','ZUG2')
this means it acts like on OR condition
it will check for all the values in that condition
11-13-2007 5:32 AM
Hi ,
This select statement fetches records from the table, only for the values where
fkart in ('ZUF2','ZUIN','ZUVF','ZUS2','ZC23','ZC24','ZC26','ZUL2','ZUG2')
above is the simplification of the below mentioned condition
.......and ( fkart = ZUF2 or
fkart = ZUIN or
fkart = ZUVF or
fkart = ZUS2 or ...........)
and ......
Regards
Meikandan