SAP Query Problem

Hi Friends
My requirement is to get a report Storage Location Inventory Level - Detail which Sorts Inventory levels by storage location and sums for storage location and material. For this I used tables MCHB, T001L, MARA and MAKT.
The Output format I required has a Header which displays as
PLANT &PLANT  Storage Location &STOR - &S_DESC
here
&PLANT is 4 Digit Plant Number
&STOR is 4 Digit Storage Location Number
&S_DESC is the Storage Location Description
Now when I execute the Query with multiple Storage Locations then in Header Storage Location Description is not changing rather it takes the last Storage Location Numbers Description. Why is this?
When I go into Chaneg Query and select the Field for S.Loc Desc then it comes correct but this gives me an additional output coloumn of Description in the report which is not requried.
The required output is as follows
PLANT &PLANT  Storage Location &STOR - &S_DESC
Material No. --- Material Description --- Batch --- Unrestricted Stock
When I select the Field of SLOC Description an additional coloumn appears as
PLANT &PLANT  Storage Location &STOR - &S_DESC
Material No. --- Material Description --- Batch --- Unrestricted Stock --- Sloc Description
This additional coloumn not required and the header description should come with multiple selction of SLOCs.

my friend
if i were you i would create the following info-set :
start from table T001L , then insert MCHB using Left Outer , then insert MARA using Inner , then insert MAKT using Inner
i tested it (created query based on this info-set) in my QA - it works correctly.
good luck
p.s. create info-set with data source "table join using basis table" T001L

Similar Messages

  • Problem with create universe on Business Objects XI 3.1 base on SAP Query

    Hello,
    I have a problem with create universe on Business Objects XI 3.1 base on SAP Query.
    The problem is hierarchy. Massage on Busines Objects is :
       OWBS_ELEMT__ISTKOSZT(cube ICPC01/BEX_ICOC01):Exception condition  "HIERARCHY NOT FOUND" raised.(WIS 10901) 
    Query in BEX run OK.
    Best regards.
    Ela.

    Hello,
    Thanks for response.
    When I run BEX QUERY, all works OK.
    All hierarchies was created and activated  on system BW.
    This situation appears after upgrade BW to SAP NetWeaver 7.3.
    Before upgrade I created universe without any problems.
    Regards Ela

  • One more Problem with SAP query

    Hi All,
    I am having a problem with SAP query
    Execution of SAP query transaction is leading to Dump
    the dump says Field 'R01' contains no fields, syntax check on the program shows same error.
    When I tried regenerating the Query in SQ01
    " Query Specification cannot be use to generate list
    Ranked list contains only numeric fields
    Please help me

    Gianpiero Bucchieri wrote:
    > So its important to listening the following tables too: Faktura (invoice), Partner Role, Partnernumber and the requierements number. The table are EKKO EKPO AND VRKPA OR vbkd, but if I join this table the query doesn't listining any results. If I cancel this 3 or 4 table and I start the query, the listening are ok. 
    >
    I am not sure what business process you are describing here - is it some kind of third-party sales order? If so, your join is wrong.
    From VB E P, firled BANFN and BNFPO you can go to table EBAN, where in field EBELN you will find the number of the purchase order (if somebody already had an MRP+Me58 run over the PR) which will lead you to table EKKO, and EKPO.
    So what we have here (essentially is):
    VBAK -> VBAP -> VBEP -> EBAN -> EKKO -> EKPO
    But that only solves one of your problems - you still have a long way to go to get invoices, partner and partner roles into there and I am beginning to ask myself what exactly it is you want to evaluate.
    Care to explain?
    Edited by: Mylène Dorias on Apr 1, 2010 2:10 PM

  • Problem Change SAP Query in Crystal Reports

    Hi,
    i have a problem with changing a SAP Query in an Crystal Reports.
    I build a Report with a Query(1) and Design the Report complet everything works fine.
    I make a new Query(2) and if i make a new Crystal Report with this new Query everything works fine.
    Now my problem is i would like to use the design of the first report. Therefore i open the first report and save it under a new name. Delete all Database fields and delete the database connection.
    Now i gave in the new database connection to the new query(2) and in the Database fields i see a lot of Fields but not the right ones. Its completly wrong. Is there anybody how know this problem?????

    Hi i solved my problem by myself.
    I have to set Query as external available and have to use the MDX Query.
    Its strange because if i build a new report the query dont have to be set as external available.

  • Unusual Problem in SAP Query

    Hi Experts,
    I am facing a very Unusual problem in during SAP Query Devlopment.
    In Input screen I am taking value as User , which is coming from User02 table and field name is
    Bname . In USR02 table Username is maintained boths as Numeric num ( like 1236533) and Username wise ( Like gd.anil etc).
    But While running the query , Its execute only when giving the nUmeric Num , It wont executes if i give the name like gd.anil .
    This gd.anil is also maintained in USr02 table .
    Can anyone tell me why its happening.
    Thanks .
    Koro

    If the user ID is actually stored as lower case, then it was entered directly or with a screen field that doesn't have a screen mask.  You are most likely using the DB field in your selection screen and it's being converted to upper case after entry but before selection.  Have you debugged the generated program?  You should see this in the query.

  • Problem in sap query

    Hi All,
    I have  changed the standard sap query . i have written coding for newly added feilds in infoset(sq02 code part).
    I want to join my internal table with standard internal table ( final internal table ) to incorporate changes.
    Please guide me to merge both the internal tables.
    Thanks in advance
    Sudhakar

    Hi,
    All other part remain same.Could you please tell me why we got that error any probable Opinion from your side...
    thanks in advance.
    Regards,
    Moni

  • Problem in transporting generated program of SAP Query

    <h5> Hi all,
    I created a SAP query in development server and generated the program for the same, I transported the infoset and the user group etc. to the next server but couldnot transfer the program, since the program is not a Z Program, so coudlnot save it and capture it in request so that the same can be transported.
    What could be the possible solution for the same????
    Regards, </h5>

    Yep, this gets a bit tricky. Remember that SAP Query is designed as an end-user tool. To this end, the creation of queries could be done in a productive environment. The maintenance of infosets could be restricted to Development systems only. I know that some sites do not allow this.
    Through the use of authorisations, you could appoint an administrator to generate the queries in PRD for the users.
    The name of the ABAP is a combination of the query name, infoset and the client number (I think - going from memory). You could possibly change the package name of the generated program and then attach it to a transport, but it becomes very messy and I wouldn't recommend it.

  • Problem with a SAP Query

    Hello all,
    I am working on an sap query and i am running the query for a date intreval say for the current month. But the query is picking the date from the infotype begindate and not the interval with which i am running.
    What might be the possible cause for this.
    Thanks,
    Krishna

    Hello Krishnakumar,
    U have selected the fields in query from the infoset and u r entering the value in the same now as the query the program should use the values entered in the fields selected from query unless u have create local fields which are not connected the the database.
    What is the data selection?

  • ABAP QUERY (SAP QUERY) Coding problem?

    Hi experts,
    Can anyone tell me how to find what is the final internal table in SAP QUERY? I want to delete some unwanted records from my final internal table but I am unable to find it. please do help. Its urgent I am strugling from 3 days, to day I have to finish this task...
    Help !!!!!

    HI,
    It is not the the internal tables but the structures have been filled for the tables you have declared in SAP QUERY
    or defined using EXTRAS option.
    in the application tool bar there is  a button 'CODE' by using the 'Record Processing' event of this you can clear the fields you want.
    REgards

  • SAP Query :  Excel sheet  download problem

    Hi,
    While executing a Z SAP query in SQ01 and data is displaying  fine in the ALV format. But when we export the data to excel sheet, every column is appearing twice (repeating only the header,  with empty items)
    something like this......
    Excel sheet...
    Header MATNR  MATNR  MATKX MATKX   LIFNR  LIFNR  KUNNR   KUNNR
    Item     10                       Test                   ABC                ABC
                  20                       Test2                 XYZ                 XYZ
                  30                       Test3                 MNO               MNO
    What can be possible cause of this ? What can be the corrective step to the issue?
    Thanks,
    Jai

    Hi ,
    Please follow the below step .
    In SQ01 --> In the List Display screen --> click on Export --> Local file --> Spread Sheet --> Give the File name and click on generate .
    It s working file . and i can be able to download all the records to excel without any repeatation .
    Thanks
    Pavendhan

  • SAP QUERY multilanguage problem

    Hi
      Have developed SAP query in english language as logon language. When i excecute the same query in enlish version it is working perfectly. But when i try to execute in French i got the output but the header text like PO Number lineitem it shows as Unknokwn text.
    Can anyone help me for this?
    Thanks
    Edited by: Nitesh Babu on Oct 1, 2008 10:15 AM

    Hi Nitesh,
    It is not unknown text. It is the french meaning of PO number which you are getting. So, though you log into different language also, do you want it in English only?
    If so, dont maintain the language translation. This will solve.
    For language translation, from your report on the menu bar Goto--> Translation. Here we need to mention the Original and Target language. Check if there is anything maintained for PO number.
    Regards,
    Swapna.

  • Creation of SAP Query in SQ02 with Single Table With Condition

    Hi All,
    I want to Create SAP Query in SQ02 using single Table MCHA.
    ii) I dont want all entries of MCHA Table I mean , I have to apply some Condition on this Table.
    i.e  Suppose I am having actual data in MCHA table is like this for Material M1.
    Plant    Material   Batch   BatchCreationdate
    P1          M1         B1       20.06.2007
    P2          M1         B1       04.05.2009
    P3          M1         B1       04.05.2009
    But I want the Output of SAP Query is like this:
       Material   Batch   BatchCreationdate
          M1         B1       20.06.2007
    That is irrespective of Plant if Material & Batch are equal ---> 1st record with Lowest date shoud get at the output.
    Please help me How write the code on single table in the SAP Query.
    Thanks,
    Kiran Manyam

    Hi,
    Your query should be like this:
    Select MATNR CHARG HSDAT
    from MCHA
    into table t_mcha
    where matnr = Materlal number from selection screen.
    The structure of t_mcha should contain the fields that you select.
    Then sort the table by date ascending
    Sort t_mcha by HSDAT.
    Hope this solves your problem.
    Thanks,
    Sowmya

  • SAP Query- Reporting on SOD

    Hello everyone,
    I need some help in creating a report in SAP Query based on user's processing Vendor Invoices and also Vendor Payments?
    I would like to have the following columns to report on:
    USNAM u2013 User Name (from BKPF)
    BLDAT u2013 Document Date (from BKPF)
    BELNR u2013 Document Number (from BKPF)
    BUKRS u2013 Company Code (from BKPF)
    BLART u2013 Document Type (from BKPF)
    LIFNR u2013 Vendor Number (from BSEG)
    NAME1 u2013 Vendor Name (from LFA1)
    WRBTR u2013 Amount (from BSEG)
    Vendor Invoice- I would like to restrict to only document type fields that are KA,KR,RC,RE,RN and ZE
    Vendor Payment- I would like to restrict to only document type fields that are ZV,ZS,ZP,ZH and KZ
    I have a few questions:
    First is i am using a logical database (BRM as BSEG cannot be joined) to select my columns however i do not know how to pull the 'Vendor Name' from LFA1. I understand that this table is not in BRM but is there a way to add any extra tables to work along side the logical database?
    Secondly, i have managed to report on all columns except the vendor name (from LFA1) and although i can restrict my output data based on document type fields, i need the report to only show the user's that have process vendor invoices & vendor payments only?
    At the moment i have a list of restricted document type but cannot seem to jsut show only those users who have processed both in both processes. For example User A has processed a vendor invoice (which is shown) and the same user may have processed vendor payment (after searching through the long output list!)
    I want all users who have doen one of the other process and only interested in those that have done both?
    Any feedback is much appreciated and pelase let me know if i have not explained this problem properly (as i am a newbie in this area)
    Many thanks
    Amar

    Hi Pascal,
    Since the IT2501 is a "Simulated Time Infotype" you cannot look at the data in it, but you can confirm the data from the ZL cluster and the data from the employee.  Since it is only this employee or a few employees, it is probably not the configuration of the time buckets for the IT2501, but you may want to make sure all time times are captured as you want.  Then look at the time entries for this individual or individuals.  Did they enter a time type that was not expected or configured?  Is all their time approved and passed through Time Evaluation?  Finally check the Master Data for the employee - is the Planned Working Time (IT0007) infotype correct or has it been recently changed?  Is he in a special Cost Center (IT0027) or Project that is captured differently for time purposes? 
    Since it just one or a few individuals, I would suspect the Master Data and some inconsistant entry that affects the time cummulation for the IT2501.
    Paul

  • Error 'Unable to open file' when downloading SAP Query to Excel

    Hi all
    I'm running a SAP Query which is set to download straight to a spreadsheet (Pivot Table / Microsoft Excel).  Intermittently it does not work -  apparently at random (at least, I've can't recreate the error at will).
    It does one of the following:
    - Works ok, and creates the pivot table
    - Gives an Excel error message 'Unable to open file', then returns to the 'save the data in a spreadsheet' popup when enter is pressed on the error.
    - Does not issue error message, just goes to the 'save the data in a spreadsheet' popup.
    In the last two cases, the excel pivot table sheet is not created.
    Has anyone seen anything similar, or have any idea as to what is causing the problem?
    Any help gratefully received!
    Not urgent as I've found a way round -  further testing seems to show that I don't get the error is Excel is already open - but in the past I've run many SAP query downloads without needing to open Excel first.  I suppose it's possible that this is just something to do with the Excel setup at the user site
    Message was edited by:
            E Gregory

    Hi,
    Ensure that file name with same name and in same path should not be open while saving the data.
    Award if it helps.
    Jogdand M B

  • Error while creating report from BW SAP Query

    Hi
    While creating a report from BW SAP Query, I get the following error.
    "An error occured while creating a report template.No error"
    On opening the same query in BEx Analyser, i can see the fields and output.
    Help me on this issue.
    Thanks
    Eswari.

    Hello Garett,
    I've the same problem and have tried now to get the data with MDX-Query. The error message below appears:
    'No RFC-authorization for function group  /Crystal/MDX for User ...'
    So it seems to be a authorization problem. Which special authorization must be assigned to Crystal users in SAP BI?
    Thank you for your help.
    best regards
    Oliver

Maybe you are looking for