For each row of a table call a pl/sql function

Hi,
i have a search form in adf like this:
parameter1:___
parameter2:____
buttonSearch
Table with results
field1 field2 field3
row1 ------ --------- -------
row2 ------ --------- -------
row3 ------ --------- -------
The user inputs the parameters 1 and 2 then press buttonSearch and the query execute and returns rows 1 to 3.
What i need is for each row call pl/sql function and passed the parameter 1 and 2 and field 1 to 3 (plsql function recives 5 parameters (parameter1, parameter2, field1 , field2 and field3) )
my buttonSearch call a java class that execute ExecuteWithParamters method.
I create the call to my plsql function on Application module class and then export as a java interface.
So i have the function to use in the viewcontroller layer, but i don't know where to use it, and how to pass the paramters: the parameter 1 and 2 that user inputs and the row fields.....
any ideas....
thanks!!

Hi,
for this you need to call the PLSQL function upon table rendering, which means that you need a field in the table referencing a managed bean. In the managed bean you can use #{row} and resolve it using a ValueExpression. #{row} gives you access to the current rendered row (this is why you need to do it when the table renders) and thus allows you to call getAttribute(name) to get the values of field 1 - 3. The search field value you should get through the bindings reference (assuming the search form uses ADF). Then you create an operation binding for the executeWithParameters and call operationBindingName.getParamsMap().put(argname, argvalue); on it.
Frank
Ps.: I am concerned about the performance you get and wonder if it isn't possible to create a transient attribute that executes the function and displays the results. As I understand, the search parameters are only to filter the result set, which you still can do

Similar Messages

  • Different values in a list box for each row of the table control...

    Dear Experts,
    Is it possible to populate different values for each row in a listbox inside a table control ?
    Example,
    Row 1 in the the table contains A, B & C
    Row 2 in the same table contains C, D & E
    If yes, How?
    yes i am using
      call function 'VRM_SET_VALUES'
        exporting
          id     = i_name
          values = i_list.
    Thank you .
    Message was edited by:
            Kokwei Wong
    Message was edited by:
            Kokwei Wong

    Hi Wong,
    this is code example for listbox
    TYPE-POOLS vrm .
    DATA: lt_vrm_values TYPE TABLE OF vrm_value.
    DATA: wa_vrm_values TYPE vrm_value.
    PARAMETER p_list AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
      wa_vrm_values-key = 'Key1'.
      wa_vrm_values-text = 'Value1'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key2'.
      wa_vrm_values-text = 'Value2'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key3'.
      wa_vrm_values-text = 'Value3'.
      APPEND wa_vrm_values TO lt_vrm_values.
    AT SELECTION-SCREEN OUTPUT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id              = 'P_LIST'
                values          = lt_vrm_values
           EXCEPTIONS
                id_illegal_name = 1
                OTHERS          = 2.
      IF sy-subrc  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    To fill it with data from DB, just do select in INITIALIZATION and put that values with same alghoritmus.
    Manas M.
    P.S.: This is very easy question, you should use search ...

  • Select count(*) for each row of a table

    Hello All,
    Following query gives a statistics for each user (how many items he owns, home many tickets authored, how many objects he is subscribed to etc...)
    select auser.userid,
    (select count(*) from item where owner like '%' || auser.id || '%') ITEM_OWNER_CNT,
    (select count(*) from tkt where originator = auser.id) TKT_ORIGINATE_CNT,
    (select count(*) from tkt where assigned_to = auser.id) TKT_QA_CNT,
    (select count(*) from tkt where create_user = auser.id) TKT_AUTHOR_CNT,
    (select count(*) from subscriptions where subscriber_id = auser.id) SUBSCRIPTION_CNT
    from
    user auser
    I was not happy with the performance of this query, so I tried the same using group by. The performance was even worse.
    Is there any other option for me to try? Please advice.
    Thanks,
    Sathish

    Hi, Sathish,
    As SBH said, a lot depends on your data. Please post some sample data (CREATE TABLE adn INSERT statemetns) for all tables, and the results you want from that data. Describe and give examples of any relationships that are not one-to-one..
    You probably want to do joings, like SBH suggested, rather than scalar sub-queries.
    The connection between the auser and item tables
    (select count(*) from item where owner like '%' || auser.id || '%') ITEM_OWNER_CNT,is very suspicious. Perhaps the item table is poorly designed, and the query would be faster if that table were changed. Is changing the design of the item table an option?
    You should be able to get all the information from the tkt table in one pass. It looks like you need to unpivot the data, so instead of one row per ticket (with 3 different people connected to it), there are 3 rows per ticket, each with only 1 person referenced. This is not necessarily a bad table design. Unpivoting, even more than most other things, depends on your database version, so you'll have to tell what version of Oracle you're using.

  • How to change VO's dynamically for a item for each row in advanced table?

    Hi All,
    We had a requirement to filter the employees based on the search criteria table. I am using advanced table for developing search criteria.
    In that table I am having three columns. Operator (messagechoice), Criteria Type (messagechoice), and Criteria value (messageLovInput). Also 'Add Another Row' functionality is available.
    My requirement is:
    First Row:(Initial Row)
    When the user selects a value in Criteria Type, only the values that are relevant to that type should be displayed in the Criteria Value.
    Second Row: (when the user selects Add Another Row button)
    When the user selects a value in Criteria Type, only the values that are relevant to that type should be displayed in the Criteria Value.
    The problem I am facing here is, the Criteria Value column is pointing to only one VO at design time. But wee need to change that VO dynamically without disturbing other rows depending on the Criteria Type value.
    Is it possible to do so?
    Note: User can add n number of conditions as he want.
    Can anyone help how to acheive this.
    Regards,
    Sundeep.

    Check Dynamic Poplist section under Standard Web Widgets in Chapter 4 of OA Framework Developers guide.

  • Condtion based xml for each row of the table t-sql

    Hello ,
    i have below data.
    create table #students
    id int identity(1,1) primary key,
    student_id int not null,
    [s_m_cml] xml
    insert into #students
    student_id,
    [s_m_xml]
    values
    101,
    '<submarks><submark><subject>Arts</subject><marks>85</marks></submark><submark><subject>Science</subject><marks>95</marks></submark><submark><subject>maths</subject><marks>100</marks></submark></submarks>'
    ),(102,'<submarks><submark><subject>Arts</subject><marks>50</marks></submark><submark><subject>Science</subject><marks>75</marks></submark><submark><subject>maths</subject><marks>85</marks></submark></submarks>')
    select * from #students
    if all subjects- marks in s_m_xml marks > 80 then i select the row as promoted else as demoted. the exact output should look like below.
    student_id [status]
    101 promoted
    102 demoted
    what is the best way to achieve this using t-sql. Thanks in advance for any suggestions.

    You dont need to parse out the values from xml for this
    You can do the check inline
    see illustration below
    drop table #students
    create table #students
    id int identity(1,1) primary key,
    student_id int not null,
    [s_m_cml] xml
    insert into #students
    student_id,
    [s_m_cml]
    values
    101,
    '<submarks><submark><subject>Arts</subject><marks>85</marks></submark><submark><subject>Science</subject><marks>95</marks></submark><submark><subject>maths</subject><marks>100</marks></submark></submarks>'
    ),(102,'<submarks><submark><subject>Arts</subject><marks>50</marks></submark><submark><subject>Science</subject><marks>75</marks></submark><submark><subject>maths</subject><marks>85</marks></submark></submarks>')
    ,(104,'<submarks><submark><subject>Arts</subject><marks>92</marks></submark><submark><subject>Science</subject><marks>88</marks></submark><submark><subject>maths</subject><marks>98</marks></submark></submarks>')
    select *,
    case when [s_m_cml].exist('/submarks/submark[data(marks) < 80]')=1 then 'demoted' else 'promoted' end as status
    from #students
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to process a block for each row in an internal table....

    Hi experts....
    In po approval workflow the scenario is like this.... for each po there may be more than one approver. approvers list i am maintaining in the ztable. list of approvers(no of approvers) is decided by the po value. I have collected these approvers into internal table. now i have to process a block ( approving or rejecting the po... )in the workflow for each row in the internal table.
    how can i do this. based on the decision of the 1st approver  approves the po then it should go to next approver in the internal table...otherwise end the workflow.....
    Please help me......

    i have created an internal table in the workflow container in which i am getting the list of approvers....
    how can i loop the internal table in the workflow...?
    how can i know the index of the loop in the workflow.....(will sy-index work here....? so that i can use loop until step in the main workflow to call the subworkflow..so that if sy-index is greater than no of entires in the itab then i can come out of the loop)

  • Calling a stored procedure for each row returned

    I need to call a stored procedure for each row returned by a repeating frame. I called the stored procedure from the repeating frame format trigger, but that did not work( it did no populated the tables populated by the stored procedure)
    How can I call a stored procedure for each row returned by a repeating frame.
    Thank you

    Include it as a formula column in your data model.

  • How to call webservice for each record in a table using ODI

    Hi
    I am new to ODI and Webservice. I want to invoke a scenario in ODI using web service. I hava a weblogic application server with axis 2 deployed.
    But I want call webservice for each record in a table
    For eg: "EMP" table have 50 records, for each record web service should invoke
    Can any one help me on it.
    Thanks,
    phani
    Edited by: user12774166 on Jun 6, 2010 11:16 PM

    If your goal is "call" a web service, Jason's Straub's [flex-ws-api|https://flex-ws-api.samplecode.oracle.com/] is by far the best I've seen. You might want read more about it on [his blog|http://jastraub.blogspot.com/search?q=+flex_ws_api+].
    Tyler Muth
    http://tylermuth.wordpress.com
    [Applied Oracle Security: Developing Secure Database and Middleware Environments|http://sn.im/aos.book]

  • Drop Down List in a table - different options for each row

    How can i have a drop down list in a table with different options for each row?
    My requirement is this.. I want to display, say employee dtails in a table, and one column is employee hobbies, whcih can have multiple values and each employee may have a different list of hobbies. So how can we populate the drop down for each row, with different options?

    Hey. Uh, this probably isn't the answer you were looking for, but it sounds like you've got a problem with your database design there. Generally speaking, your tables shouldn't have multi-valued fields, in the relational model anyway (sql). Instead, you should look at adding a separate table like EMPLOYEE_HOBBIES. Then you have a foreign key using the employees primary key as the foreign key in the employee_hobbies table, see what I mean? I might have misunderstood your explanation though, I'm not sure.
    Alternatively, you could just have hobbies as a big freeform varchar field, and don't bother to make people separate their hobbies into different fields (you'd have to abandon the drop-down listbox idea in this case). If there's no really important reason to make the distinction, then it's probably easier just to not do it.

  • Updating A Table in a for each row trigger

    I have a trigger,
    create or replace trigger ins_ibpm_temp_trig
    after update of ethic_dt on ethics_approval_info for each row
    My issue is that I need to update the ethics_approval_info for each record based on the ethics date that was updated. I am getting the error
    ORA-04091: table ORACLETEST.ETHICS_APPROVAL_INFO is mutating, trigger/function may not see it.
    So the issue here of course is that I am trying to update a table, that is already in the middle of updating. Is there any way to get around this?

    Try these links
    Link1
    Link2
    Regards,
    Abdetu..

  • Adding a check box control for each row of data in a DataModel

    Hi all,
    I need to add a checkbox control for each row of data on a DataModel object.
    I have a "commandButton" at the bottom of DataModel, and whenever someone checks some of the rows on that list of rows,
    I need to get the selected dataModel(fragment of the list) in my backing bean.
    How do I achieve this functionality in JSF?
    Thanks,
    Meghasyam.

    Hi all,
    I need to add a checkbox control for each row of data
    on a DataModel object.
    I have a "commandButton" at the bottom of DataModel,
    and whenever someone checks some of the rows on that
    list of rows,
    I need to get the selected dataModel(fragment of the
    list) in my backing bean.
    How do I achieve this functionality in JSF?
    Thanks,
    Meghasyam.You'll want to have a wrapper class as suggested above, which has a "selected" boolean in it. Then use the "binding" attribute of the h:selectBooleanCheckbox component to bind the checkbox to that property... Make the property public and specify the properties exact name in the binding... bindings do not append "get" to the EL.
    Here is an example of what your table might look like... This code would display the list of names with a checkbox to the left of each name... When the check box is selected, the "selected" property of that wrapper class is set to true or false as needed. Then when the form is submitted, and you are inside your actionListener or action method call, you can look through your collection of wrapper classes asking each one if it was selected or not... Then do whatever you want with them... In this example, replace "myBackingBean" with the name of your backing bean, and "names" with the name of the method in your backing bean which returns the collection of wrapper classes... create a flag "public boolean selected" or similar in your wrapper class..
    <h:dataTable id="namestable"
    value="#{myBackingBean.names}"
    var="aName">
    <h:column>
    <h:selectBooleanCheckbox binding="#{aName.selected}"/>
    <h:outputText value="#{aName.nameText}"/>
    </h:column>
    </h:dataTable>
    Let me know if that isn't clear enough and I'll see if I can find a better way to explain it...
    -Garrett

  • Upload a file where no. of columns for each row is not fixed...

    Hi All,,
    I have to upload a file......
    number of columns for each rows are not fixed ....
    e.g.
    Posting Date     Company Code     Currency     Header Text     Cost Center     Internal Order     Ref 1     Ref 2     Line Text     Account no.     Amount     Account no.     Amount     Account no.     Amount     Account no.     Amount     Account no.     Amount     Account no.     Amount     Account no.     Amount
    31-05-09     1000     EUR     PAYROLL 05/2009     1234     123456     123456     seaman     RU     999999     9,999.99                                                            
    31-08-09     1000     EUR     PAYROLL 05/2009     678     98765     98765     officer     GB     600015     4,560.00      600035     2,125.50      600020     1,325.40      600025     245.75      600030     300.00      280010     1,000.00      281091     6,000.00
    its in tab delimited txt file.....
    how to upload this type of file..
    Plz suggest....
    thnx
    rahul

    Hi,
    Define your internal table like this.
         TYPES: BEGIN OF upload_type,
           upload(330),
           END OF upload_type.
    DATA: itab_upload TYPE STANDARD TABLE OF upload_type,
           wa_upload TYPE upload_type.
    Data: file type string.
    file = 'C:/test.txt'.
      CALL FUNCTION 'GUI_UPLOAD'
           EXPORTING
                filename                = file
                filetype                = 'ASC'
               HAS_FIELD_SEPARATOR = 'X'
           TABLES
                data_tab                = itab_upload
           EXCEPTIONS
                file_open_error         = 1
                file_read_error         = 2
                no_batch                = 3
                gui_refuse_filetransfer = 4
                invalid_type            = 5
                no_authority            = 6
                unknown_error           = 7
                bad_data_format         = 8
                header_not_allowed      = 9
                separator_not_allowed   = 10
                header_too_long         = 11
                unknown_dp_error        = 12
                access_denied           = 13
                dp_out_of_memory        = 14
                disk_full               = 15
                dp_timeout              = 16
                OTHERS                  = 17.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Use the sring operations to identify your coloumns.
    Regards,
    Satish

  • Check Box for each row in report -- all rows deleting when pressing DELETE

    Hello experts! I have set up a report with a check box for each row. When I click the DELETE button to delete the selected rows, every single one of the rows get deleted...even the ones that are not selected. I have my process point set to "On Submit - After computations and validations".
    This is my delete process (SHG is the table and SHG_ID is the primary key):
    FOR i in 1..HTMLDB_APPLICATION.G_F01.count
    LOOP
    DELETE FROM SHG
    WHERE SHG_ID = HTMLDB_APPLICATION.G_F01(i);
    END LOOP;
    Also, I've added to query in the region source this line:
    htmldb_item.checkbox(1, SHG_ID) del,
    Where does the "1" come into this? Not sure what I am doing wrong!
    Message was edited by:
    user477193
    Message was edited by:
    user477193

    The 1 (first argument to all the htmldb_item.* APIs) corresponds to the array number in htmldb_application.g_fNN. So 1 will populate array g_f01, 2 will populate g_f02 and so on.
    Your code seems fine, it should delete only the checked rows. Are you sure there is no other process on the page that might be deleting the rows? See if you can put up an example on htmldb.oracle.com

  • Get the Count for each row

    I'm trying to get the count for each row to total count for each month
    Something like this
    Hardware     |      Jan
    Monitors       |       5
    Processors   |      137
    Printers        |      57
    etc........
    How can I write a query for this. I can get the Hardware column but don't know how to get the next column.

    If you can provide more data like sample input DML statements it would have been wonderful..
    Assuming is , you need a pivot. Here is an article on basic Pivot..
    http://sqlsaga.com/sql-server/how-to-use-pivot-to-transform-rows-into-columns-in-sql-server/
    something like this may be..
    DECLARE @Input TABLE
    Hardware VARCHAR(20),
    [Date] VARCHAR(20)
    INSERT INTO @Input VALUES('Monitor', '01/01/2014'), ('CPU', '01/01/2014'), ('Monitor', '01/03/2014')
    , ('ABC', '01/01/2014'),('Monitor', '02/01/2014')
    ;WITH CTE AS
    SELECT Hardware, LEFT(DATENAME(M, [Date]),3) AS [MonthName] FROM @Input
    SELECT *
    FROM
    SELECT Hardware, [MonthName], COUNT(Hardware) AS Count FROM CTE GROUP BY Hardware, [MonthName]) a
    PIVOT (MAX([Count]) FOR [MonthName] IN ([Jan], [Feb])) pvt
    Please mark as answer, if this has helped you solve the issue.
    Good Luck :) .. visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • How to add a comment for each row on the output of a report?

    I would like to add a comment (field) for each row on the output of report? This comment should to be saved as well. Is there a way i can do that?
    Regards,
    Ram

    Hi Dimitri,
    through the instead of trigger functionality i am able to update the view. This is view is based on different views which should be linked to a table (as you suggested) in which comments can be stored. Hower this table is empty and how to link this table with the view now? I face the following challenge.
    View consists the following columns, for example
    select name, sex, age from test_view
    name sex age
    John M 20
    Anton M 30
    Willy M 40
    shirley F 38
    sharon F 37
    The report has the following output, for example
    name     sex age
    John     M 20
    Anton     M 30
    Willy M 40
    Shirley F 38
    Sharon F 37
    Now i would like to add comment through a button.
    The report layout looks like
    name sex age
    John M 20 <add comment button>
    After submitting the <add comment button> you can enter text which deals with John
    text='John doesnot like me'
    Finally the report display the comment as well
    name sex age
    John M 20 'John doesnot like me' <update/delete comment button>
    Anton M 30 <add comment button>
    Willy M 40 <add comment button>
    Shirley F 38 <add comment button>
    Sharon F 37 <add comment button>
    After submitting the <update/delete button> you can change or delete the entered text.
    I hope this example clears things up.
    Regards,
    Ram

Maybe you are looking for

  • Employee Discount and Loyalty Plan

    Back in June of this year I contacted customer service to change my plan. I was told about the new Loyalty Plan. My concern was whether or not my employee discount would still apply. The customer service rep checked into it and told me yes. So I made

  • Blocking on a Router

    I have enabled blocking on a router to fire when a certain sig fires. this has been working for a while, I can see the ACL on the router with the host being denied access,so I know that it has been working. The sig fired today and the host was added

  • SAP Crystal Report Support

    Hi, we having a licensed version of Crystal Reports 2011. When I register for SAP Coummunity Network , Its asking SAP Market Place ID & Passoword, We having Order Id, How to get SAP Market Place ID & Password? Regards, Esha Abdullah M

  • Programmatically Changing Build Specifications from command line

    I use a batch file that calls a VI to build several LV projects.  I found the article http://zone.ni.com/devzone/cda/epd/p/id/5051 to get started and build projects; however, I was wondering if anyone has been able to change build specifications with

  • Information about international calls

    hello all  i have a problem  and i could not understand it  . the problem is that i have a number that  i would  like  to call it  but i'm not able  to get the  right call rate  for it  the number is   mobile number  which is begin  with 00972599  wh