Skip to Content
author's profile photo Former Member
Former Member

using aggregate function count

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 19, 2008 at 05: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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.