Abap coding in SAP query (SQ01)

Hi,
By using the a table like for MSEG if i want to retrieve data for the movement type 101 (receipts from vendor), i can build a query using this table and retrieve data - my problem starts when the system shows individual line items instead of cumulated result as mentioned in the following example.
Example :-
for the date 01.07.2007 - i have 10 entries (101 movement) of quantity 1,2,3,4,5,6,7,8,9,10 against a vendor V1. - the query lists all the 10 entries.
But what is required is the cumulated entry against the vendor like shown below
vendor    receipt
V1         55.
What abap coding should be written (provide the sample code) and the where should it be written in the query transaction SQ01
Regards,
M.M

Hi Magesh,
If you do not wish to see the detail lines, then you do not need to create them.  Just create the Statistics portion only.
If you wish to see 'summarized Vendor quantity by day', then you might sort on Vendor first, then posting date second.  Or, vice versa, depending on your business requirement.  I would think that you might also wish to include Material in the sort, since each Material is probably valued differently.
For more info on creating statistics in SAP Query, refer to
http://help.sap.com/erp2005_ehp_02/helpdata/en/d2/cb4256455611d189710000e8322d00/frameset.htm
   Regards,
   Bruce

Similar Messages

  • How to Hide Empty Column In SAP Query (SQ01)

    I was crated a report in sq01 based on business requirements , but there are some fields without any content , in sq01 if you select one of output fields in the right side of the screen in the left side you can see  "List Fields" T in the list fields there is a check box , the name is "Only display field if <> 0 " , but when i check it, it doesn't work  , guys is there any one to help me to eliminate column without content , in the result of sap query (sq01) ??

    Please give reference (or hyperlink) to 10 Useful Tips on Infoset Queries (original document)
    Regards,
    Raymond

  • SAP Query (SQ01) who and when to use the report

    HI Experts!!!
    Is there somewhere recorded information:  who and when to use the report from SAP Query (SQ01)?
    Thanks

    Hi
    This topic doesn´t belong to the Service Marketplace Area.
    regards Martin

  • Hide columns for ALV list output in SAP Query SQ01/SQ02

    Hi All,
    I have a requirement to hide the columns which are empty in sap query SQ01 alv list output.
    Please let me know this functionality available in Query (SQ01) like normal reports
    Regards,
    Venkat

    Hi,
    We just can't make changes in this case as this are all system generated programs.
    WE have to write our own reports to make things flexible to match our requirements.
    Things you are asking is not possible.
    Regards,
    Suvendu

  • ABAP Reports and SAP Query

    Hi Experts,
    I have question regarding ABAP Reports, SAP Query, and Transaction with variant.  How are we securing one the above reports that we assign them through pfcg.  We can secure custom program by custom transaction or define the auth group in S_PROGRAM auth object but in this case we have to assign SA38 in production. is that correct?
    Please help me understand difference between the ABAP reports and SAP query. Is the ABAP reports same as Program or they are different.
    Thanks in advance
    Faisal
    Edited by: Faisal on Jun 30, 2009 11:06 PM

    Hi,
    1) End user security (role matrix coordinate with process team)
    This role Matrix design is most important where we can put restrictions and use SoD.
    2) Secure Table (by auth group)
    Table TDDAT and use of transaction se54 for security tables to right auth Groups. Secure s_tabu_dis, s_tabu_cli.
    3) Secure program (as you said ABAP reports are referred to Program)
    Use of table TPGP and program RSCSAUTH for assignment of groups to Program. SA38 Running of SA38 requires a minimum SUBMIT in user Action. A user having SA38 is dangerous as he/she is now enabled to run any report. Hence protection in Auth Group is needed. Verify each and every program is having authority check statement and Auth Group or not before assigning sa38. As you mentioned its best to avoid SA38 and create CUSTOM TXN for each report.
    (We should also SECURE S_DEVELOP in Production properly along with ur points. Please Note).
    4) Secure some batch jobs roles for batch job
    Secure by s_btch* objects and less access to se36.
    5) Create support roles for cutover activity during Go-live
    That is always needed. Go ahead.
    6) Emergency roles & IT roles for support
    This is very much needed as a role of Mitigation and Fire Fighting for Temporary access. Ensure to enable ur audit parameters in RZ10 (rsau* sm20,RSLG* for sm21). Give emergency access but enable audit via sm19 and get audit reports from sm20 and sm21 immediately after the use of emergency access.
    There are also other auth objects we need to be care ful which is a long list and hope every body ensures that (s_cts,a_admi,s_trans, tables ssm_cust, prgn,t000) etc and a host of others. Besh wishes. Let us know if any issue.
    Regards
    Aveek.

  • Adding the ABAP code to SAP Query to support Query's ALV Double click.

    Hi, Expert.
    I need to add some ABAP Code into SAP Query (or Infoset) to support the double click event on ALV cell of result of query.
    Is it possible & How to do ?
    Thank you very much.
    Best Regard
    Nattapash C.

    Hi, Gautham.
    I've put BREAK-POINT in all code section e.g. INITIALIZATION, END-OF-SELECTION..
    I found there are some section for add code that will be executed when query is processing before output data to ALV.
    What I need to know is Where I can input the code after ALV output. For support the Double Click Event on Query's ALV cell.
    Best Regard,
    Nattapash C.

  • SAP Query SQ01/2/3

    Is it at all possible to link SQ01/2/3 SAP Query to an external SQL source and table (MS SQL).

    I have an external SQL2K database that i would like to be able to query from SAP without the requirement of complex ABAPing to create AD-Hoc reports/lookups.
    Is it possible to create a link/RFC to the external SQL DB and then have the tables and Fields accesable by creating an Infoset, which i can then query.

  • Question in SAP QUERY- SQ01,SQ02,SQ03

    Hi SAP QUERY Experts,
    I have a question for the query. Is it possible using a interface parameter for report-to-report interface? I mean when I double click on one the data record of query, I want to transfer the key information of this record to the query or report or transaction as parameters. Is it possible? If yes, could you tell me how?
    This is on SQ01, SQ02,SQ03
    Thanks and Regards
    Saravana

    hi all,
    i am having one abap standard query, i have to modify that one and i have to include another colum which needs the requirment.
    07 Depreciation /SAPQUERY/AM07 ADA FIAA - DEPRECIATION
    the above i mentioned is the query, how ever i tryed this standared to copy but i am not able to connect infoset and all stuff.
    pls guide me how to insert additional colum in that standard report or query.
    pls guide me
    thanks and regards,
    sai

  • Is SAP Query (SQ01) supported by Visual Composer?

    Do you know if it is possible to easily integrate a query developed in an ABAP backend system via SAP Query (transaction SQ01) in Visual Composer?
    Sergio

    Hi Jorn,
    I must go, but I copy you a Link from a presentation. I don't have the time to control it.
    Hope it helps.
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/2f/741a403233dd5fe10000000a155106/frameset.htm">sap.help.com</a>
    Best Regards,
    marcel

  • SAP Query (SQ01) - create and save queryies

    Hi Expert;
    We wanted to implement SAP query reporting (SQ01) tool, and already developed custom HR infoset and user groups and transported to QAS.  We experienced the problem that we can not directly "save" any queries in SQ01. We pretty much have the client opened up and set at "Changes without automatic recording".  But keep getting a "transport object create" dialog upon "save" query.  But in Adhoc (PQAH), we don't encounter same problem.    We wanted our users be able to create and save any queries directly without creating any local objects. Is there another setting that needs to be set? 
    Thanks for any information that you can provide.  Points will be awarded.
    Helen

    Hello Helen,
    in SQ01 you can save queries like in HR Ad Hoc Query (or Infoset query as it is called outside HR).
    However this is only possible in the "Standard Area" not in the "Global Area". However as Ad Hoc Query is based on the SQ0x basics it only hides this effect.
    If you are doing HR specifics you should consider the documetnation on the special HR switches:
    http://service.sap.com/~form/sapnet?_SHORTKEY=01200252310000076208&
    In general if you are new to the topic you should consider the courses BC407 for Query Basics and HR580 for reporting in HR.
    Also to get a feeling for the different types of reporting with the InfoSet Query you can look at the following documentation:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/a8/2e7237a323427ee10000009b38f8cf/frameset.htm
    HR Reporting Tools -> Sap Query -> InfoSet Query -> Calling InfoSet Query.
    Or you can book a special training if you need a contact let me know your email adress
    Best regards,
    Michael

  • SAP Query SQ01 column limitation issue

    Hi
    At SQ01, I have created a number of custom reports via SAP Query.
    Its a great tool and all, but I am running into a problem where there is a 255 character limitation when I create a Statistics view (where it summarizes values by characters I choose).
    In the SQ01 Query screen, this is controlled by the columns field under the heading list format  and if I list too many objects, I get a message stating report has exceeded 255 character limitation.
    Is there any way I can modify this value, so I can exceed it (say 500?)?
    For us, we use many query reports in our daily reporting so it would be worth modifying.
    If anyone has any info on this, please advise (or feel free to PM me!)
    Regards
    Ken

    Naimesh,
    Thanks for your reply.
    How can I accomplish this? And will it still show the data one the same screen?
    Regards
    Ken

  • Sap Query sq01: how to combine substrings in complex calculations

    I made a query with sap query. I made 1 local field: name1. I have 2 fields firstname and lastname and a field named class.
    In the complex calculations screen I made the following calculation for that field:
    Condition: CLASS='1'
    Formula: firstname' 'lastname
    When I try to run this query I get an Abap error saying "unable to interpret [firstname] as a number". It looks like the + expression can only be used here for numeric calculations.
    Does anyone know how to solve this?
    Edited by: J S on Jan 27, 2009 11:52 AM

    Hi,
    i think its better to concatenate in the infoset code section.... you create a local filed in infoset of type char and then write the concatenate statement of abap and keep first name and last name in the local field .... write this code in the record processing section and take this local filed and display it in the  query i think this clears you ..
    by the way if you still want any information let me know

  • SAP Query (SQ01/SQ02/SQ3)

    Hi Experts,
    I have created query (SQ01/SQ02/SQ03) to display below fields: Hazard Code, Device Location Number, Hazard Code Description, Loc. Created by, Loc. Created on Date.
    Now in the output list I want to display a summary of all the count of records by the key characteristic for the query. For example, the Device Location by Hazard Codes query should give us a summary of the count of all device locations per each hazard code.
    Practical Scenario:
    Device Location Hazard Code
    40002748              01
    40002751              05
    40002481              07
    40002746              04
    40002749              04
    40002994              01
    Then in this case it should either display additional third column or additional row saying:
    Device Location Hazard Code
    40002748              01
    40002994              01
    Total Hazard Count: 2
    40002746              04
    40002749              04
    Total Hazard Count: 4
    40002751              05
    40002481              07
    or
    Device Location Hazard Code Total Count
    40002748              01                
    40002994              01                 2
    40002746              04
    40002749              04                 2
    40002751              05                 1
    40002481              07                 1
    I checked statistic tab present in SQ01 also URL [http://help.sap.com/erp2005_ehp_02/helpdata/en/d2/cb4256455611d189710000e8322d00/frameset.htm] but still I am not able to figure out how to display this data.
    Please let me know.
    Thanks

    Hi,
    If you're getting the output in ALV Display, you can simply click on the location column & then click on the Sub-Total button on the ALV toolbar, it will sort all the records according to the location (1 or 2 or...) & give you the total/count of the particular location.
    For any further clarification, let me know.
    Prateek

  • Transport request for SAP Query - SQ01, SQ02, SQ03

    Hi Experts,
      I have a doubt, Whether we can have request for SAP Query which have created from Transaction SQ01.If Yes then How to do that....?
    Thanks in Advance,
    Chetan Joshi

    Hi,
    Use the program RSAQR3TR
    Thanks
    Naren

  • Question regarding SAP query (SQ01& SQ02)

    Hello everyone,
    I have been assigned a task of creating a SAP query in SQ01. The report requires me to incorporate a drill down functionality.
    i.e. when I double click on a material I should be able to see the components of that material.
    My question is "Is it possible to incorporate a drill down functionality in a Query through SQ01".
    If yes then how.
    Please provide me with some documentations or example codes for this.
    Regards,
    Deepti Jain.

    Deepti,
    There are 2 ways to get the output  From SAP query.
    1.Under record processing :
          if you don't write any code in Start of selection event for output
         (WRITE statements)  we can not have any control on that.
    2. Under start of selection event :
         If you write any code in START OF SELECTION event like
         get the data in internal table and loop the internal table
         In loop WRITE statement to display with format and try to use
        Interactive report commands Here. I think it will work fine.

Maybe you are looking for

  • Connecting an Air to an external display?

    When checking out with a new MBA you have the option of purchasing an adapter to connect to a DVI. However, it looks like this is a mini DVI to DVI cable, and I can't see that the new MBAs come with a mini DVI port. Why would there be an option to bu

  • MAC OS 10.6.8

    Is Reader 10 the version for Mac version 10.6.8? Is there anything special that I need to do like I did not do with Flash and because I was not told to follow the Adobe Instructions my MacBook Pro needed some major work to get it working right. I rea

  • Need help with hooking up my Xbox 360 to my X-Fi I/O Bay via Toslink (Optical)...it's not worki

    So here's the deal: I have connected a Monster toslink optical audio cable to my Xbox 360's component cable. I have that toslink cable running to the Optical In jack on the I/O bay of my X-Fi. I'm trying to get the audio from the xbox to play through

  • Re: MOQ in sales Order

    Dear All, How can you restrict a MOQ and Max ord qty while creating a Sales Order for a Particular Customer. e.g: I have to create a sales orders for a customer ABC where the Min ord qty should be 5 and the max ord qty is 50. How can I restrict. In c

  • OBIEE usage tracking questions

    Hi, I am using OBIEE 11g and we enabled usage tracking. Recently, i have observed that some inserts to S_NQ_ACCT table is failing due to "String literal too long" error. We have configured VARCHAR(4000)  for QUERY_TEXT column in physical layer which