SAP B1 - Queries

Hi Friends,
We are using SAP B1 2005B.
The below query is working
SELECT T4.SlpName, T3.ItmsGrpNam as Vendor, T1.Dscription, T0.CardName as "Customer Name", T1.LineTotal As Amount FROM ORDR T0,RDR1 T1,OITM T2, OITB T3, OSLP T4 WHERE T0.DocEntry = T1.DocEntry AND T1.ItemCode = T2.ItemCode AND  T2.ItmsGrpCod = T3.ItmsGrpCod AND T0.SlpCode = T4.SlpCode AND T1.ItemCode in (SELECT T0.ItemCode FROM OITM T0 WHERE T0.ItemCode ='A00001')
but when i replace 'A00001' with parameter [%0] then error comes
SELECT T4.SlpName, T3.ItmsGrpNam as Vendor, T1.Dscription, T0.CardName as "Customer Name", T1.LineTotal As Amount FROM ORDR T0,RDR1 T1,OITM T2, OITB T3, OSLP T4 WHERE T0.DocEntry = T1.DocEntry AND T1.ItemCode = T2.ItemCode AND  T2.ItmsGrpCod = T3.ItmsGrpCod AND T0.SlpCode = T4.SlpCode AND T1.ItemCode in (SELECT T0.ItemCode FROM OITM T0 WHERE T0.ItemCode =[%0])
Actually there is no problem with such queries which work in open sql but the query generator shows as error.
Any suggestions how we can resolve this problem. We cannot even write such queries on xl reporter. how do we solve it.
Thanks
Ravi

Hi Suda,
Thanks Suda it worked. but i added one more table in sub query, it is still working. but then the parameter is giving an error.
The below query is working now.
SELECT T4.SlpName, T3.ItmsGrpNam as Vendor, T1.Dscription, T0.CardName as "Customer Name", T1.LineTotal As Amount FROM ORDR T0,RDR1 T1,OITM T2, OITB T3, OSLP T4 WHERE T0.DocEntry = T1.DocEntry AND T1.ItemCode = T2.ItemCode AND  T2.ItmsGrpCod = T3.ItmsGrpCod AND T0.SlpCode = T4.SlpCode AND
T1.ItemCode in (SELECT T5.ItemCode FROM dbo.OITM T5 WHERE T5.U_SlpCode = [%0])
Added one more table in sub query, The below query is still working now without a paramater.
SELECT T4.SlpName, T3.ItmsGrpNam as Vendor, T1.Dscription, T0.CardName as "Customer Name", T1.LineTotal As Amount
FROM ORDR T0,RDR1 T1,OITM T2, OITB T3, OSLP T4
WHERE T0.DocEntry = T1.DocEntry AND T1.ItemCode = T2.ItemCode AND  T2.ItmsGrpCod = T3.ItmsGrpCod AND T0.SlpCode = T4.SlpCode
AND T1.ItemCode in
(SELECT T5.ItemCode FROM dbo.OITM T5,dbo.OSLP T6 WHERE T5.U_SlpCode = T6.SlpCode)
The below query is Not working with a paramater.
SELECT T4.SlpName, T3.ItmsGrpNam as Vendor, T1.Dscription, T0.CardName as "Customer Name", T1.LineTotal As Amount
FROM ORDR T0,RDR1 T1,OITM T2, OITB T3, OSLP T4
WHERE T0.DocEntry = T1.DocEntry AND T1.ItemCode = T2.ItemCode AND  T2.ItmsGrpCod = T3.ItmsGrpCod AND T0.SlpCode = T4.SlpCode
AND T1.ItemCode in
(SELECT T5.ItemCode FROM dbo.OITM T5,dbo.OSLP T6 WHERE T5.U_SlpCode = T6.SlpCode  AND T6.SlpName = [%0])
Any help on this will be appreciated.
Peter>> Thanks 4 ur suggestion too. How can you use a pl/sql in a query generator, will it work. i never done it.
declare statements are pl/sql statements.
Thanks
Ravi.

Similar Messages

  • WebI report based on Universe upon SAP BEx Queries:Prompt issue

    Hi,
      I am creating Web Intelligence report using Universe based on SAP Bex Queries. In WebI report I created a filter condition as I need to run report based on two specidc dates. I need to schedule report to run 2nd of every month to show data for last month. At present I have the following filter : date between 'Start Date' and 'End Date'. 'Start Date' should always be 'first date of previous month' and End Date be always must be 'Last date of previous Month'. How to do this. The solution I thought would be to create  variables at report/universe level ('first date of previous month' and 'Last date of previous Month') and use in the filter using 'Object from this Query' option.But this 'Object from this Query' option is missing in the prompt.Is there any work around to achieve this.? Could you please help me.
    Nanda Kishore

    Hi all,
    I have a related question too.
    I have 2 queries and need a Combined BEx query written on this for reporting. (WebI)
    In the 2 queries, there is a Field which needs to be restricted.
    But this field should not be restricted in the Combined BEx query.
    So I thought of restricting the Field at the report level. But in this case, the user gets a prompt to enter a value for the field.
    And this is not desirable as per the requirement.
    COuld you please tell me if there is another way of handling this without the user being prompted to enter a value while the report is being run, but still I need selection at the Field level.
    Thanks and Regards,
    Srilakshmi B

  • No. of Connections needed for creating universes from SAP BEx Queries

    Hello,
    I have 8 SAP BEx queries, my task to create to universe for all of these queries. I have created a datasource connection, my question here is can I use the same connection for all the queries by changing datasource connection and selecting the new query or is it suggestable to create 8 datasource connections in universe designer??
    please let me know if you need any more info.
    Your reply is highly appreciated.
    Thanks,
    Naresh

    HI,
    You need to create 8 connection for 8 BW queries.There is  one to one mapping in the universe.If you change the existing connection source then it will not work for earlier query.
    Other thing you can check like you have 8 queries then instead of creating 8 universe if possible then merge some queries in the single bw query and then create universe.
    Thanks,
    Amit

  • Download & Upload of SAP ABAP Queries.

    Hi All,
    Can anybody please guide How to Download & Upload SAP ABAP Queries.
    Waiting for positive reply.
    Thanks in advance for help.
    Regards,
    MAM

    Program RSAQR3TR is the standard program.
    You can simply download your infoset/query from your source system and upload the  file into your destination system.
    It should works.
    If, for some reason you are not authorized to upload/download, you can create a transport and import it using the usual way.
    Best regards.

  • How to design a optimized universe from SAP BEx queries

    Hi Team,
                  I would like to know some of the queries :
    1.How can you design a optimized universe from SAP BEx queries in the sense which gives you more performance
    2.What are the differences between Non SAP sources like Oracle,SQL and SAP sources in designing the Universe.
    3.Can we create a Derived table from an SAP source because i know that the Schema is not created for BEx queries,cubes.
    4.What are the advantages of having oracle as a source then SAP source.
    Can you please elobarate the above queries.
    Regards,
    Pradeep P.

    Hi,
    1. Check Ingos Blog on SDN ther are some PDF for performance regarding WebI on BW
    2. On RDBMS Source you have to design your universe. On OLAP Source like BW you generate the Universe and cant customize it a lot.
    4. Good question. In a BW all your logic is already in place. On a RDBMS you have to build your logic in a universe. But there are a lot of differences.
    Regards
    -Seb.

  • Universe creation against SAP Cubes/Queries with same connection

    Hello,
    I am creating universe against the connection for SAP BW system, once I have created a connection and selected a cube or query and built a universe on top of it....If I go back and create a new universe and this time change the connection to point towards a new cube/query the old universe stops working.
    Is it a limitation for SAP database where we need to have a new connection setup for each universe...or is there a different way to use same connection pointing towards different cubes/queries for different universes.
    Please let me know.
    Thanks
    Dharma.

    Hi
    when you build a universe based on the connection and want to use the universe with reports you can not change the underlying connection because then your universe will not work anymore.
    You can have multiple universe on a single connection.
    here some more details:
    Web Intelligence and SAP BI
    /people/ingo.hilgefort/blog/2008/03/24/businessobjects-and-sap-part-5
    Web Intelligence - Delegated Search and Delegated Measures
    /people/ingo.hilgefort/blog/2008/08/27/businessobjects-and-sap-part-6--web-intelligence-and-sap-bi
    OLAP Universe Change Management
    /people/ingo.hilgefort/blog/2008/08/29/businessobjects-and-sap-part-7--olap-universe-change-management
    Web Intelligence Best Practices with SAP NetWeaver BI
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/008d15dc-f76c-2b10-968a-fafe5a121129
    ingo

  • How does Merged Dimensions Work in WebI created on SAP BI Queries

    Hi,
    I need to know how does Merge dimensions work in WebI when using SAP BI Query as source?
    Below is my understanding when connection is defined for the universe on oracle database:
    1) To get the data in merged dimensions, there must be physical join (Either Direct or vai some other tables) between different tables at backend level (This means  there  must be join between tables in Oracle database.)
    2) we get the UNION of data when dimensions are merged at webI level.
    I dont know how this works in SAP BI.
    Since there is different data model defined for different BI Queries in SAP , and for each BI Query and there is seperate Universe, So how can you get correct data in WebI when there is no connections in DSO's used in different BI queries?
    Can any one suggest me the way data apperas in merged dimensions for WebI created on SAP BI?

    I assume we are only talking about merging dimensions in Web Intelligence here and not on the BW backend. this is a client side mere where you have 2 resultsets.
    if you want to do this on the BI server side it would be a multi-provider combining different InfoProviders - or a InfoSet - depending on the join type you need. MultiProvider is a union, Infoset allows you to choose
    Ingo

  • Universe: can't connect to SAP BW queries

    Hi,
    we are using BO XI 3.1 SP3 together with a SAP BW 7 system. We installed the SAP Integration Kit on the BO server as well as on our local installations and imported the transport files on the BW server. However, in Universe Designer I can't make connections to queries - I just see cubes.
    As far as I know it's recommended by SAP to use queries instead of cubes for universes. What could be the cause that I don't see our queries when defining a new connection in Universe Designer?
    Thanks!

    Hi,
    I forgot: we allow external access for our queries. I still can't see them in Universe Designer.
    Besides installing the Integration Kit on the BO server and client as well as importing the transport files on the BW machine - anything else to do?
    Thanks!

  • Drill down functionality based on SAP BI queries

    Hi,
    I've a requirment to put Xcelcius on top of SAP BI. Lets say we have a BI report (report A) on comparison of products. We have another BI report (report B) which is having detailed data for any chosen product. The requirement is as follows-
    1) We should be able to see the data from both these reports in a single Xcelcius frame.
    2) When I click on one of the products in report A it should display the detailed results (in graphical form) for that particular product in report B.
    Please advise how this can be acheived.
    BR,
    SSC

    Hi Sapsem,
    What have you completed so far? Do you have BOE installed? If so, and you have a universe built off of each of those reports (queries) then you should be able to use Query as a Web Service (QaaWS) to bring that data into Xcelsius. If you have prompts (filters) on your Universe, then map those to some fields in Xcelsius with the ones for B relying on inputs from A.
    Should be fairly straightforward unless you don't have BOE and QaaWS.
    I hope that helps!
    Thanks,
    Brian

  • Connection error to SAP InfoSets/Queries 'Function module not found'

    I have crystal reports 2011 and I would like to connect to our SAP system (ECC6.0).  I am able to connect partially but when I drill down into where I guess crystal is trying to pull a list of queries or infosets I get errors.
    For infosets i get 'Function module "/CRYSTAL/GET_FUNCAREA_CATALOG" not found.'
    For queries i get 'Function module "/CRYSTAL/GET_QUERY_CATALOG" not found.'
    What changes need to be performed to our SAP system to get these functions added?
    Thanks in advance.

    Hi Joshua,
    I did some checking so I changed my original reply. Those drivers are installed so nothing extra needed. I'm not completely sure how all of the Classic SAP data sources work but the only thing different is BW Query was removed in favor of MDX.
    Also, the Transports are in a download package and must be installed onto the BW system. I'm checking what that means and where they are located.
    The package for the BW server is located here:
    <folder where I unzipped>\DATA_UNITS\CrystalReports\Collaterals\Add-Ons\SAP\Transports
    Thanks again and sorry for the confusion...
    Don
    Edited by: Don Williams on Jul 11, 2011 10:59 AM

  • SAP HR queries

    If, anyone know the answers for below questions please, answer them
    what r the IT's to restrict the payroll results access to employee
    what r the main function of schema used to calculate tax
    Say for instance, one of the taxable tem is missing in the result, how can u retain it
    what is selection rue n counting class
    how do u map various functions in sap
    what is key or the knowledge data structure. Does anyone have format of it
    if a person left the org but, he has to be paid some amt. how we deal this
    tel the program that we use for quota creation
    what is payment recalculation in it 0003
    can we do more than 1 action in a day? say hiring n trasfer ( what will be the start n end dates )
    how payroll run in ur org. is it automatic or manual. if automatic, how is it been set
    how can u change the it 0003 other than pa30 ( i know the path, if u know any other tcode let, me know )
    what is payroll remuneration statement report
    what we have to change in payroll schema for +ve time management
    Thanks
    Vijju

    Hi all,
    Please, reply if, any one knows the answers.
    1. what are the object codes of course type and course catalog
    2. what is the difference between prebooking and booking in lso
    3. if a position belongs to delhi had been wrongly assigned to employee working in chennai, how will system identify this error
    4. Which Infotypes are mandatory to run payroll
    5. How to do bank transfer
    6.why we need to maintain IT0045, how loan emi will be deducted
    7. can we book employee for coursetype
    8. Apart from defaulting values in infotypes and controlling the process, what is the use of features
    9. There are more than 4 times contraints in sap, i know 1st three, can any one give complete explanation on them with multiple examples
    10. INLK is schema for mid yr golive, what are other schemas available for mid yr golive for us, uk, india.
    11. In Org Mgt, how can enduser update the status of a position as vaccant
    12. What are objects of Org mgt
    13. If we have to explain the enduser with proof that, this is your personnel structure, how will you do it ( wiithout entering into SPRO )
    14. can anyone explain the use of  infotye 2003 with example
    Thanking you all in advance
    Regards
    Navya

  • Sap Script Queries

    Hi Experts,
    I need to print Long Text maintained for a record in sap.
    I have the Text ID and Text Object but don't know about the Text Name
    and I have to print this Long Text in my SAP SCRIPT to be shown on the Form and i am not doing changes in standard print program instead using the subroutine pool.
    Please tell me in Detail how can i achieve this.
    And one more query, i also have to print Digital signature for a document.
    Please tell me in Detail how can i get the details for a Digital signature (for a particular record) and get them printed in SAP Script.
    Thanks

    Hi,
    data: T_TEXT like tline occurs 0 with header line.
      IF NOT thead_011 IS INITIAL.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            id                      = thead_011-tdid
            language                = thead_011-tdspras
            name                    = thead_011-tdname
            object                  = thead_011-tdobject
          TABLES
            lines                   = T_TEXT
          EXCEPTIONS
            id                      = 1
            language                = 2
            name                    = 3
            not_found               = 4
            object                  = 5
            reference_check         = 6
            wrong_access_to_archive = 7
            OTHERS                  = 8.
    T_TEXT is an internal table and contains the all the text which is there in ur transaction.
    now, u Loop the table T_TEXT and call WRITE_FORM fm in the loop.
    LOOP AT t_text.
      call function 'WRITE_FORM'
        EXPORTING
           element = 'TEXT'.
    ENDLOOP.
    now u call the element 'TEXT' in ur form, and print &T_TEXT-TDLINE& in that element..
    so it will print all the lines in T_TEXT table.
    In Script:
    eg: 
    /E  TEXT
    P1 &T_TEXT-TDLINE&
    Hope it helps
    Rgds,
    Pavan

  • SAP LSO Queries on Portal and Authoring Environment

    Hi Gurus,
    We are in the Process of implementing SAP LSO in ECC 6.0 environment.
    Can the gurus give some pointers on the following quries:
    Portal / Authoring Environment:
    1. How does the Collaboration Functionality Work in LSO Portal? Can you provide me a pointer for any documents or links the configuration and set up.
    2. I tried to install the LSOAE 6.00 in my PC. The Installation was successful but I am not able to open the application. I already have JDK 1.4.2 on my PC. Is there anything else that I need to do for opening the application?
    3. Can we link a PPT directly from the CMS without using the Authoring Environment? If so can you provide me the details on how this can be set up. ( Will the WBT functionality work without the Authoring Environment in SAP LSO).
    Please provide information.
    Thanks and Regards,
    Madhan.

    1. How does the Collaboration Functionality Work in LSO Portal? Can you provide me a pointer for any documents or links the configuration and set up.
    In general the KMC component is used for Collaboration, With infotype
    Collaboration Room (Infotype 5045)
    refer link for more detail. [http://help.sap.com/erp2005_ehp_03/helpdata/EN/45/5abb3f8e236d3fe10000000a114084/frameset.htm]
    2. I tried to install the LSOAE 6.00 in my PC. The Installation was successful but I am not able to open the application. I already have JDK 1.4.2 on my PC. Is there anything else that I need to do for opening the application?
    Pls update the JRE to latest version.
    3. Can we link a PPT directly from the CMS without using the Authoring Environment? If so can you provide me the details on how this can be set up. ( Will the WBT functionality work without the Authoring Environment in SAP LSO).
    No you can't do that, U need to publish any content form AE only. So that u can update the Publisher Database.
    Manually u can have the content in CMS, but no tag to it for SAP or in AE. Repository
    Amith Ingua
    Edited by: Amith Ingua on Jun 23, 2008 10:21 AM

  • Merging data from SAP BEx queries with SQL - Keys are details not Dimension

    I have a challenge when trying to merge data from a BEx query and a relational source in SQL Server.
    I have a characteristic for Material, with an associated Material key that is a attribute of Material in the BEx query.  On the SQL side I have a Material ID which is they unique identifier.
    So when you Merge Dimensions in a WebI report, it is exactly that merging dimensions,  so you link Material from BEx and Material ID from SQL.   However, on the Bex side Material displays a long text field which will never join to the data from SQL which is an ID.  The like for like objects are Material Key in BEx and Material ID in SQL, however, as Material Key from BEx is an attribute to manifests itself in WebI via a universe as a Detail object, which makes it unavailable for merging.
    I have tried to set the Material characteristic to display as KEY in the BEx query design, but alas it still comes through as a long text, hence still not able to merge data sets.
    Any workarounds ??
    Andrew

    Hi Andrew,
    In universe designer, edit the material key detail object. Copy the text that refers to the characteristic attribute in your BEx query. Create a new dimension (say, 'Material Key') and paste this text as the definition.
    Essentially you're turning a detail object into a dimension, which (in my limited experience) works just fine.
    Let me know how you go.
    DG

  • SAP BW Bex Queries as Data source WIS 10901 Error while refreshing

    Hi,
       I have created a Web Intelligence report based on Universe upon SAP BEx queries.
      When I refresh the report, I get the following error:
      A database error occured. The database error text is: the supplied XML is not valid. [Measures].[4ASYKV5XU5T].(WIS 10901)
      Report was fine for a day. I started showing error from today.
    This is my first report and Universe based on SAP BEx queries. I do not have knowledge of SAP system as well.
    Please help.
    Nanda Kishore B

    Hey Nanda kishore B,
    It is because that Measure object definition changed @BEx.  Measures.4ASYKV5XU5T
    Can you check @BEx query for any latest changes??
    OR
    Go to Universe Designer:
    1. Open Universe
    2. View == Refresh Structure
    3. Can you see any updates now?? OK
    4. Save Universe
    5. Export it
    Now open the Report. It will work now, if all Objects are there at Bex query & Universe level.
    Along with this Do integrity check @Universe also before exporting.
    Gracias...!!
    Let's play with Aurora (BO XI 4.0)

Maybe you are looking for

  • Am I the only one who has firefox crashing when trying to use "Clear Recent History"?

    Well I installed Firefox 4 on both my laptop and my desktop and it does the same problem to both of them, which annoys me greatly. Such a simple feature should have no problems working right? Well not for me apparently. When I try to use Clear Recent

  • Can't open a document saved as a text file

    I recently saved a document as a text file because I wanted to send it to some Windows users. Now, a few days latter when I try to open the document it is in code/ASCII thereby unreadalbe. I had one of the people I sent it to send it back to me, whic

  • Site won't open in browsers

    My fledgling site will not open in Safari, nor in Firefox. At first I got a 404 error: "Not Found. The requested URL / was not found on this server." [Below this message was a plain line, and below the line was another message.] "Apache/2.2 Server at

  • How can I stop all of my old emails from downloading to my new iphone?

    When I upgraded to iphone 4S a few years ago, hundreds and hundreds of old emails suddenly downloaded to my iphone, and I couldn't stop it. I can't remember how I resolved the problem then -- but it is happening again with my new iphone 6. My badge i

  • Transfer data in unix with tab-delimited

    Hi, How can we transfer data to unix with tab-delimited? I have incoming file with tab-delimited and want to copy as backup file in another folder in unix. When I read the incoming file, tab separator is translated into '#' so when I do transfer data