02-19-2008 5:00 PM
hi experts,
I want to select 2 fields from a table and put into structure (gw_konzs.) and with respect to that i want to use aggregate function count(*) for knowing how many rows has been selected ? and i dont want to use select & endselect
please help regarding this ...........
for example:
select konts ltext from ztab into corresponding fields of gw_konzs.
select count(*) from kna1 into gw_konzs
where konzs = gw_konzs-konzs.
append gw_konzs to gt_konzs
endselect.
02-19-2008 5:07 PM
hi experts,
I want to select 2 fields from a table and put into structure and i want to select based on the where condition i dont want to use select & endselect
please help regarding this ...........
rewarded if useful
for example:
gw_detail & gw_konzs is structure
gt_detail & gt_konzsis internal table
select kunnr name1 from kna1 into corresponding fields of gw_detail where konzs = gw_konzs-konzs.
gw_detail-konzs = gw_konzs-konzs.
append gw_detail-konzs to gt_detail-konzs
endselect.
02-20-2008 10:29 AM
Your code doesn't link together, but you need something like
select konzs count(*)
into l_it_mytable
from kna1
group by konzs
02-20-2008 11:09 AM
it is not working fine............ and i dont want to use select.......endselect but when i check for syntax it is showing error for not using endselect.............what to do?
02-20-2008 1:02 PM
I want to select gruop key(konzs) field from ztable then i want to know how many customers are there with respect to gruop key(konzs) field and how many vendors are for that group key ..iam using aggregate function count(*) but i dont want to use inside select..endselect
sample output should be:
grp key customer vendor
-
abc 1 4