Populate Multiple Items bundled in a single query

Hello,
I am trying to create a report in which I have mulitple items that I want to populate. All of these use the same query but use different rows in the query to populate themselves. My question is:-
Is there a way to bundle the item assignment into a single query and populate the items from there? I want to reduce the time it takes for me to display the report and just hit the database once instead.

Hi there,
when u say report, i think its a more of a page showing few items on a region whose values are populated from Database rather than a SQL report which will not have any items. Is that correct?
yes, multiple items of a page can be assigned values at once.
assume: P1_ITEM1,P1_ITEM2,P1_ITEM3,P1_ITEM4 are different items on a page, an "On-Load Before Header" PL/SQL process can be created to assign values to the items in this way:
SELECT tab.col1,tab.col2,tab.col3,tab.col4 INTO :P1_ITEM1,:P1_ITEM2,:P1_ITEM3,:P1_ITEM4 FROM TABLE tab;
Item "Source Used" should be of type: Only When Current Value in session state is null
Source Type: PL/SQL Expression or function
and Source Value or EXpression should be some thing like this :P1_ITEM1
Hope this helps.
Edited by: Chaitu_Apex on Mar 10, 2010 2:43 PM

Similar Messages

  • Add Multiple Item in database on single click

    hi Friends,
    i have a problem :-
    i have a bill with multiple item eg . Apple (12), Banana (49), Badam (145) , Grapes(25) with there quantity and now i want to Add these item with quantity in my database
    when i finaly click on submit button .
    Actully I have been used tabular form but i am facing one problem when using tabular form ,in Tabular form i enter first item eg . Apple and there quantity eg. *12* in textfield and after click on Add Row Buttom entry went to the database . but i want Entry Shouldn't go in to the database. But only New Row Should Add there when i click on Add Row Button.
    I want all these 4 item should enter in to data base when i click on Final Submit.
    Manoj

    You have to study document [http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14303/advanc.htm#sthref2152] . Every case is other, you have to work hard : ). But it's good addition.
    Now I have no time, I will for 10 hours in forum, if you can't resolve your problem I will help you
    If I help you please grade HELPFUL or CORRECT: )
    Edited by: AndyPol on 2009-09-05 12:47

  • Multiple currency translation in one single query execution.

    Hi folks.
    I have today running in production, a report like:
    The user input a period and a version (multiple single values selecion)
    - Period
    - Version (0VERSION)
    And the report returt as follow
                                  2010        
              Version            A1         Q1
    Key Figure 1        500BRL     400BRL
    Key Figure 2        300BRL     200BRL
    Now, the user requires a currency translation based on the version selected in the filter. I mean, for version A* use one exchange rate type.
    For Q* version, use another exchange rate type...and so one...
    For instance, the solution is to create a currency translation type like:
    Exchange rate type from Var. and create this var as user exit with an abap that checks the version selected by the user in the
    report and than return the exchange rate type based on this version...
    This solution works only if the user input only one version in the filter. But, he needs to input three, four..versions and
    in one execution of the report, translate the currency using a exchange rate type for each version.
    Ex: Exchange Rate for version A1 (1.8USD = 1BRL) Exchange Rate for version Q1 (1.5USD = 1BRL)
    Then, the report should return:
                    2010        
            Version              A1         Q1
    Key Figure 1        277,7USD   266,6USD
    Key Figure 2        166USD     133,3USD
    I know it's a little complex to describe, but if someone know how to do it, I'll aprecciate.
    Best Regards,
    Thiago

    Can you explain your query KFs structure..
    Seems that in your report there is 1 KF for each version....but you have 1 input variable which holds multiple values ...If thats right..then how are you getting values for diff versions from 1 & same variable..
    No, there is one key figure for each document..
    for example,
    (doc/calday/version/sales revenue)
    DOC00001   01012011   0       100BRL
    DOC00002   01012011   A1    120BRL
    DOC00003   01012011   R1    110BRL
    In the report, the user can filter by one or more version, and based on wich version he selects, for each version we need to use a specific currency translation.
    The structure in the query is
    In Lines
    Sales Revenue
    In columns
    Calday / Version
    regards

  • Need to get data from multiple database instances in a single query

    Hi,
    I need a small favour from you guys. The prob is as follows:
    I need to get name, row_id from table A from schema 1 and gbu_name, name from table B from schema 2 where a.name = b.name. I wrote the query in the following manner:
    SELECT a.name, a.row_id, b.gbu_name
    FROM Schema1.A as a, Schema2.B as b
    Where a.name = b.name
    But this query is not working and the error is like " The table does not exists".
    Please update me how to avoid the error and get the right sort of result.
    Thanks & Regards,
    Debabrata

    Ah, youre actually asking different things.
    In your topic title, you say youre running separate instances
    In your body text, you say you are under different user/schema
    So tell me, do you have more than one database or not? How many entries in your TNS file?
    I would say, for "multiple database instances"
    SELECT
      a.id, b.id
    FROM
      tableA a
      INNER JOIN
      tableB@OTHER_DATABASE_LINK_NAME b  <--NOTE!
      USING(id)And of course you will have to look up CREATE PUBLIC DATABASE LINK sql..
    Message was edited by:
    charred

  • Multiple Item Codes in a MRP Generated PR

    Dear Sir,
    We have a requirement to have "Multiple Item Codes" in a single PR . The PR are generated thru MRP . The criterion  to have multiple Items in a single PR is that a PR will contain multiple Items codes pertaining to the same Material-Group .
    We have come to know that for this MD15 tcode can be used . But the problem with this is that there is manual effort required for clubbing of multiple Items in a single PR from the planned order .
    We look forward for some automatic way for handling the above requirement .
    Request you to kindly help me on the above issue please .
    Regrds
    B Mittal

    If you are getting Currency key from file then before passing data to BAPI, Check the value of Currency key, if it is not USD then display error message.

  • Submit multiple item without "Repeating table"

    Hi
    How can I do submit multiple item in list with single infopath form without repeating table?

    Create a workflow and create items with what ever information you want.
    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

  • Is it possible to query multiple items in a single OPC read?

    I am trying to read several data items at one time via OPC. Is this possible? If so, how? I have tried passing multiple URLs to specific items and a single URL header with multiple variable names. Both methods return an OPC error about invalid items. I am trying to do this to speed up OPC access times. Reading each item one-at-a-time is a little time consuming for our application.

    The only way to read multiple datapoints via OPC is to build an OPC item that contains multiple pieces of information. I checked this here, and I had no problem reading an array of data from an OPC Server with DataSocket.
    I read the "opc:/Matrikon.OPC.Simulation/Random.ArrayOfReal8" data item from a Matrikon OPC Simulation Server that publishes an array data item. The OPC Demo server is available for free download at http://www.matrikon.com/opc/htdocs/simx.htm. You can read this as an array of doubles in LabVIEW.
    For your application all you will need to read your data multiple items at a time is a server that can publish arrays.
    Hope this helps.

  • Multiple left outer join in single select query

    My client requires to apply multiple left outer join in single select query.
    Tell me how it is possible . tell me if we can use native sql query.

    HI vineet,
    Using multile left join is possible but it reduce performance as it takes a long time to retrieve data.
    The following code would help you in knowing how to use multiple left join
    REPORT  test.
    PARAMETERS:
      p_auart LIKE vbak-auart.
    DATA:
      BEGIN OF fs_sales,
        auart LIKE vbak-auart,
        vbeln LIKE vbak-vbeln,
        posnr LIKE vbap-posnr,
        matnr LIKE vbap-matnr,
        netwr LIKE vbap-netwr,
      END OF fs_sales,
      fs_temp LIKE fs_sales.
    DATA:
      t_sales LIKE STANDARD TABLE OF fs_sales.
    SELECT k~auart
           k~vbeln
           p~posnr
           p~matnr
           p~netwr
      INTO TABLE t_sales
      FROM vbak AS k
      OUTER JOIN vbap AS p
      ON k~vbeln = p~vbeln
    WHERE auart = p_auart
       AND p~netwr LT 1000.
    IF sy-subrc EQ 0.
      WRITE:/5 'Sales Document'(001),/,
            15 'Sales Document Item'(002),
            40 'Material Number'(003).
      sort t_sales by netwr ascending.
      LOOP AT t_sales INTO fs_sales.
        WRITE:/ fs_sales-vbeln under text-001.
        LOOP AT t_sales INTO fs_temp WHERE vbeln = fs_sales-vbeln.
          WRITE:/ fs_temp-posnr under text-002,
                  fs_temp-matnr under text-003.
        ENDLOOP.
      ENDLOOP.
    ELSE.
      MESSAGE 'No Record Found' TYPE 'I'.
    ENDIF.
    But i would suggest you to go with views instead of using multiple joins..
    Best of luck,
    Bhumika

  • Want to retrieve multiple XML fragments in CLOBs in a *single query*

    Hi,
    I am trying to retrieve some well formed XML fragments stored as CLOBs from an 8i DB. For a single fragment at a time this is not a problem using <xsql:include-xml>. However, I am trying to retrieve multiple well formed fragments in a single query, "stacked" like so...
    <xsql:include-xml>
    <![CDATA[
    select theXMLFrag from tclob1 where id = 'open'
    union all
    select theXMLFrag from tclob2 --returns multiple rows
    union all
    select theXMLFrag from tclob3 --some more rows
    union all
    select theXMLFrag from tclob1 where id = 'close'
    ]]>
    </xsql:include-xml>
    What I am really after are the contents from the middle two selects. (The 'open' and 'close' bit was just a cheap attempt to ensure that the included XML is well formed.) Though it is not shown in my example, the problem is that the number and source of the CLOB fragments is not known until run time, and I wanted to use a dynamic query to assemble the needed CLOBS...
    I have since learned that <xsql:include-xml> returns the first column of the first row of the query result as parsed XML, either from a CLOB or a VARCHAR containing well-formed XML. So my attempt is no good... all but the first row are ignored.
    Does anyone have any suggestions for a way to do this using the existing xsql tag library? Or will I need to create my own <xsql:action>?
    Thanks,
    Bob Nugent

    Hi,
    Let me correct if i am right:
    - Central Contract -> new concept of SRM 7.0. 1 contract which is visible and usable from ECC and SRM as well. (not available in SRM 5.0 - agree)
    - GOA -> it exist in SRM 5.0 for sure! (we are currenlty using it for ECC procurement).
    The solution what you are mentioned is good...but as you said only for SRM 70...we are in SRM 5.0 and we need solution for here. Do you have any idea?
    Currently i am thinking about a new solution based on "standard" functionalities: if a GOA need to be created for mulitple company, it has to be populated in Header distribution (all company will have the same contract header). It item detail all the required information need to be poupulate in SRM (i.e.: item 1 for p.org1/comp.cod1; item 2 for p.org2/comp.cod2).
    When this is done, the BADI need to check the informatoin in SRM GOA and create contract according to that -> in this case 1GOA is created, but the 2 items for totally different p.org/comp.code, the BADI needs to create 2 different contract in ECC (i would like to avoid using reference purchasing organization in ECC!
    Thanks in advance!
    Best Regards,
    Attila

  • Updating multiple node in a single query

    Hi
    Shall I update multiple nodes (which satisfies the given condition) in a single query? From the prototype we suspect that all nodes in all document are not updated in the container.
    Version: BDB XML 2.4 - Fedora core 4 Linux - C++ language
    Query:
    replace value of node collection()/File[@Id="57565C01327A"]//Entry[@Class="Measurement" and @Id="0"]/Attribute[@Name="apDlBhUtil"]/@Value with 8'
    Result:
    XmlException occurred with msg 'Error: Sequence does not match type node() - the sequence contains more than one item [err:XUTY0008], <query>:1:1'
    We have tried running the query in both Lazy and Eager evaluation type. Please clarify that the issue is with the query/execution type or BDB XML doesn't support this feature?
    Thanks
    Santhosh

    Santhosh,
    Try:
    for $i in collection()/File[@Id="57565C01327A"]//Entry[@Class="Measurement" and @Id="0"]/Attribute[@Name="apDlBhUtil"]/@Value return replace value of node $i with 8'The problem with your original is that the argument for "replace value of" needs to be a single item, not a sequence.
    Regards,
    George

  • How to use multiple hierarchies for a single char in single query

    Hi,
    Is there any way that we can use multiple hierarchies for a single char in single query. I tried and it just allows me to select one hierarchy even if I use hierarchy variable.
    I have a requirement where user wants to see information related to a cost center with different cost center groups in different hierarchies (every year has different cost center group hierarchies).
    Suppose I want to see information related to a cost center from year 2001-2004.in these four year cost center may have been associated to different groups depending upon that year hierarchy. How can I do that?
    Thanks
    Jona

    Nope. Now way to do this.
    There is always just one hierarchy assigned to a characteristic. And even if the hierarchy was time dependent, it only reads it for one key date and not according to transaction data.
    Regards,
    Beat

  • Multiple databases in a single query

    I need to query multiple databases in a single query.
    e.g.
    Database d1 contains table t1 with column id
    Database d2 contains table t2 with column id
    I need a query like
    SELECT * FROM t1, t2 WHERE t1.id = t2.id;
    is this possible in jdbc? if yes can anyone help with some sample code?
    thanks,
    Ashish Saraf

    It is not possible using the JDBC API to query tables in two or more databases using a single query. The reason is that a JDBC Connection is made to a single data source.
    However, some databases support the idea of federations or linked tables. What you do is inside the database manager link or federate a table that is present in another DBMS. Then, pose a single JDBC query to the one DBMS which will have its own table and links to the external tables.
    Another approach is to use a special JDBC driver with a built-in integration engine that will perform a query across multiple databases. In effect, the system poses separate queries to the different databases and integrates and joins the data together for you automatically on the client-side. That is much easier than doing it yourself in code, but that is also possible for simple queries.
    As part of my research program, we have released a shareware version of the UnityJDBC driver that can query multiple databases using a single SQL query. For more information, see:
    http://www.unityjdbc.com
    http://www.cs.uiowa.edu/~rlawrenc/research/projects.html
    Sincerely,
    Dr. Ramon Lawrence
    Assistant Professor
    Department of Computer Science
    University of Iowa
    [email protected]

  • How to calculate the individual sums of multiple columns in a single query

    Hello,
    Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
    Will appreciate any help or suggestion.
    Thanks

    user13667036 wrote:
    Hello,
    Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
    Will appreciate any help or suggestion.
    ThanksLooks like you want a simple group by.
    select
              yr
         ,      mnth
         ,      region
         ,     sum(handled_package)
         ,     sum(expected_missing_package)
         ,     sum(actual_missing_package)
    from test
    group by
         yr, mnth, region
    order by      
         yr, mnth, region;I wouldn't recommend storing your data for year / month in 2 columns like that unless you have a really good reason. I would store it as a date column and add a check constraint to ensure that the date is always the first of the month, then format it out as you wish to the client.
    CREATE TABLE test
         year_month                              date,
        Region                     VARCHAR2(50),
        CITY                       VARCHAR2(50),             
        Handled_Package            NUMBER,       
        Expected_Missing_Package   NUMBER,   
        Actual_Missing_Package     NUMBER
    alter table test add constraint firs_of_month check (year_month = trunc(year_month, 'mm'));
    ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
      2  Values (to_date('2012-nov-12', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
    Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
    ERROR at line 1:
    ORA-02290: check constraint (TUBBY.FIRS_OF_MONTH) violated
    Elapsed: 00:00:00.03
    ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
      2  Values (to_date('2012-nov-01', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
    1 row created.
    Elapsed: 00:00:00.01
    ME_XE?select
      2        to_char(year_month, 'fmYYYY')    as year
      3     ,  to_char(year_month, 'fmMonth')   as month
      4     ,  Region
      5     ,  CITY
      6     ,  Handled_Package
      7     ,  Expected_Missing_Package
      8     ,  Actual_Missing_Package
      9  from test;
    YEAR         MONTH                REGION                         CITY                    HANDLED_PACKAGE EXPECTED_MISSING_PACKAGE ACTUAL_MISSING_PACKAGE
    2012         November             Western                        San Fransisco                       200                       10                      5
    1 row selected.
    Elapsed: 00:00:00.01
    ME_XE?Then you have nice a nice and easy validation that ensures you data integrity.
    Cheers,

  • How to insert multiple records in a single query

    Dear all,
    Can you please tell
    how to insert multiple records in a single query ??

    INSERT INTO table_name (column_1, column_2) VALUES ('value_A', 'value_B')OR
    INSERT INTO table_name
    (column_1, column_2)
    SELECT 'value_A', 'value_B' FROM DUAL
    UNION ALL
    SELECT 'value_C', 'value_D' FROM DUAL
    ;Edited by: Benton on Nov 9, 2010 1:59 PM

  • MRP - Single Purchase requisition for multiple Items

    Hi
    We have recently introduced MRP module in SAP .In some specific scaeanrios , we want to create a single Purchase Requisition for multiple items .Standard SAP generate different Purchase requisition for each item
    Is there any way out

    Sandeep,
    This topic has been covered numerous times in this forum and in the MM forum.  You evidently have not used the search feature.  There are thousands of posts in these forums, and the search function will be very helpful for you in future questions.
    To answer your question, No, nothing is available to make standard SAP MRP create Purchase requisitions for multiple items.
    Most companies address this issue during the conversion of Purchase Requisitions to Purchase orders.  During this process, you can add many items to a single purchase order.
    Rgds,
    DB49

Maybe you are looking for

  • Exceeding 500 log messages per second......!

    I get the following message thousands of times in my system log, and it's really slowing my machine down - Sep 2 11:16:50 kelvin-wards-imac-139 sandboxd[1812]: mDNSResponder(20) deny file-read-data /private/var/db/com.apple.parentalcontrols.keychain.

  • Damaged system icons, how do I restore them?

    I recently bought a new MacBook Pro Retina display and have been installing applications and copying over old files to start with a fresh system. I think I may have tweaked the default system icons because they look a little wierd: I have been playin

  • FreeHand MX won't launch: OS 10.4.10

    Expanding on the previous thread, I created a new account on my Mac (which presumably offers a clean sheet for FreeHand to run on). I pulled the fonts folder out of Macintosh HD > Library leaving only the system fonts in place After about 50 bounces

  • I can not sign in to my account

    Hello, my name is Tinli San! Just now  I create Apple ID but it won't let me to sign in. It says You have not verified your account. Please help me

  • Existing Photoshop CS6 Customer. Signed up for Cloud

    I signed up for the cloud program today on my notebook. I'm now trying to use from my desktop. I'm only seeing a "try" or "buy" option. What should I do? Payment has processed through my creditcard. Logged in with my email and password. Lost. Help!