How to build a query based on(UNION) 3 vendor InfoObject

Dear Experts:
I have a requirement to build one query based on 3 vendor InfoObjct: 0VENDOR + 0VEN_COMPC + 0VEN_PURORG.
I tried to build a multiprovider upon these 3 infoobjects, but when I Identify(Assign) the key for each InfoObject, supposely there should be 3 InfoObject for me to check (0VENDOR, 0VEN_COMPC and 0VEN_PURORG) so that I can UNION these 3 infoobjects together on vendor number. But since the reference infoobject of these 3 vendor master data is different, I can not check the 3 together.
Can anybody let me know how to build that query? I only need vendor number show once, and the attributes of 0VEN_COMPC and 0VEN_PURORG can be union to 0vENDOR.
Any post would be appreciated and thank you all in advance!
Best Regards!
Tim

Hi,
you can create a link between the vendor objects itself, means link 0vendor with 0ven_compc and 0ven_purorg. This should give you a list of all vendors multiplied with the comp codes multiplied with the purch. org. May be here it is possible to create another link between a attribute (eg. comp_code of 0ven_purorg with comp_code of 0ven_compc). In case it is not possible you need to add this link information somehow. Another option might be to create 2 queries. One on a infoset of 0vendor and 0ven_purorg and another one on 0vendor and 0ven_compc.
regards
Siggi

Similar Messages

  • How to build a query dynamically....

    hi...i want to build a query dynamically. i don't want to build query by using string buffer. i want to create it directly by using sql query itself.
    my situation is like this....i have four drop down list in a page. The user can search the things based on one or two or three or four selected values.
    how to build a query for this kind of situation....pls let me know.
    Edited by: success_shiva6mca on Mar 3, 2008 12:39 PM

    there are two problems with building sql directly.
    1. it allows sql injection
    2.it allows XSS
    google them and you will understand if you dont already.
    I will recoment catching the values and using preparedStatements

  • How to build a query to join on two tables without mapping

    I did Automatic mapping by the workbench Directofield mapping with the table and java object.
    Wanted to build a simple join query by joining on the same field on both the tables.Not the sql query through the toplink using expression builder.
    Please help.............
    Spent one full day for this................

    Thanks Don for the reply,sorry to bug you,but i need help.....
    SELECT A.AGNCY_C,
         A.TYPE_C,
         A.RESN_C,
         A.S_TYPE_C,
         A.SUB_ID_C,
         A.RY_C
    FROM RATING A, REF B
    WHERE A.ID_C = B._ID_C
    AND A.ALPHA_C = B.ALPHA_C
    AND A.EFF_D >= B.MATURITY_D
    This is the real query i was talking about.I did mapping automatically through the workbench,generated java classes also throught the workbench.
    Now they don't want to execute the raw sql.They wanted to get all the RATING objects with the where condition.
    So how to build a query by using toplink.
    tried your example
    ExpressionBuilder builder = new ExpressionBuilder();
    Expression creditRating = builder.getTable("RATING").getField("ID_C");
    Expression issue_ref = builder.getTable("REF").getField("ID_C");
    Expression join = creditRating.equal(issue_ref);
    I am getting java.lang.OutOfMemoryError
    error.
    I selected the option generate classes and descriptors
    from the tables (RATING,REF).,so it created the classes and dscriptors automatically.
    In Database script for the table RATING like this
    ALTER TABLE RATING ADD (
    CONSTRAINT RATING_F1 FOREIGN KEY (ID_C, ALPHA_C)
    REFERENCES REF (ID_C,ALPHA_C));
    I think when i generate descriptor automatically it is keeping this association.
    Please help me.........

  • How to build sql query for view object at run time

    Hi,
    I have a LOV on my form that is created from a view object.
    View object is read-only and is created from a SQL query.
    SQL query consists of few input parameters and table joins.
    My scenario is such that if input parameters are passed, i have to join extra tables, otherwise, only one table can fetch the results I need.
    Can anyone please suggest, how I can solve this? I want to build the query for view object at run time based on the values passed to input parameters.
    Thanks
    Srikanth Addanki

    As I understand you want to change the query at run time.
    If this is what you want, you can use setQuery Method then use executeQuery.
    http://download.oracle.com/docs/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#setQuery_java_lang_String_

  • How to increase performanceof query based on Infoset?

    How to increase the performance of a query based on a Infoset?
    As per designing of query, all the necessary fields are placed where they are required.

    Hi  Akshara ,
    To improve performanceof query try to remove unnecessary characteristics, attributes, or key figures ,Superfluous conditions or variables .Large InfoCubes and Complex hierarchies .Variables populated by user exits
    For characteristics specify either variables or restrictions .
    You can create indexes on DSO and Aggregates on cubes (if any).
    Please go through the links :
    http://help.sap.com/saphelp_crm40/helpdata/en/77/4a213cc534f20ae10000000a11402f/content.htm
    Re: Performance of query built on infoset
    Query performance issue - Infoset query
    Hope you will find this helpful.
    Regards,
    Jaya

  • How to Broadcast Control Query based on User Exit Variable

    Hi Gurus,
    How to Broadcast dashboard based on Control Query based on User Exit
    Variable to different users via mail in BW 3.5 version. Any document or
    steps to achieve this will be very helpful.
    Regards
    Vishwanath

    Hi Surendra,
    Thanks for the reply and your suggestion. It will be great if you can help me to answer the below:
    1) What exactly we mean by Control Query - Any example will be very helpful
    2) As you mentioned, yes the user exist to be written will be for user-exit variable for dynamic period selection - An Example on how to create this will be helpful
    3) Once the above variable is created, what are the steps to include this variable in the Bex Query?
    4) Once all the queries to be used in dashboard are implemented with the exit variable, how to create a variant to be used in Broadcasting?
    5) How and where to configure the email recipients (to whom this dashboard will be sent via mail)?
    6) How to set up the BW broadcaster in BW 3.5 using the control query ?( My question is though we have to send the dashboard to the users, which has multiple queries, how a single control query with variant will help us).
    Awaiting your reply.
    Thanks and Regards
    Vishwanath

  • How to build a query to get the item properties is tick or not?

    hello everybody. i'm 1 of the sap b1 user. i face a problem in build a query to check one of the item properties is tick or not? pls help...

    Hi Grace,
    your query could look like this:
    Select itemcode from oitm where qrygroup1= "Y"
    qrygroup1 is item property 1, qrygroup2 is item property 2 etc.
    Regards
    Ad

  • How to - Build a report based on dynamic query

    I am using this how to and find out that there is an syntax error on this example, where the and should be where. I got an SQL parsing error when I followed this example until I debugged with the debug while on this page. Has any one using this how to and have the same problem?
    if :p600_show != 'ALL' then
    q:=q||'and p.category = :p600_show';
    end if;
    declare
    q varchar2(4000);
    begin
    q:=' select p.category, ';
    q:=q||' p.product_name, ';
    q:=q||' i.quantity, ';
    q:=q||' i.unit_price ';
    q:=q||' from demo_product_info p, ';
    q:=q||' demo_order_items i ';
    q:=q||' where p.product_id = i.product_id ';
    if :p600_show != 'ALL' then
    q:=q||'and p.category = :p600_show';
    end if;
    return q;
    end;

    [regarding bind variables]
    Well, from what I saw in
    http://www.oracle.com/technology/products/database/htmldb/howtos/dynamic_report-1.6.htm
    the dynamic SQL is constructed by doing concatenation of user input and SQL keywords
    'select col1,col2 from table where co1='||:P1_COL1
    So, this is going to flood the shared pool with unique SQL statements with different values of :P1_COL1 and also subject to SQL injection, isnt it? You obviously disagree and I am happy to be proven wrong, please do so?
    To avoid having to deal with SQL parsing errors, you
    could put a condition on the region so that it
    doesn't render (parse) whenever any elements of
    session state are not sufficiently populated to allow
    the formation of a valid SQL query that would be
    parseable without errors.Thats exactly what I want to do, but didnt know what condition that would be? I didnt see any condition saying "Session state not initialized" or something like that.
    Thanks

  • How to build dynamic query strings in the query using DB adapter 'Pure SQL'

    Dear Forum,
    I am building an application which will access DB to fetch some result set. The query involves retrieving data from multiple tables(nearly 10 tables). So I have created a DB adapter using 'execute pure sql' option. With this query works fine, but my inputs parameters will vary. So I need to make my query dynamic to append the query strings at runtime depending on the inputs.
    For example I have 3 input variables - input1,input2 and input3 (in my request xsd) which are used in the pure sql query. Now if I get a 4th input parameter input4 in the request, I need to append this to query string as 'AND input4=[some value]' at runtime. Otherwise my query should have only 3 parameters. Please suggest how this can be achieved.
    Regards,
    Satya.

    This is a strange requirement, depending on the columns you have and what are optional in them, one way is to have separate operations and each opeartion will have different inputs and for each operation , a different DB Adapter is called. But this way, it results in more number of operations for the service as well as more number of references in the composite. Even if you pass the column inputs to the SQL procedure, it will result in a large number of if-else cases..
    Thanks,
    N

  • Build Dynamic Query based on values of multiselect list

    I am trying to implement the same functionality as shown in this app.
    http://htmldb.oracle.com/pls/otn/f?p=9741:6:13406902443304236283:::::
    I have hit a brick wall when I try to set the value of my text area/select statement, even after viewing the detail section in above app.
    Does anybody know exactly how I can set the value of a text area from multiselect list values??

    Hi Sam,
    check out How to use multi select in a query report
    See also Denes sample application which has and example where you can still do an index access if a index is defined for the column. http://htmldb.oracle.com/pls/otn/f?p=31517:138
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

  • How to create collection (query) based on report results?

    Hello everyone,
    I have the following report;
    I would like to create a collection based on the "Non Compliant" and the "Unable to find compatible TPM" so I can re-deploy with right-click tools.
    If the above is NOT the solution to create a group for redeployment. How would I address this?
    Thank you in advance for any help.

    Unfortunately, there is no straight-forward answer here. ConfigMgr console queries use WQL and only have visibility to a subset of the complete information in the database. Most things you are probably interested in creating queries from are probably visible,
    but that's not guaranteed. Additionally, they are named slightly differently also so it really just takes some trial and error and personal investigation to see what is there and what isn't. The place to start is to open the root\sms\site_<sitecode>namespace
    on the system hosting the SMS provider. The public reference for most of the classes is at
    http://msdn.microsoft.com/en-us/library/hh948405.aspx . These all directly map to data in the database but as mentioned, not all views in the DB have a corresponding WMI class.
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • How to build this query with the minumum number of sub-selects?

    The question I am trying to answer is analogous to this:
    Give me all projects that: (have no employees assigned and are small) or (have only employees with the the last name = "Smith")
    Thanks,
    Roman

    Thank you :
    1- I am in 9.0.4.8 version and can not use allOf expression (availible in beta version)
    2- I not find .notIn(subQuery) operator in 9.0.4.8 version and i replace it by .in(subQuery).not() !
    My new query retrieve Customer who have 0 (zéro) Orders !
    How to retrieve only customer (with orders + with orders without "television") ?
    My new query is :
    <div align="left" class="java">
    <font color="#7f0055"><b>static </b></font><font color="#7f0055"><b>void </b></font><font color="#000000">findCustNoComputer </font><font color="#000000">(){</font>
    <font color="#ffffff">   </font><font color="#000000">ClientSession cs = TopLinkSession.acquireClientSession</font><font color="#000000">()</font><font color="#000000">;</font>
    <font color="#ffffff"></font>
    <font color="#ffffff"></font>
    <font color="#ffffff">  </font><font color="#000000">ReadAllQuery query = </font><font color="#7f0055"><b>new </b></font><font color="#000000">ReadAllQuery</font><font color="#000000">(</font><font color="#000000">Customer.</font><font color="#7f0055"><b>class</b></font><font color="#000000">)</font><font color="#000000">;</font>
    <font color="#ffffff">  </font><font color="#000000">ExpressionBuilder queryBuilder = query.getExpressionBuilder</font><font color="#000000">()</font><font color="#000000">;</font>
    <font color="#ffffff"></font>
    <font color="#ffffff">  </font><font color="#000000">ExpressionBuilder subqueryBuilder = </font><font color="#7f0055"><b>new </b></font><font color="#000000">ExpressionBuilder</font><font color="#000000">(</font><font color="#000000">Customer.</font><font color="#7f0055"><b>class</b></font><font color="#000000">)</font><font color="#000000">;</font>
    <font color="#ffffff">  </font><font color="#000000">ReportQuery subQuery = </font><font color="#7f0055"><b>new </b></font><font color="#000000">ReportQuery</font><font color="#000000">(</font><font color="#000000">Customer.class, subqueryBuilder</font><font color="#000000">)</font><font color="#000000">;</font>
    <font color="#ffffff">  </font><font color="#000000">subQuery.addAttribute</font><font color="#000000">(</font><font color="#2a00ff">&#34;id&#34;</font><font color="#000000">)</font><font color="#000000">;</font>
    <font color="#ffffff">  </font><font color="#000000">subQuery.setSelectionCriteria</font><font color="#000000">(</font><font color="#000000">subqueryBuilder.anyOf</font><font color="#000000">(</font><font color="#2a00ff">&#34;Orders&#34;</font><font color="#000000">)</font><font color="#000000">.anyOf</font><font color="#000000">(</font><font color="#2a00ff">&#34;OrderItems&#34;</font><font color="#000000">)</font><font color="#000000">.get</font><font color="#000000">(</font><font color="#2a00ff">&#34;product&#34;</font><font color="#000000">)</font><font color="#000000">.get</font><font color="#000000">(</font><font color="#2a00ff">&#34;productName&#34;</font><font color="#000000">)</font><font color="#000000">.equal</font><font color="#000000">(</font><font color="#2a00ff">&#34;Computer&#34;</font><font color="#000000">))</font><font color="#000000">;</font>
    <font color="#ffffff">  </font><font color="#000000">query.setSelectionCriteria</font><font color="#000000">(</font><font color="#000000">queryBuilder.get</font><font color="#000000">(</font><font color="#2a00ff">&#34;id&#34;</font><font color="#000000">)</font><font color="#000000">.in</font><font color="#000000">(</font><font color="#000000">subQuery</font><font color="#000000">)</font><font color="#000000">.not</font><font color="#000000">())</font><font color="#000000">;</font>
    <font color="#ffffff"></font>
    <font color="#ffffff">   </font><font color="#000000">Vector allCustomers = </font><font color="#000000">(</font><font color="#000000">Vector</font><font color="#000000">)</font><font color="#000000">cs.executeQuery</font><font color="#000000">(</font><font color="#000000">query</font><font color="#000000">)</font><font color="#000000">;</font>
    <font color="#ffffff">   </font><font color="#000000">Iterator allCustomersIterator = allCustomers.iterator</font><font color="#000000">()</font><font color="#000000">;</font>
    <font color="#ffffff">   </font><font color="#7f0055"><b>while </b></font><font color="#000000">(</font><font color="#000000">allCustomersIterator.hasNext</font><font color="#000000">()) </font>
    <font color="#ffffff">   </font><font color="#000000">{</font>
    <font color="#ffffff">     </font><font color="#000000">Customer tempCustomer = </font><font color="#000000">(</font><font color="#000000">Customer</font><font color="#000000">)</font><font color="#000000">allCustomersIterator.next</font><font color="#000000">()</font><font color="#000000">;</font>
    <font color="#ffffff">        </font><font color="#000000">System.out.println</font><font color="#000000">(</font><font color="#000000">tempCustomer</font><font color="#000000">)</font><font color="#000000">;</font>
    <font color="#ffffff">   </font><font color="#000000">}</font>
    <font color="#ffffff">   </font><font color="#000000">cs.release</font><font color="#000000">()</font><font color="#000000">;</font>
    <font color="#000000">}</font>
    <font color="#ffffff"></font>
    <font color="#ffffff"></font>
    Sql of query :
    SELECT
         t0.CUST_LAST_NAME, t0.CUST_FIRST_NAME, t0.CREDIT_LIMIT, t0.CUST_EMAIL, t0.CUSTOMER_ID, t0.PHONE_NUMBER2, t0.PHONE_NUMBER1, t0.CUST_STREET_ADDRESS1, t0.CUST_CITY, t0.CUST_STREET_ADDRESS2, t0.CUST_STATE, t0.CUST_POSTAL_CODE
    FROM TL_CUSTOMER t0
    WHERE NOT (
         (t0.CUSTOMER_ID IN
              (SELECT DISTINCT t1.CUSTOMER_ID
              FROM TL_CUSTOMER_ORDER t4, TL_ORDER_ITEM t3, TL_PRODUCT t2, TL_CUSTOMER t1
              WHERE (
                   (t2.PRODUCT_NAME = ?) AND
                   ((t2.PRODUCT_ID = t3.PRODUCT_ID) AND
                        ((t3.ORDER_ID = t4.ORDER_ID) AND (t4.CUSTOMER_ID = t1.CUSTOMER_ID)))))))
    Regards

  • How to build MDX query for two periods of time?

    I have the following MDX:
    SELECT NON EMPTY
    [Measures].[Returns],
    [Measures].[Returns]
    ON COLUMNS,
    NON EMPTY
    ([Employees].[Company].[Company].ALLMEMBERS )
    DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
    FROM
    SELECT
    STRTOSET("[Exec Date].[Hierarchy].[Month Num].&[2014]&[1]", CONSTRAINED)
    ) ON COLUMNS FROM [cbSales]
    WHERE
    IIF(
    STRTOSET("[Exec Date].[Hierarchy].[Month Num].&[2014]&[1]", CONSTRAINED).Count = 1,
    STRTOSET("[Exec Date].[Hierarchy].[Month Num].&[2014]&[1]", CONSTRAINED),
    [Exec Date].[Hierarchy].currentmember
    Both columns shows returned data for month 2014/01
    I want to have data for the next month (2014/02) in the second column.
    How can I change the query to achieve my goal.

    Hi,
    To achieve this you need to create another measure with the help of ParallelPeriod function. Check the following example;
    WITH MEMBER [Measures].[Sales Amount Current] AS [Measures].[Sales Amount]
    MEMBER [Measures].[Sales Amount Next] AS ([Measures].[Sales Amount], PARALLELPERIOD([Date].[Calendar].[Month],-1, [Date].[Calendar].CURRENTMEMBER)), format_string = "Currency"
    MEMBER [Measures].[Current Month] AS [Date].[Calendar].CURRENTMEMBER.Member_Caption
    MEMBER [Measures].[Next Month] AS PARALLELPERIOD([Date].[Calendar].[Month],-1, [Date].[Calendar].CURRENTMEMBER).Member_Caption
    SELECT {[Measures].[Current Month], [Measures].[Sales Amount Current], [Measures].[Next Month], [Measures].[Sales Amount Next]} ON COLUMNS,
    {[Product].[Category].[Category].MEMBERS} ON ROWS
    FROM [Adventure Works]
    WHERE [Date].[Calendar].[Month].&[2007]&[10]
    For ParallelPeriod specify -1 for "Numeric Expression" to navigate forward of the date hierarchy.
    Best regards,
    Chandima
    Thanks, nice answer

  • How to build a collection based on the installed definition update version

    Well I would like to know how to crate the collection of those clients are only installed the definition update? for example, KB2461484
    or
    Definition Update for Microsoft Endpoint Protection -KB2461484 (Definition 1.169.2635.0)"

    thaks Sherry. I got the query:
    Query1: via KB title
    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner
    join SMS_G_System_PatchStatusEx on SMS_G_System_PatchStatusEx.ResourceId = SMS_R_System.ResourceId where SMS_G_System_PatchStatusEx.Title  =
    "Definition Update for Microsoft Endpoint Protection - KB2461484 (Definition 1.169.2635.0)" and LastStateName =
    "Install Verified"
    Query2: via KB number
    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner
    join SMS_G_System_PatchStatusEx on SMS_G_System_PatchStatusEx.ResourceId = SMS_R_System.ResourceId where SMS_G_System_PatchStatusEx. QNumbers   = =
    "2461484" and LastStateName =
    "Install Verified"

  • How to build an array based on inputs from a text file

    Hi
    I have ta text file that has the following format. The apmlitude is the first value then I have the start index number and last index number
    Other index values in between should be zero
    (amplitide, start index number, end index number)
    2, 2 ,3
    4, 6, 7
    5, 10,11
    using this format I should make the foloowing array
    0,0,2,2,0,0,4,4,0,0,5,5
    Could you please help me to implement it in LabVIEW
    Thanks

    A few notes:
    - You'll want to use the Initialize Array function for 1) and 3) (if this is, in fact, how you want to do this.)  This function takes two inputs when initializing a 1D array- element value and array size.   
    - Change the polymorphic instance of Read From Spreadsheet File.vi to "Double" or "Integer"- there's no reason to read in these numeric values as strings and convert them later.
    - Will the text file always contain 12 elements worth of data?  If not, you'll need to change your logic for the number of elements to initialize.
    As Altenbach said, this seems a lot like a basic logic/homework problem.  My suggestion was only that-a suggestion.  It is not the only way to do this. Figure out a sequence of steps to get you from point A to point B before you jump in and start coding. 
    Regards,
    Tom L.

Maybe you are looking for