Group by in SQ02

i want to use group by function for some fields in sq02.can i use it?? how???

Ahmed,
Refer this thread,it may useful
Re: Use of SQ01, SQ02, SQ03
Re: Creating Internal table in SQ02
Thanks,
Syfulla
Edited by: syfulla shaik on Mar 9, 2009 1:46 PM

Similar Messages

  • Enhance output of Target Group in segment builder

    Hello Experts,
    We are implementing SAP CRM Lean Marketing using CRM 7.0. Our business requirement is to do segmentation based on Company attributes and Relationship Category. The output of the target group should enlist the persons related to the Company based on the relationship category selected while doing the segmentation.
    Using standard InfoSet CORM_MKTTG_BP_ORG_CDE and while creating data source selecting BUT000_PER-PARTNER_GUID in the field business partner, we are able to get the list of persons matching the segmentation query (based on the relationship category e.g. Has Supplier, Has Contact Person, etc) . But the issue is , the output of the target group (shown as an ALV grid , when the target group is opened in segment builder) only enlists matching Persons, it does not enlist the related company ID /name in front of the Person ID in the output of the target group. And this Company BP ID is not available if I try to modify the output layout. So business is unable to understand the Person enlisted in TG belongs to which Company. Can we enhance this ALV grid output of the target group displayed in segment builder ? if yes , how can it be achieved ? If this is possible and we are able to add related company BP ID/ name in front of every person enlisted in the target group then our issue gets resolved. Or is there any alternative solution to resolve this issue ?
    Highly appreciate your early response in order to resolve this critical issue.
    Thanks and Regards
    Ambar
    Edited by: AMBAR ADHAV on Sep 10, 2011 11:53 AM
    Edited by: AMBAR ADHAV on Sep 10, 2011 2:22 PM

    Hello Experts,
    We tried implementing BADI CRM_MKTTG_SEG_MEM_EX in order to add Company ID/ Name , but the issue is the BADI gets Input as persons BP id, nothing else, due to this if a person is having relationships with multiple companies, the BADI is unable to identify which company to choose as Relationship Category is not available to the BADI. And further issue is if a Person is having same relationship category with 2 companies e.g. Supplier for company A and for Company B too , in this case too the BADI is unable identify correct Company to return to the target group output
    Is there someting in the Infoset that can resolve our issue ? How can I make available the fields in the infoset to the ALV output of the target group. Using SQ02 I am able to add fields to the field groups for selection in segmentation, but can anyone guide, how to make the field available in the output list ?
    Please provide your technical assistance
    Thanks
    Ambar

  • SQ01, SQ02 & SQ03

    Hi,
    I am creating user groups (SQ03), infosets (SQ02) and reports (SQ01) for different departments which may access the same infosets but have their own reports. The trouble I'm having is that no matter what user logs in to SQ01 they have access to run ALL SQ01 reports regardless of whether they are members of that user group or not.
    Is there a process or a particular order in which you create the user groups, infosets and reports so that any user can only access reports belonging to their user group?
    Thanks,
    Conor

    Hi,
    Generally QUERY's are User Specific (Pertaining to USER GROUP).
    Where as Reports are Global to all, Unless you restrict them with some Explicit Authorizations.
    check this link for Authorization:
    Authorisation check in ABAP Query..

  • List Queries/Infosets by authorization group.

    I have a number of Queries/Infosets that have authorization group assignments in SQ02.  Is there a way to produce a list of all Queries/Infosets that belong to a specific authorization group?
    Regards,
    David

    Authorization Group as setup in the Infoset Global Properties.
    Thanks,
    David

  • Creation of additional fields in Infoset SQ02

    Hi Experts,
    I'm a FICO consultant trying to create a query.
    Requirement : Link RSEG Table to BKPF Table in the join condition
    Link: RSEG-BELNR concatenated with RSEG-GJAHR = BKPF-XBLNR
    Now I'm trying to create an additional field in SQ02 named MiroYear and in the field code part i gave the below piece of code
    "CONCATENATE RSEG-BELNR RSEG-GJAHR INTO MIROYEAR."
    It shows no syntax errors. I added the same to the field group as well.
    Issue: The additional field (MIROYEAR) is not appearing in the join condition in SQ02.
    Is this the right way to create an additonal field? Have i made any mistake? Or any of you have any better ideas to join RSEG and BKPF in SQ02?
    Your quick response will be appreciated
    Best Regards
    Vimal

    Hi,
    Table RESG and BKPF are linked BKPF-AWKEY.
    Now first of all if you create an additional field, that field will not appear in the join.
    One way will be to create an infoset with direct read to table RSEG, and then inside add additional fields for each BKPF field.
    Then in the code
    CONCATENATE RSEG-BELNR RSEG-GJAHR into MIROYEAR
    select single ....
    into (ADDFIELD1, ADDFIELD2, ADDFIELD3,.....)
    from BKPF
    where awkey = miroyear.
    Regards,
    Khusro Habib

  • Adding a field in an field group in an existing infoset(ADHOC query)

    hi Experts
    I have an infoset which contains different field group's in the form of infotypes.i have a requirement to add a field in to one of the field group's.
    When i see sq02 trasaction,i can change the field group for my infoset,but i don't have any option to add a field to that field group in the infoset.(I can only delete/change a field).
    Can any one tell me,how to add a field to the field group in an existing infoset.
    Any help in this regard wud be appreciated.

    Hi,
    In SQ02, select the infoset in change mode, you wil see Data fields in left hand side  & Field Group in right hand side. select your field which u want to add from the Data field, drag & drop in the field group.
    If your field is not there in any of Data field, then create additional field & then drag-drop in the field group.
    Hope this is clear.
    All the best!!!
    Thanks,
    Sarika.

  • Vendors report by account group

    Hi Friends,
    I have a list of vendors in an spreadsheet. I want to generate a report with the vendor number, credit, debit, balance and the account group. I tried the SAP defined reports like ( S_ALR_87012082) i can get the vendor, credit, debit, but not the account group. I can select the account group option in the dyanamic selection but not in the report layout
    Can any one suggest any other transaction where i can generate the desired report
    Thanks in advance
    Genie

    hi,
    use query (tcodes sq01/ sq02)
    -use/create  an  infoset with logical database KDF
    and tables LFA1 and LFC1
    A.

  • SAP Query, user groups, revoking 'change' rights

    Hi,
    I have a problem regarding SAP Queries and revoking the change rights. This is what I have done:
    1. Created the new user group in SQ03
    2. Created the new InfoSet (SQ02), assigned it to the above UG (SQ03)
    3. Created the new user, assigned it to the UG in SQ03 and removed the Change checkbox (revoke change rights)
    4. Logged on as the new user
    5. Started SQ01, switched user group to the new one
    6. Created the new SAP query based on the new InfoSet, run the query
    As I understand the principles of user groups and queries, I wasn't supposed to be allowed to do the step 6 as the new user, as it was revoked the change rights. Why wasn't I stopped?
    I searched for reply in previous posts - everybody agrees on principles, but I didn't find explanation on why it doesn't work.
    Thanks in advance!
    KR,
    Igor

    The table AQGDBBN seems to display a mapping of User Group with use rindeed but the results are less than the actual assignment. And the mapping does not have the Z query usergroups that have users assigned in SQ03.
    Anything that I may be missing?
    Thanks,
    Kashif

  • Using View Tables in SQ01 and SQ02, getting 'Not Authorized to Read Table'

    We are trying to use a SAP Standard View Table (CAUFV) in an SQ01 and SQ02 transaction. Even though there is no Authorization Group assigned to the View we still get "You have no authorization to read table caufv' when running the linked transaction. We tried assigning the CA and KA authorization groups to the role and got the same results. (The tables used to create the View are AFKO and AUKF and thier Authorization groups are CA and KA.) We tried other views and received the same results. Does anyone have any experience with this?

    Hello Chuck,
    There are 2 ways to restrict this
    1: The user should be a part of at least one user group to run the corresponding ABAP query. This automatically restricts the access of the user to specific functional areas, and thus the corresponding underlying logical databases.
    2: The authorization object S_QUERY should be used to give proper authorizations to the user for a query. This authorization object has a field named ACTVT, which can take values 02 for Change, 23 for Maintain and 67 for Translate.
    This value determines whether the user can create and modify the query. The possible authorizations in the object are as follows:
    S_QUERY_ALL          Change, maintain and translate query
    S_QUERY_UPD         Change and Translate

  • Coding in an infoset created by transaction SQ02

    Hello Folks,
    I have an adhoc query created using SQ01 and SQ02 based on feild ATINN between tables AUSP and CABN.
    The user now requires to display 'Characteristic Description' too.
    I have added CAWN and CAWNT required for this change (feild ATWTB is required to be added on display ) to the infoset and  
    also added the proper field group.
    The key links that can be made in the JOIN are:
      AUSP-ATINN <->  CABN-ATINN
      CABN-ATINN <-> CAWN-ATINN
      CAWN-ATINN <-> CAWNT-ATINN
      My problem:
      I have to link
      cawn-atwrt <-> ausp-atwrt
      cawnt-atzhl <-> cawn-atzhl        ( I tried using the CODING option on the EVENT Records Processing to filter based on the 
      aforementioned  conditions but it does not seem to work )
      I would appreciate any help on this matter.
    Regards,
    Subodh S.Rao

    Hi Sandra,
    Thank you.
    I was naive and thought that only key relations which are formed when we try to create a join between
    two tables is the only way and thought that the other relationships are done in coding.
    Regards,
    Subodh S.Rao

  • Target Group by partner function (created BP BUT100)

    Hi forum friends
    Please I need a help.
    I want to create a target group by Partner function (BUT100).
    I have tried to use the join:
    BUT100(partner field) + BUT0CC(Partner) + BUT051(Partner1) + BUT000(Partner) but it doenst work.
    How can i do it?
    Thanks in advanced.
    Daniel

    Hi ,
    There are already following standard InfoSets on the Partner Function BUT000 .
    CRM_MKTTG_BP_PRTFUNC
    CRM_MKTTG_BP_PRTFUNC_REL
    Could you please go to SQ02 T.Code to find out more on this .
    Hope this helps you .
    Regards ,
    Nagaraju D.
    Edited by: Nagaraju Dharmavaram on Jul 10, 2009 1:28 PM

  • Ad-hoc  Query - Travel Privilege Field Group

    Hi am new to this Ad-hoc Query...
    can any body tel me this.
    Asia HR is currently using/assigned to AQB : ZHR_UG_01 ABAP Query: User group and AQS: ZHR_PA_ASIA SAP Query: InfoSet which does not include the Travel Privilege Field Group.  The same Travel Privilege Field Group is already included in the Global infoset AQB - ZHR_UG_01 - ABAP Query: User group and AQS - ZHR_UG_01 - SAP Query: InfoSet
    Please tel me how to create ASIA HR as per the requirement.
    Thanks in advance..
    Regards,
    kalam A.

    Hi Kalam,
    seems that you simply have to add this field to the use InfoSet in transaction SQ02.
    Regards,
    Michael

  • SQ02 InfoSet Get Count of Total Number of Records that will be processed

    I am developing a query (SQ01) and am currently working on building an InfoSet (SQ02). 
    The Infoset was set up using a 'Direct read of table'.  Next, I'm adding some various fields and then going to Extras and trying to define some code to get the total number of records that my query will be processing.  I'm not sure if SAP pulls a filtered result set into a temporary table (by default - if so how could I reference it?) that I can reference or is just pulling in a row at a time in the record processing code, but my question is in regards to getting a record count of how many records are returned in my result set PRIOR TO going through all of the records.
    Overall, I'd like to be able to have a field that says Record X of Y.  I can get the X part for each line, but cannot get 'Y' until the very end.  Any help or ideas would be much appreciated.  I've looked around a bunch, but haven't found anything like what I'm requesting.
    Query Output would look something like:
    Record X1 of Y | Title1 | Amount1
    Record X2 of Y | Title2 | Amount2

    Hi Subin,
         I have tossed around this idea in my head, but am trying to figure out how to get the values and selection options from the query screen to incorporate into my Select statement within my infoset.  The problem I'm running into is that my user enters a group of account numbers and an ending date that has to be pulled from the SQ01 query screen to the SQ02 infoset code.  I've looked around for examples on pulling the data from the query screen, but have been unsuccessful thus far.  Say for instance I have 15 specific accounts that the user is entering in and they want any records that have been submitted prior to the end of the current month and the start of the business year.
         On my query screen they would enter in something like
    Business Year:  2011
    Reporting End Date:  <= 31.03.2011 (Which equates to all records between 01.01.2011 AND 31.03.2011)
    Account #s:  0000, 0001, 0003, 0005, ..., 9999  (These are a variable amount of accounts entered and could include options such as not equal to or even between ranges etc)
    In my START-OF-SELECTION code I would need a select like:
    NOTE:  This is just a pseudo code format, not checked for syntax here
    SELECT count(*)
    FROM TABLE
    WHERE BusinessYear = '2011' AND
        RecordDate Between 01.01.2011 AND 31.03.2011 AND
        Accounts IN (0000, 0001, 0003, 0005, ..., 9999).
    So In this select I need to reference the values in the SQ01.  How would I reference the account #'s and whether or not the user has entered an account number and said Not Equal on it etc.  This select statement would have to be built on the fly, since it's not guaranteed to be the same for each run.
    Thanks,
    Mark

  • Creating user groups using SQ03.

    I am going to make a change to a already existing query 01 in the user group /SAPQUERY/AM. I am not a query expert, in fact this is the second query that I am modifing. I am reading some documentation that the first thing that I have to do is create a user group. from what I am reading, the user group will contain the users that are allowing to modify queries. Since our users do not use this tool, I am the only one that creates and modifies queries. I think I am going to create a user group and that my user-id will be the only one in the group - correct? will I create one user group and and queries that I make changes to in the future user this user group or do I create user groups based on the users group that are defined by SAP. example - If I am changing a query in /SAPQUER/AM  and in /SAPQUERY/AU - would I create 2 user groups  1 for AM and 1 for AU or would I create only 1 user group and use it for both queries.
    After this, I think I have to copy the infoset (SQ02)and the query (SQ01) to custom names (names starting with Z) and then attaching the parts to the new user group.

    Hi Timothy
    Typically you want to create user groups for functional areas or grouped reports/queries. You can enter as many users as needed into a user group and only those who have the checkbox next to their name in the user group screen will have authorization to create/modify queries in the infosets where the usergroup is assigned. If you are creating 2 usergroups with the same users and authorizations then that is redundant but if the list of users is different or the authorizations may change then it would make sense to have 2 usergroups. You should have some naming convention to follow when creating the queries but the Z prefix is not required.
    Andy

  • How to create Infoset&user group query--(query report)

    Hi Guys,
      how to create Infoset&user group query--(query report),
      Pls send me the exact procedure with Example....
                                                                              Regards:
                                                                              Kumar .G

    goto SQ03 and create an User Group If U want to create Ur Own.
    Goto SQ02 to create Ur Infoset by Giving Logical database name or Simple Database table
    Then Choose What ever data U need to be included in The Qurey in field Groups.
    Then Generate the Infoset
    Now Assign the infoset to user group
    Now goto SQ01 and Click on Other user group Button and choose Ur user Group.
    Then in the USer group select Ur Infoset and then create Ur own Query and save this.
    Now select the infoset query and goto More functions under Query menu and Generate report name.
    Now Create a transaction code for the report name generated.
    Now use the Tcode.
    Hope U have got the basic idea of creating Queries.
    ~BiSu

Maybe you are looking for

  • Please help: strange error message when trying to burn cds

    I have been trying to burn an itunes playlist onto cds and I have never had trouble doing this before, but just this afternoon I have started getting an error message and the disc will automatically eject itself immediately following the initializing

  • Acrobat Adobe 9; editing converted pdf to word document

    I have acrobat adobe 9 standard and I have converted my document from pdf to microsoft word where I am suppose to be able to edit it as a word document.  It shows up as an image and I am not able to edit it.  Does anyone know what I am doing wrong or

  • Six Month Old Record.....

    I have a following Query: select e.nbr, e.eqsz_id||'-'||e.eqtp_id||'-'||e.eqht_id Type, eu.in_time, ROUND(to_date('30-sep-05','DD-MON-YY')-eu.in_time,0) "Total Days" from equipment e, equipment_uses eu where e.loc_type = 'Y' and e.loc_id ='QICT' and

  • Start BI Services Error Message

    Hi there, When I tried to start BI Services this morning it doesn't open the BI Publisher instead it shows the message below. <Nov 5, 2012 10:57:20 AM AST> <Warning> <oracle.jps.authorization> <JPS-03001> <Cannot instantiate permission class "oracle.

  • Is it possible to output PO to a FM instead of IDoc?

    When setting up PO output conditions for a vendor, I noticed that, in addition to the standard "1-Print", "6-EDI" and other standard options, there was an option "8-Special Function".  I was unable to find any documentation for this, so I figured I w