Dynamically create Datatable result from user defined query

I have seen some close solutions, but not 100% for the following:
1. JSF Datatable exists in JSP, but no columns defined
2. Execute query and populate results to JSF with headings and data
3. Binding this data to the Datatable
I have managed to created column headers (facets) but can't identify how to populate the rows based on the resultset. If one does not have a resultset but rather a collection of domain objects, how does one bind the table to the displayable objects (domain) ?
Thanks to the gifted one who leads me to enlightenment !
-- The grass may be greener, but I'm looking for a maintenance free lawn.

Hello,
Congrats !!! you mamnaged to solve the problem.
Please can you let me know how did u solve the problem as I'm also facing the same problem..
Also another request Please can you let me know if there if any kind of good documentaion on jsf components as well as some examples.
I'm using MyEclipse4.1
Thanks for any help
abhi

Similar Messages

  • PLD report from user defined query

    Hello experts,
    Is possible to create a new PLD report from a user defined query ?
    Thanks in advance.
    Best regards
    Andrea

    Hi,
    It is possible on Query Print Layout Design(QPLD) so Try to create QPLD.
    Check this link u can get presentation slide form SAP.
    [Query Pld from SAP site]
    First you can try to create the Query report with UDF filed.
    for example,
    SELECT T0.DocNum, T0.DocDate, T0.CardName, T0.CheckSum, T0.U_UDF1, T0.U_UDF2, T0.U_UDF3
    FROM OVPM T0 WHERE T0.DocNum>='%0' and T0.DocNum<='%1' ORDER BY T0.DocNum
    Steps to Develop a User Report in QPLD:-
    If you save your Query in Query Manager. Next you can do this,
    ->> Choose the Query Manager on Top Menu.
    ->> Open the Qeury Manager Window.
    ->> Select the specific Query report. and
    ->> Click the Create Report button in Bottom on Qeury Manager Window.
    ->> then, Open the Create User Report Window and Select the User Report(System) in Base Template.
    If you Change the QPLD name.
    ->> Click OK.
    ->> (or) If your Query Report have parameter. Click OK.
    Now your Query report was Created QPLD.
    Note: All SELECT statement fields will be Stored and Display in Repetetive Area1. and
    Parameter Fields are in Repetetive Area0 so you can Try to Copy & Paste the Field_ID's to Repetetive Area Header (or) Repetetive Area Footer.
    Example:
    ->> Open the QPLD and Goto Field index Window, then
    ->> Select the Repetetive Area Header & Repetetive Area Footer ncrease the Height on Properties Window.
    ->> Create the Formula fields in Repetetive Area Header & Repetetive Area Footer.
    ->> Which Field you want to print in header or footer. Drag the Field ID(in Repetetive Area) Copy & Paste to Formula Field.
    Can you see to your Query PLD? do this,
    ->> Choose the Tools on Top Menu.
    ->> Click the Queries. -> Query Print Layout...
    ->> Open the Query Print Layout Window.
    ->> Click Reports Tab and Double the Template (Requrie QPLD) on QPLD Window.
    ->> Customize and Save the QPLD.
    Can you see your Query PLD Preveiw and Print? do this,
    ->> Choose the Tools on Top Menu.
    ->> Click the Queries. -> Query Print Layout...
    ->> Open the Query Print Layout Window.
    ->> Select Template in Report Tab on QPLD Window.
    ->> Click Print Preview on Top menu.
    Close this thread if issue solved
    Regards,
    Madhan.

  • Prevent user defined query from being activated with the CopyTo function

    Hi, I have a user defined query defined in one of the quantity field (in the grid) in the goods receipt PO window.
    The query updates the quantity depending on the number of another line field. The query works great, but I dont want it to be activated when a user clicks the "Copy From" purchase order. When this happens the query gets activated and changes the quantity.
    The query is defined to be activated "when exiting altered column", i have not selected the "Refresh Regulary"
    Please help!

    Thank you so much for replying,
    this is my query, depending on the column U_Empaque (type of package), I look for the right conversion in the OITM table of the item. Then I use the number from the column U_Cantidad_Empaque (Quantity Of the Type of package) to multiply by the conversion factor that I have defined for the Item in the OITM user fields. The conversion is a standard conversion, so It needs to be modified by the user to set it to the real quantity of the unit of measure (or unit of inventory). The query works great, except for the CopyTo and CopyFrom functions.
    Iam using 2007 A patch 45.
    México's settings.
    SELECT
    CASE
    WHEN (SELECT 'TRUE' FROM OITM T0 WHERE T0.ITEMCODE = $[$38.1.0] AND T0.U_EMPAQUE1 = $[$38.U_Empaque.0]) = 'True' THEN (SELECT ($[$38.U_Cantidad_Empaque.0]) * T1.U_CONVERSION1 AS 'Respuesta' FROM OITM T1 WHERE T1.ITEMCODE = $[$38.1.0] AND T1.U_EMPAQUE1 = $[$38.U_Empaque.0])
    WHEN (SELECT 'TRUE' FROM OITM T0 WHERE T0.ITEMCODE = $[$38.1.0] AND T0.U_EMPAQUE2 = $[$38.U_Empaque.0]) = 'True' THEN (SELECT ($[$38.U_Cantidad_Empaque.0]) * T1.U_CONVERSION2 AS 'Respuesta' FROM OITM T1 WHERE T1.ITEMCODE = $[$38.1.0] AND T1.U_EMPAQUE2 = $[$38.U_Empaque.0])
    WHEN (SELECT 'TRUE' FROM OITM T0 WHERE T0.ITEMCODE = $[$38.1.0] AND T0.U_EMPAQUE3 = $[$38.U_Empaque.0]) = 'True' THEN (SELECT ($[$38.U_Cantidad_Empaque.0]) * T1.U_CONVERSION3 AS 'Respuesta' FROM OITM T1 WHERE T1.ITEMCODE = $[$38.1.0] AND T1.U_EMPAQUE3 = $[$38.U_Empaque.0])
    WHEN (SELECT 'TRUE' FROM OITM T0 WHERE T0.ITEMCODE = $[$38.1.0] AND T0.U_EMPAQUE4 = $[$38.U_Empaque.0]) = 'True' THEN (SELECT ($[$38.U_Cantidad_Empaque.0]) * T1.U_CONVERSION4 AS 'Respuesta' FROM OITM T1 WHERE T1.ITEMCODE = $[$38.1.0] AND T1.U_EMPAQUE4 = $[$38.U_Empaque.0])
    END

  • Hide our user defined query

    Dear All Master Brains,
    It is possible to hide our user defined query in Query Manager, apart from our user authorization.
    I am waiting for your …………..
    Regards,
    Team work never fails.

    Hi,
    Only by authorizations you can hide the user queries.
    Alternate way, If you have created those query for report purpose then you convert that query into QPLD, So that users cannot view the query you developed instead they can view the report alone.
    I hope this could help you.
    Regards
    Raja.S

  • User defined query parameter in query generator

    Hi All,
    i am using query generator in SAP to print some records of user defined query. precisely, the details about sales employees are to be printed. now the columns which exist in the database (ie. sales employee code, name, cardcode) etc can be given as a parameter like [%0] and [%1]. but some user defined parameter such as sales commission does not show as such parameter. i want one column as
    select T0.doctotal, (T0.doctotal * [%0]) / 100  as brokerage from OINV T0
    --where [%0] is some commission percentage that the user will give while running this query
    This query gives correct results but it gives the parameter name as 'doctotal' while showing. any idea as to how to handle it properly in SAP?
    thanks in advance,
    Binita
    Edited by: Binita  Joshi on Sep 8, 2009 3:35 PM

    I sometimes defined a UDT only for getting the appropriate parameter entering window. The table has no data; I used it only for its field names in this window.
    (The parameter request can be placed inside a comment and the entered value is used setting an SQL variable like this:
    declare @d datetime
    /*select t.createdate from ordr t where t.createdate=[%0]*/
    set @d=[%0]
    This SQL variable can be used later in the real query.)

  • User defined query parameter in QLD

    Hi All,
    i am using query generator in SAP to print some records of user defined query. precisely, the details about sales employees are to be printed. now the columns which exist in the database (ie. sales employee code, name, cardcode) etc can be given as a parameter like %0 and %1. but some user defined parameter such as sales commission does not show as such parameter. i want one column as
    select T0.doctotal, (T0.doctotal * [%0]) / 100  as brokerage from OINV T0
    --where [%0] is some commission percentage that the user will give while running this query
    This query gives correct results but it gives the parameter name as 'doctotal' while showing. also, when I join 4-5 tables and union, it totally misinterprets the paramater. any idea as to how to handle it properly in SAP?
    thanks in advance,
    Binita

    Hi
    I know it list many value but u can try by this way....
    declare @a numeric(3)
    set @a = (select  top 100 docnum from oinv T1 where T1.[docnum]= [%0])
    select T0.doctotal, (T0.doctotal * @a) / 100 as brokerage from OINV T0
    Thanks
    Kevin

  • User defined Query in Print Layout

    Is it possible to print output of a user defined query in a Print Layout. For example: in Quotation
    Kentish

    Thanks for your input.
    But its not related to Query Print Layout. I wanted to print a query result in a Sales Quotation so that when you print the Sales Quotation, you get the result of the Query on the Sales Quotation
    Thanks
    Kentish

  • Save/create a variant in user defined screen in dialog program

    is there a way to save/create a variant in user defined screen in dialog program?
    thanks...

    Few important tables for Variants:
    VARI - ABAP/4: Variant storage (similar to INDX)
    VARID - Variant directory
    VARINUM - Internal number assignment for variants
    VARIT - Variant texts
    TVARV - Table of variables in selection criteria
    TVARC - Variant conditions
    TVARUVN - Individual Variant Variable: Assignment TVARV
    TVARCT - Text for Variants Conditions
    TVARH - Header entries for screen variants
    TVARIND - Save screen variants
    Regards,
    Vishal

  • Are Sql functions different from user defined functions ?

    Hello,
    SQL functions are built into Oracle Database and are available for use in various appropriate SQL statements. Do not >confuse SQL functions with user-defined functions written in PL/SQL.according to first paragraph of this document Sql functions are different from user defined functions . How is that ?
    Is they really differ from each other ?

    bootstrap wrote:
    If you don't know what compilation is, please use Wikipedia or other online resources.I know what is compilation . But i was confused whether those sql functions are compiled in my machine when i install Oracle Database in my machine or they are pre-compiled .
    As you said these Sql functions are pre-compiled , it is clear now that they are pre-compiled platform dependent code .
    Can you provide actual source code of any SQL function , say SUM function .
    I want to see it, how they have defined . Eagerly waiting for any reply. please help .
    Edited by: bootstrap on Aug 19, 2011 11:50 AMYou can ask oracle if they give you their code. I doubt they will. However if you want to write you own user-defined aggregation function, there are examples in the documentation how to do that.
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17125/adfns_packages.htm#i1008575
    Edited by: Sven W. on Aug 19, 2011 9:24 AM

  • Where can one go to change settings on what if any Email will result from user forum interaction?

    With in house iPad, iTunes in Mac Pro Mt. Lion and in Windows 8 Bootcamped, I have started getting email notifications for my questions in Bootcamp, iPad etc. forums and also for any answers I have contributed to.
    While I think this would be useful for a user's question, to cut back on forum access to check for answers, I do not want email for answers, suggestions I have provided.
    Where can one go to change settings on what if any Email will result from user forum interaction?

    https://discussions.apple.com/docs/DOC-3661

  • No value is select  from  user define  table

    Hi ALL,
                 i am using  B1if , i am sending  data  B1 to  isr , i am using user define table  but problem  no value is select  from  user define  table  .
    my table ID  is @SSRPOD 
    <payload operation="">
         <ns0:MT_POD_B1_System xmlns:ns0="http://xxxx.com/SC/B1/Dlvr/CustDlvr/ExtPrfOfDlvr">
              <POD>
                   <Header>
                        <SalesOrderNumber>
                             <xsl:value-of select="$msg/BOM/BO/@SSRPOD/row/U_SalOrdNo" />
                        </SalesOrderNumber>
                        <ArrivalDate>
                             <xsl:value-of select="$msg/BOM/BO/@SSRPOD/row/U_TaxDate" />
                        </ArrivalDate>
                        <Detail>
                             <DOLineQuantity>
                                  <xsl:value-of select="$msg/BOM/BO/@SSRPOD/row/U_Quantity" />
                             </DOLineQuantity>
                             <UOM>
                                  <xsl:value-of select="$msg/BOM/BO/@SSRPOD/row/U_Unitmsr" />
                             </UOM>
                        </Detail>
                   </Header>
              </POD>
         </ns0:MT_POD_B1_System>
    </payload>
    I have set following things. 
    Inbound Channel
        scenirio step identifier :z.xxxx
        Inbound Channel(IPO):INB_B1_EVNT_ASYN_EVT
        InboundType:Asynchronous
        Process Trigger:B1Event
        Identification Method: B1Event
        Identification Parameter:n.a
        Identifier:?????                                  
        Identifier Namespace:??????
      can anyone help me?
    Edited by: Sinha_Sinha on Feb 3, 2012 7:47 AM

    Found an authorization object was missing, that enabled the case types to show but hitting the GO button brought a page that can not be viewed in IE.  on to the next hurdle..........

  • BRFplus: How to create an instance of User-Defined Expression Type?

    Hi,
      I've created an expression type in a System Application and marked its Access Level as Global. I've created a Class & Interface and assigned it to my Expression Type, and activated it successfully.
    Now how do use this Expression Type to create expression in my Customizing Applications?
    Do I have to make any more code changes like extending any more classes or implementing additional interfaces? (I've already created a dummy Query Class and UI class)
    Any documentation or example of how to create a user-defined Expression Type and how to use them will be very helpful for me.
    Thank you & Best Regards

    Well I was going through the PDF documents available on SDN. I came across a document which referred to a document on creating user-defined expression.
    Document Name: [BRFplus XML Export and Import|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20462066-a086-2d10-a999-c9075767ce48?quicklink=index&overridelayout=true].
    The code sample for creating user-defined expression types is available in the How to Create Custom Expression Types document
    Pg. 24
    I had a hard time looking for that document. Couldn't find it though.
    Thank you Mr. Ziegler, now I know that currently there isn't any documentation on User-Defined Expression Types. I'll be awaiting for your  document on this
    Any overview about the steps to be followed in creating a custom expression type, with a few simple steps on how to do it over here would be greatly appreciated. Especially on how to get it seen in the Create Expression Sub-Menu. Also do I have to code a web dynpro for the UI?
    Thank you & Best Regards.

  • Alert based  on user defined query

    Hi
    I have defined user defined field U_Jobnumber.I need to stop /inform user if user is trying to enter the same u_Jonbnumber again .This is being done at sales order (header level)
    Can you please help me to provide solution
    (Points will be awarded based on solution or advice )
    Thank you
    Bishal

    Hi Bishal,
    Rather than using an alert, you could put validation code in the SBO_SP_TransactionNotification stored procedure to check for the same job number before the document is added. This is a permitted solution as SAP allow users to add their own sql code to this proc (provided it's not inserting or updating data in SBO system tables).
    To set up this solution (on a test system):
    1) Open SQL Studio Management
    2) In the Object Explorer expand the company database, expand Programmability and Stored Procedures
    3) Right-click the SBO_SP_TransactionNotification stored procedure and choose Modify. This will create an update script in the main window.
    4) Look for the following section in the script:
    --     ADD     YOUR     CODE     HERE
    5) Underneath the above section, paste the following code:
    if @OBJECT_TYPE = '17' and @TRANSACTION_TYPE in ('U', 'A')
         if exists(select DocEntry from ORDR where DocEntry &lt;&gt; cast(@LIST_OF_COLS_VAL_TAB_DEL as int)
                        and U_Jobnumber is not null and U_Jobnumber &lt;&gt; ''
                        and U_Jobnumber = (select U_Jobnumber from ORDR where DocEntry = cast(@LIST_OF_COLS_VAL_TAB_DEL as int)) )
              begin
                   set @ERROR = '9999' -- Set your own error code here
                   set @ERROR_MESSAGE = 'The Job Number entered has already been used on a previous sales order.'
              end
    6) Click on Execute and you should get a message stating that the update was successful
    7) Test adding a new sales order
    The above script will raise an error when the user clicks on Add if a job number has been specified on the sales order and that number has already been used. It will not check if a job number has not been specified
    Kind Regards,
    Owen

  • Dynamically create dataTable

    Hi,
    I need to know if it's possible to dynamically create a jsf data table and populate it with values from an ArrayList at runtime. I already have the array list but I won't know it's dimensions until runtime because the queries that fill the arrayList will be custom selected by the user. Can anyone pls help me? If you need any more information or any code I'll be glad to provide it.
    Thanks.

    Use value binding, or method binding, for its rows attribute value. Other attributes may serve parts of your specific needs. -- Or, depending on your use-case scenario, simple value binding for its value attribute might suffice.

  • Dynamically create Value Objects from XML file

    Hi
    I want to create a value object from Xml file dynamically,like in the xml file i have the name of the variable and the datatype of the variable.is it possible do that,if so how.

    Read about apache's Digester tool. This is part of the Jakartha project. This tool helps in creating java objects from the XML files. I am not sure, if that is what u r looking for.

Maybe you are looking for

  • ConsoleOne and Windows 7

    With the rapid oncoming inevitability of Windows 7 and having completely skipped Vista as a viable Enterprise OS I've been doing a bit of testing. I have had Windows 7 x64 Build 7232 running as my primary OS for a bit over a week now and I have to sa

  • Exported versions include GPS data?

    i spent quite a bit of time troubleshooting an issue before i learned that aperture does not include gps data when exporting versions.  is that really true?  if so, i'm fairly flabbergasted.  how can a pro product like this not perform such a basic f

  • I can't import mp3 or caf files into my project

    I have FCPX 10.1.4 on a MacBook MacBook Pro 2,3 GHz i7 running Yosemite 10.10.1. FCPX version 10.1.4 I recently updated to this version of FCPX and now when I drag and drop a jingle from my iLife Sound Effects folder to my project or when I import a

  • StringIndexOutOfBoundsException while reading a field

    Hi! I'm using a postgres database with JDBC and when I try to read a timestamp field (defined as timestamp in the database), I got the exception: java.lang.StringIndexOutOfBoundsException: String index out of range: 26      at java.lang.String.charAt

  • IdeaPad U530 Webcam - is this a joke?

    Hey guys, just bought a new Lenovo IdeaPad U530. I was pretty happy until I check the built in "HD Webcam". The quality has absolutely nothing to do with HD, I think I would have a better quality recording with a potato! Since it came with Windows 8.