Get Row reference in advanced table to set the value of custom column

Hi,
I have a requirement to add a new column PHP Amount in Manage Charge page which is a entry page where all the charges are entered for a PO. This region is based on Advanced table.
As per requirement, Newly created column should populate the value of the existing column (Amount) or vice verse i.e. value entered in amount column should be set to PHP Amount column for a particular row. and the value entered in PHP amount should be stored in the custom table.
I have added the column via personalization and setting the view attribute in extended controller as this column is not the part of the database table on which the VO is based upon. Also added a  PPR event in process request function in controller. And getting the reference of the row in processForm Request's PPR event and invoking the method defined in my custom AM for getting and setting the columns values . Here i can't extend the root AM as the Page have LOV columns so i have created my custom AM and adding it dynamically in controller.
Here is the complete code
Controller Code
public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
           super.processRequest(oapagecontext, oawebbean);
           OAApplicationModule rootAm = oapagecontext.getApplicationModule(oawebbean);  
            OAApplicationModule nam = (OAApplicationModule)rootAm.findApplicationModule("XXIPCShipmentAMEx");
             if (nam == null)
                 nam = (OAApplicationModule)rootAm.createApplicationModule("XXIPCShipmentAMEx", "xxipc.oracle.apps.inl.workbench.server.XXIPCShipmentAMEx");
           OAAdvancedTableBean tableBean =(OAAdvancedTableBean)oawebbean.findIndexedChildRecursive("ChargeLinesAdvTable");
           OAMessageTextInputBean phpAmt =(OAMessageTextInputBean)tableBean.findIndexedChildRecursive("XXIPC_PHP_AMOUNT");
           OAViewObject ChargeLinesVO1 = (OAViewObject)rootAm.findViewObject("ChargeLinesVO1");
            phpAmt.setViewUsageName("ChargeLinesVO1");
            if (ChargeLinesVO1 != null)
                try
                  String l_att= ChargeLinesVO1.findAttributeDef("PHPAmt").toString();
                 catch(Exception exception)
                  ChargeLinesVO1.addDynamicAttribute("PHPAmt"); //Adding ViewAttribute to VO
            ChargeLinesVO1.reset();
            phpAmt.setViewAttributeName("PHPAmt");
           FirePartialAction FireActionA = new oracle.cabo.ui.action.FirePartialAction();
           FireActionA.setEvent("PPR");
           FireActionA.setUnvalidated(false);
           phpAmt.setPrimaryClientAction(FireActionA);
public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
            super.processFormRequest(oapagecontext, oawebbean);
            OAApplicationModule rootAm = oapagecontext.getApplicationModule(oawebbean);
            OAApplicationModule nam = (OAApplicationModule)rootAm.findApplicationModule("XXIPCShipmentAMEx");
            OAAdvancedTableBean tableBean =(OAAdvancedTableBean)oawebbean.findIndexedChildRecursive("ChargeLinesAdvTable");
            OAMessageTextInputBean Amt =(OAMessageTextInputBean)tableBean.findIndexedChildRecursive("Amount");
            OAViewObject ChargeLinesVO1 = (OAViewObject)rootAm.findViewObject("ChargeLinesVO1");
            String rowRef = oapagecontext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
            Serializable[] param ={rowRef};
          // IF PPR event bind with PHPAmount column is triggered
            if("PPR".equals(oapagecontext.getParameter("event")))
                    nam.invokeMethod("PHPAmtPPRAction",param);
          // IF changeChargeAmt event(Standard Event ) bind with Amount column is triggered
           if("changeChargeAmt".equals(oapagecontext.getParameter("event")))
              nam.invokeMethod("changeChargeAmtPPRAction",param);
Custom AM Code
public void PHPAmtPPRAction(String rowRef)
          OARow row = null;
          if (rowRef != null )
               row=(OARow)findRowByRef(rowRef);
               if(row != null)
                  Number phpAmt =(Number)row.getAttribute("PHPAmt");
                   if(phpAmt != null)
                          row.setAttribute("ChargeAmt", phpAmt);
  public void changeChargeAmtPPRAction(String rowRef)
        OARow row = null;          
          if (rowRef != null )      
             row=(OARow)findRowByRef(rowRef);
             if(row != null)
                 Number chargeAmt =(Number)row.getAttribute("ChargeAmt");                  
                 if(chargeAmt != null)                  
                         row.setAttribute("PHPAmt", chargeAmt );
I m not able to set the PHP Amount column value entered in Amount column. But i am able to set the Amount column value to PHP amount column.
I m not getting the Row Reference in case PPR event triggered in PHP Amount column . It is giving Null reference in case of PHP Amount.
I don't know what i m missing ..Can anyone help me here..
Thanks in advance
Renu

but using second way you will not be able to save those record in database, to save in database you have to override setter method also
Code will be like this -
    public String getBillRemarks() {
       return getSuppNmTrans(); // This is first Column Value
       // return (String) getAttributeInternal(BILLREMARKS);    }
    public void setBillRemarks(String value) {
       //Setting First Column Value in Second
       setAttributeInternal(BILLREMARKS, getSuppNmTrans());  
But i suggest you to use valueChangeListener on first field to set value in second one
Ashish

Similar Messages

  • Want each row reference in advance table

    Hi all ,
    To validate specific row in Advance table ,
    I mush have a reference to that row
    so, can anybody tell how i will get the row reference ?
    I tried a lot but could not find anything.
    Actual issue :
    whenever user changes any one of the field value in advance table's row.
    i need to check some other field values in same row.
    for that i need row reference , that reference i am not getting
    please help
    waiting for reply

    Suresh,
    You need to handle this at the VO Row Level. The easier way to do this would be to have your code in the VORowImpl's setter methods (or) the validate entity methods.
    - In the set<AttributeName> method, you can check for other values of the same row by using thier get<AttributeName>. You should not that the setters are not called in any particular order, so if both the attributes are being modified at the same time, you can expect one to not have the latest value reflected.
    - In the validateEntity method, you can get the handle of all the view attribute values and do cross entity validations.

  • Hide Advance table Depending upon the value of dropDown

    Hi,
    I have 2 advance tables. 1st one has a DropDown. Depending upon the value of the dropdown in 1st advance table, the second advanced table should get rendered.
    I tried by getting the value of the dropdown by addingg a PPF and iterating trough the table and I got the value. But when I redirect to the same page, all the selection and other values in 1st advanced table vanish out.
    Can someone help me getting the 2nd table hidden and at the same time retaining the values for the 1st advanced table.
    Thanks in Advance,
    Kaushik Rambhiya

    Kaushik
    Implement PPR for this requirement and dont redirect the page
    Displaying image based selected value of choice bean
    http://oracleanil.blogspot.com/2009/05/ppr.html
    Thanks
    AJ

  • Create a new column in a table that compares the value of one column with its previous value

    The DDL:
    DECLARE
    @T TABLE
    IDNO
    int,
    name
    varchar(40),
    [Date]
    datetime2,
    Price1
    float,
    Price2
    float
    DECLARE
    @K TABLE
    IDNO
    int,
    name
    varchar(40),
    [Date]
    datetime2,
    Price1
    float,
    Price2
    float
    INSERT
    INTO @T
    VALUES(22,'C_V_Harris','2014-01-02 10:23:49.0000000',
    23.335,      
    23.347)
    INSERT
    INTO @T
    VALUES(21,'C_V_Harris','2014-01-02 10:05:13.0000000',
    23.357,      
    23.369)
    INSERT
    INTO @T
    VALUES(20,'C_V_Harris','2014-01-02 09:56:15.0000000',
    23.364,      
    23.377)
    INSERT
    INTO @T
    VALUES(19,'C_V_Harris','2014-01-02 09:45:26.0000000',
    23.351,      
    23.367)
    INSERT
    INTO @T
    VALUES(18,'C_V_Harris','2014-01-02 09:43:20.0000000',
    23.380,      
    23.396)
    INSERT
    INTO @T
    VALUES(17,'C_V_Harris','2014-01-02 09:34:28.0000000',
    23.455,      
    23.468)
    INSERT
    INTO @T
    VALUES(16,'C_V_Harris','2014-01-02 09:30:37.0000000',
    23.474,      
    23.486)
    INSERT
    INTO @T
    VALUES(15,'C_V_Harris','2014-01-02 09:18:12.0000000',
    23.419,      
    23.431)
    INSERT
    INTO @T
    VALUES(14,'C_V_Harris','2014-01-02 09:16:06.0000000',
    23.360,      
    23.374)
    INSERT
    INTO @K
    SELECT
    ROW_NUMBER()
    OVER (ORDER
    by IDNO)
    AS RN,*
    FROM
    @T
    SELECT
    * FROM
    @K
    --not working:
    SELECT
    a.RN,a.Price2
    FROM
    @K a
    INNER
    JOIN @K
    b
    ON
    a.RN=b.RN-1
    WHERE
    a.Price2>b.Price2
    I need to create  a view with a column (say 'Comp' below) that compares the value of each row in Price2 with the previous Price2 row, and it is greater then +1, the
    same 0, and less -1.
    The processed table should be:
    IDNO
    name
    Date
    Price1
    Price2
    Comp
    22
    C_V_Harris
    1/2/2014 10:23:49
    23.335
    23.347
    0
    21
    C_V_Harris
    1/2/2014 10:05:13
    23.357
    23.369
    1
    20
    C_V_Harris
    1/2/2014 9:56:15
    23.364
    23.377
    1
    19
    C_V_Harris
    1/2/2014 9:45:26
    23.351
    23.367
    -1
    18
    C_V_Harris
    1/2/2014 9:43:20
    23.38
    23.396
    1
    17
    C_V_Harris
    1/2/2014 9:34:28
    23.455
    23.468
    1
    16
    C_V_Harris
    1/2/2014 9:30:37
    23.474
    23.486
    1
    15
    C_V_Harris
    1/2/2014 9:18:12
    23.419
    23.431
    -1
    14
    C_V_Harris
    1/2/2014 9:16:06
    23.36
    23.374
    -1
     How can I structure the statement to get (the most recent - order by date ) result for Comp?

    Satheesh Variath, I just had to make some corrections from your script to get the correct answer:
    CREATE
    VIEW vw_Comp
    AS
    SELECT
    TOP 1 t.IDNO,t.name,t.[Date],t.Price1,t.Price2,
    CASE
    WHEN t.Price2
    > LAG(Price2,1)
    OVER (PARTITION
    BY name
    ORDER BY IDNO) 
    THEN 1
    WHEN t.Price2
    < LAG(Price2,1)
    OVER (PARTITION
    BY name
    ORDER BY IDNo) 
    THEN -1
    ELSE 0
    END
    AS Comp
    FROM 
    @T t
    ORDER
    BY DATE
    DESC
    The adjustments: the selection of the most recent comparison (Top 1) and the use of the function LAG (instead of LEAD) to get the previous value of the column.

  • Input field validation in a Table based on the value of other column

    Hi all
    I have a table with 2 columns. column1 is of text view and  column2 is Input field.
    The user should not be allowed to enter a value  in the column2 ( input field) greater than the value populated in column1(textview).
    So for Eg; if the column1 is populated with value 100, The user should not be able to enter a number greater than 100 in the column2  input field.
    Please let me how this can be achieved.
    I appreciate the help.
    Thanks

    Hi,
    Let me make sure u r working with table control.
    First u have to create a event(VALIDATE) to do the validation.
    Inside the event,
    1. First get the current index where user has pointed the curson
    2. Once u get the index read the internal table with index value.
    3. Now u can compare the col1 and col2 values and populate the error message.
    1. DATA : lo_elt TYPE REF TO if_wd_context_element,
                   l_index type i.
    lo_elt = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
         CALL METHOD LO_ELT->GET_INDEX( RECEIVING  MY_INDEX = l_index.
    above code should be written inside the event.
    Thanks,

  • Setting the header of a Column group in a Advanced table dynamically

    Hi All,
    There is a requirement to set the Header of a column group in a Advanced table dynamically by fetching the values from a view attribute.
    Code :
    OAAdvancedTableBean spiderTbl1 ;
    Problem:
    It is not able to set the value for the header inspite of getting the handle of the bean.
    Analysis:
    the same piece of code works for
    1) Setting the text of the advanced table
    2) Setting the header of a column in a column group
    Please let me know if there is anything more that needs to be done for setting the prompt of a column group header.
    Thanks in advance!

    I have posted it without giving the complete code by mistake. Below is the code:
    OAAdvancedTableBean spiderTbl1 ;
    OASortableHeaderBean spiderHdr1;
    spiderTbl1 = (OAAdvancedTableBean)webBean.findChildRecursive("SpiderCatTbl1RN");
    if (spiderTbl1!=null){
    spiderHdr1= (OASortableHeaderBean)spiderTbl1.findChildRecursive("AnalogHdr");
    if (spiderHdr1!=null) {
    spiderHdr1.setAttributeValue(OAWebBeanConstants.PROMPT_ATTR,
    new OADataBoundValueViewObject(spiderHdr1,
    "SpiderCategory1",
    "ProjRegPVO1"));
    }

  • Create a new Row in an advanced table in an advanced table

    Hi,
    I am handling the master detail relationship. For this i have used advanced table in an advanced table. I am facing a problem while creating a new row in the inner advanced table.
    I have a Display Sequence column in the inner advanced table. I want to handle the logic for displaying the value of this attribute. As per dev guide i have attached the view link and for handling the Add New row event i am using the below code
    OAAdvancedTableBean sublineDetailsTableBean = (OAAdvancedTableBean) webBean.findChildRecursive("SublineAdvTableRN");
    OATableFooterBean sublineTableFooterBean = (OATableFooterBean) sublineDetailsTableBean.getFooter();
    if (sublineDetailsTableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    This is working fine. The challenge i am facing is for creating a new row. Below is the code given in dev guide
    // get a handle to inner tableOATableBean innerTable =
    (OATableBean)webBean.findChildRecursive("InnerTableBean");
    // create an enumeratorOAInnerDataObjectEnumerator enum =
    new OAInnerDataObjectEnumerator(pageContext, innerTable);
    while (enum.hasMoreElements())
    RowSet innerRowSet = (RowSet) enum.nextElement();
    // get all rows
    Row []rowsInRange = innerRowSet.getAllRowsInRange();
    for (int i = 0; i < rowsInRange.length; i++)
    Row nextRow = (Row) rowsInRange;
    // In case you want to add new rows in this RowSet, you can do the same
    OARow newRow = (OARow) innerRowSet.createRow();
    // initialize value for some attribute and insert the row
    newRow.setAttribute("SomeAttr", "SomeValue");
    innerRowSet.insertRow(newRow);
    The Above code creates a new Row in all the master records.
    How do i identify that the add new Row event has been triggered for which master record?
    Can any body please help me on this. I am stuck from a long time and am unable to find the appropriate solution.
    Thanks in advance
    Raj Papdeja

    Hi,
    Following is the code written in PFR,
    OAAdvancedTableBean sublineDetailsTableBean = (OAAdvancedTableBean) webBean.findChildRecursive("SublineAdvTableRN");
    System.out.println("sublineDetailsTableBean::"+sublineDetailsTableBean);
    OATableFooterBean sublineTableFooterBean = (OATableFooterBean) sublineDetailsTableBean.getFooter();
    System.out.println("lineTableFooterBean::"+sublineTableFooterBean);
    if (sublineDetailsTableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    System.out.println("Inside Add New Row Button Event for the Sub Lines");
    strValueParam = (String) pageContext.getParameter(VALUE_PARAM);
    System.out.println("strValueParam=>"+strValueParam);
    ViewLink vl = am.findViewLink("GEPSCSTaskLineToSublineVL1");
    System.out.println("View Link=>"+vl);
    if(vl != null)
    OAViewObject vo = (OAViewObject) vl.getSource();
    if(null != vo)
    GEPSCSTaskLineItemsVORowImpl voRow =
    (GEPSCSTaskLineItemsVORowImpl) vo.getCurrentRow();
    Number LineNo = voRow.getLineNo();
    System.out.println("Source Row Line No::"+LineNo);
    /*OAViewObject vo = (OAViewObject) am.findViewObject("GEPSCSTaskLineItemsVO1");
    GEPSCSTaskLineItemsVORowImpl voRow = (GEPSCSTaskLineItemsVORowImpl) vo.getCurrentRow();
    Number LineNo = voRow.getLineNo();
    System.out.println("Line No::"+LineNo);*/
    // Getting the LineNo as null
    /*int intRowCount = vo.getRowCount();
    if(intRowCount > 0)
    System.out.println("Sublines are already present");
    GEPSCSTaskLineItemsVORowImpl tasklineVORow =
    (GEPSCSTaskLineItemsVORowImpl)vo.getCurrentRow();
    Number lineNo = (Number) tasklineVORow.getLineNo();
    System.out.println("LineNo=>"+lineNo);
    Number lastLineDispSequence = null;
    // Method to set the display sequence
    //am.invokeMethod("createNewSublineRow");
    // create an enumerator*/
    OAInnerDataObjectEnumerator enum =
    new OAInnerDataObjectEnumerator(pageContext, sublineDetailsTableBean);
    while (enum.hasMoreElements())
    RowSet innerRowSet = (RowSet) enum.nextElement();
    // get all rows
    Row []rowsInRange = innerRowSet.getAllRowsInRange();
    intRowCount = rowsInRange.length;
    System.out.println("intRowCount=>"+intRowCount);
    if(intRowCount == 0)
    System.out.println("No Rows present");
    OARow newRow = (OARow) innerRowSet.createRow();
    // initialize value for some attribute and insert the row
    newRow.setAttribute("DisplaySequence", new Number(1));
    innerRowSet.insertRow(newRow);
    else if(intRowCount > 0)
    System.out.println("Rows are already present");
    Row nextRow = (Row) rowsInRange[intRowCount-1];
    lastLineDispSequence = (Number) nextRow.getAttribute("DisplaySequence");
    OARow newRow = (OARow) innerRowSet.createRow();
    // initialize value for some attribute and insert the row
    newRow.setAttribute("DisplaySequence", new Number(lastLineDispSequence.intValue()+1));
    innerRowSet.insertRow(newRow);
    break;
    When i try to fetch the Line No which is the primary ID of the Parent VO, it always returns me the LineNO of the first Row and not of the parent row for which i have clicked the Add new Subline button of the Child record
    Number LineNo = voRow.getLineNo();
    System.out.println("Source Row Line No::"+LineNo);
    Is there any way to fetch the primary ID of the row for which i have selected the Add new Subline button
    Thanks
    Raj Papdeja

  • Does the advanced queue support setting the pay load type as array/table?

    Does the advanced queue support setting the pay load type as array/table?
    if yes, how to write the enqueue script, I tried to write the following the script to enqueue, but failed, pls help to review it . Thanks...
    ------Create payload type
    create or replace TYPE "SIMPLEARRAY" AS VARRAY(99) OF VARCHAR(20);
    ------Create queue table
    BEGIN DBMS_AQADM.CREATE_QUEUE_TABLE(
    Queue_table => 'LUWEIQIN.SIMPLEQUEUE',
    Queue_payload_type => 'LUWEIQIN.SIMPLEARRAY',
    storage_clause => 'PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 TABLESPACE USERS',
    Sort_list => 'ENQ_TIME',
    Compatible => '8.1.3');
    END;
    ------Create queue
    BEGIN DBMS_AQADM.CREATE_QUEUE(
    Queue_name => 'LUWEIQIN.SIMPLEQUEUE',
    Queue_table => 'LUWEIQIN.SIMPLEQUEUE',
    Queue_type => 0,
    Max_retries => 5,
    Retry_delay => 0,
    dependency_tracking => FALSE);
    END;
    -------Start queue
    BEGIN
    dbms_aqadm.start_queue(queue_name => 'LUWEIQIN.SIMPLEQUEUE', dequeue => TRUE, enqueue => TRUE);
    END;
    -------Enqueue
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    ------Get error
    Error starting at line 1 in command:
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    Error report:
    ORA-06550: line 17, column 3:
    PLS-00306: wrong number or types of arguments in call to 'ENQUEUE'
    ORA-06550: line 17, column 3:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause: Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    but when I use the following script to enqueue get error. Pls help to review. Thanks...
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    ------Get error
    Error starting at line 1 in command:
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    Error report:
    ORA-06550: line 17, column 3:
    PLS-00306: wrong number or types of arguments in call to 'ENQUEUE'
    ORA-06550: line 17, column 3:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause: Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do I set the value of a dynamic row text field

    I have a repeated row form which contains a button and multiple text fields.  There is a text field (Input Data Field) further up with some information I want to place in the table and multiple buttons that I want to read the value of and set to the table.  I apologize there are multiple questions I have and I am using pseudocode to describe it.
    Top form looks like
    InputField
    | ButtonX1 | ButtonY1 | DescriptionX1 (read only Text Field)
    | ButtonXn | ButtonY1 | DescriptionXn
    OutputRow looks like
    | ButtonOutput | OutputField1 | OutputField2 | OutputField3 |
    So I would like it to do
    ButtonX1.click
    OutputTable.OutputRow.addInstance(true)  //this works - everything else I have questions on
    OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue
    Question 1
    How do I address the location in each table to set a value
    Question 2
    How do I get the value of the description field in the same table and row as the button
    I would like to say something to the effect of  OutputTable.OutputRow[??].OutputField1.rawValue = this.parent.DescriptionX
    OutputTable.OutputRow.OutputField2 = InputField.rawValue
      Same question as above - how do I specify a dynamic row - is this the proper syntax for getting the value from the input field?
    OutputTable.OutputRow.OutputField3 = this.ButtonLabel
    Question 3
      How can I get the value of the button's label to set in the field
      There should be very many of these buttons and buttons will be added - I would prefer to set the value based on the button's label to make the value easier - not requiring changing the code
    Question 4 - unrelated to those above.
    Is it possible to build the first table
    | ButtonX | ButtonY | Description |
    from an XML File.  I have seen examples of how to build if it is just data, but can the XML be pushed into a form with code to do the above actions?

    Each object in a form must have a unique name. I doing so it is not neccessarily the name but the path or SomExpression associated with that object that must be unique. In your case you have a Table.Row.object configuration. The Row is the part that is repeating so to give each object a unique name an instance number is placed on the repeating part. So objects in the 1st row woudl be Table.Row[0].object...objects in the second row woudl be Table.Row[1].object etc .....You can see this by adding a debug instruction on the Enter event of the description field. Put the code app.alert(this.somExpression) and when you enter the field you will see what the somExpression is. Do this for a few rows and you will see the pattern (don't forget to remove the debug code from the enter event). Now you know what you have to use to address the fields. If no instance is given it is assumed to be 0 ..that is why only the 1st row is being affected.
    So now to answer your questions:
    Question1: The square bracket notation is an issue for javascript (this is the notation for an array) so we have to use a different means of addressing the field to include the instance number. So to address the Description in the 3rd row we woudl use:
    xfa.resolveNode("Table.Row[2].Description").rawValue = "This is my new description";
    Note that the instance number is 2 for the 3rd row because the instance numbers are 0 based.
    Question2. The resolveNode notation allows you to pass a string so you can also concatinate expressions to make the string. If you are writing code on a button in the same row you can get the instance that you are on by using the expression this.parent.index. The "this" portion refers to the current object (the button) and the parent.index gets you th eindex of the Buttons parent. If the button is embedded deeper in a hierarchy then you can continue to add parent indicators until you get back to the node that you want. So rewriting your expression from Q1 it woudl be:
    xfa.resolveNode("Table.Row[" + this.parent.index + "].Description").rawValue = "This is my new description";
    Question3: The buttons caption can be retrieved by using ButtonName.caption.value.text.value
    Question4: When you say build from an XML file. What are you expecting to come from the XML file? The caption that goes on the button? Typically the XML file carries data (not to say that it cannot carry other things). Just need a bit of clarification on this one first.
    Hope that helps
    Paul

  • Add button on seeded Advanced Table, to catch the person_id to generate xml report

    Hi All,
    We are having a requirement to generate pdf report from seeded page.
    And we kind a hit dead end. So was really looking for any inputs or insights.
    We personalized page to add a column with a button in it. We used javascript
    in destination URI to catch the event in PFR.
    javascript:submitForm('DefaultFormName',1,{'xxdbPrintPDF':'YES'});
    All is good until this point. But the EVEN_SOURCE_ROW_REFERENCE is showing as null, when we hit that
    personalized button on page. Where as it is giving right values if clicked on other seeded items in table.
    And each row has a distinct person_id. We need handle to person_id to generate that person specific report.
    Any thoughts would be greatly appreciated.
    Thanks
    Hari

    Forgot to mention earlier. Vacancy page has advanced table listing all the applicants applied.
    We need button across each applicant(i.e in each row). And when we hit that button, if we can get person_id.
    We can use that in whereclauseparams() to get specific rows for xml report.
    Tried to create button programmatically, and still not able to retrieve row number/person id
    PR code
        public void processRequest(OAPageContext oapagecontext,
                                   OAWebBean oawebbean) {
            super.processRequest(oapagecontext, oawebbean);
            OAAdvancedTableBean unUsedCCTxnsTable =
                (OAAdvancedTableBean)oawebbean.findIndexedChildRecursive("ApplicantQueryRegion");
            if (unUsedCCTxnsTable !=
                null) //If not able to find the table, skip the process
                //Create new column Category to the table
                OAColumnBean categoryCol =
                    (OAColumnBean)createWebBean(oapagecontext, COLUMN_BEAN, null,
                                                "XxcfiCategoryColumn1");
                OASortableHeaderBean column1Header =
                    (OASortableHeaderBean)createWebBean(oapagecontext,
                                                        SORTABLE_HEADER_BEAN, null,
                                                        "XxcfiCategoryColumn1Header1");
                column1Header.setText("Category");
                categoryCol.setColumnHeader(column1Header);
                // Create the actual leaf item under the first column
                OAMessageStyledTextBean leaf1 =
                    (OAMessageStyledTextBean)createWebBean(oapagecontext,
                                                           MESSAGE_STYLED_TEXT_BEAN,
                                                           null,
                                                           "XxcfiCategoryColumnLeaf1");
                leaf1.setViewAttributeName("AplPersonId");
                categoryCol.addIndexedChild(leaf1);
                unUsedCCTxnsTable.addIndexedChild(categoryCol);
                //add submitbutton
                 //Create new column Category to the table
                 OAColumnBean categoryCol1 =
                     (OAColumnBean)createWebBean(oapagecontext, COLUMN_BEAN, null,
                                                 "XxcfiCategoryColumn2");
                 OASortableHeaderBean column1Header1 =
                     (OASortableHeaderBean)createWebBean(oapagecontext,
                                                         SORTABLE_HEADER_BEAN, null,
                                                         "XxcfiCategoryColumn1Header2");
                 column1Header.setText("PDF");
                 categoryCol.setColumnHeader(column1Header);
                OASubmitButtonBean submitButton =(OASubmitButtonBean)createWebBean(oapagecontext,
                OAWebBeanConstants.BUTTON_SUBMIT_BEAN, null, "submitButton");
                submitButton.setViewAttributeName("AplPersonId");
                unUsedCCTxnsTable.addIndexedChild(submitButton );
    PFR code
        public void processFormRequest(OAPageContext pageContext,
                                       OAWebBean webBean) {
            OAApplicationModule appModule =
                pageContext.getApplicationModule(webBean);
            OAViewObject vo =
                (OAViewObject)appModule.findViewObject("ApplicantListVO");
            oracle.jbo.domain.Number num = null;
            if (vo != null) {
                OARow row = (OARow)vo.getCurrentRow();
                if (row != null) {
                    num =
    (oracle.jbo.domain.Number)row.getAttribute("AplPersonId");
            throw new OAException("Button Clicked by HM " + num.toString() +
                                  "-----" +
                                  pageContext.getParameter("XxcfiCategoryColumnLeaf1") +
                                  "-----" +
                                  pageContext.getParameter("submitButton") +
                                  "-----" +
                                  (String)pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE),
                                  OAException.ERROR);
    Any ideas will be of great help
    Thanks

  • How set the values programatically in custom tables ?

    Hi Guru's,
    Please help me where i did mistake....
    My scenario is i have 4 columns that 4 columns are look up based on row i need save the "XX_hr_Vacancies_CompTab"
    4 columns look like....
    column1(15 questions ) column2(message choice) column3(message choice) column4(free text)
    (1-15)question manually select (1-10) manually select (1-10) comments
    this vo purpose i am using this query
    SELECT ROWNUM,
    xhv.VACANCY_ID
    , xhv.RFP_NO
    , hl.lookup_code
    , hl.meaning
    , XJCT.BUHR_RATING
    , XJCT.COMBEN_RATING
    , XJCT.RATIONALE
    FROM hr_lookups hl ,
    xx_hr_vacancies xhv,
    XX_JOBEVAL_COMP_TAB XJCT
    WHERE lookup_type = 'XX_JE_QUESTIONAIRE'
    AND xhv.RFP_NO = 'IRC616'
    AND XJCT.VACANCY_ID(+) = XHV.VACANCY_ID
    ORDER BY ROWNUM
    I am using sample code is for one column inserting.....please help where i am doing mistake.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("createjobVacancy1");
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if (pageContext.getParameter("Save") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject vacncyVO = (OAViewObject)am.findViewObject("XXTableLookupVO1");
    int fetchedrowcount = vacncyVO.getRowCount();
    RowSetIterator multiIter;
    multiIter = vacncyVO.createRowSetIterator("VacancyId");//Attribite of the select box
    multiIter.setRangeStart(0);
    multiIter.setRangeSize(fetchedrowcount);
    System.out.println("no before for loop condition rows"+fetchedrowcount);
    for(int i=0;i<fetchedrowcount;i++)
    am.invokeMethod("createjobVacancy1");
    OAViewObject vacncyVO1 =
    (OAViewObject)am.findViewObject("XX_hr_Vacancies_CompTab_EOVO1");
    Object vacancy = vacncyVO.getRowAtRangeIndex(i).getAttribute("VacancyId"); */*63 Line code is this one*/*
    System.out.println("vacancy number is in table region current row is "+vacancy);
    System.out.println("no or rows"+fetchedrowcount);
    if(vacancy != null && !"".equals("vacancy"))
    vacncyVO1.getCurrentRow().setAttribute("VacancyId",vacancy);
    System.out.println("set create vacancy number is in table region current row is "+vacancy);
    }else{
    vacncyVO1.getCurrentRow().setAttribute("VacancyId",null);
    am.invokeMethod("apply1");
    System.out.println("out of for loop :"+fetchedrowcount);
    Sop:
    13/01/10 06:55:28 no before for loop condition rows15
    13/01/10 06:55:29 Header is =725
    13/01/10 06:55:30 vacancy number is in table region current row is 616
    13/01/10 06:55:30 no or rows15
    13/01/10 06:55:30 set create vacancy number is in table region current row is 616
    13/01/10 06:55:30 Header is =726
    Error:
    ## Detail 0 ##
    java.lang.NullPointerException
    at xxsup.oracle.apps.per.jobevaluation.webui.MainCO.processFormRequest(MainCO.java:63)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
    Regards,
    Srinivas

    Thanks Keerthi,
    i am getting values but i unable to set the values, once i am setting values i am facing null pointer exception ..
    java.lang.NullPointerException
         at xxsup.oracle.apps.per.jobevaluation.webui.MainCO.processFormRequest(MainCO.java:86)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
    i am using below coding in PFR
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if (pageContext.getParameter("Save") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject oaviewobject =(OAViewObject)am.findViewObject("XXTableLookupVO1");
    if(oaviewobject!=null)
    pageContext.writeDiagnostics(this,"View Object is exists",OAFwkConstants.STATEMENT);
    int rowcountValue = oaviewobject.getRowCount();
    pageContext.writeDiagnostics(this,"Row returned by the View Object"+rowcountValue,OAFwkConstants.STATEMENT);
    System.out.println("before for loop geting values = "+rowcountValue);
    Row rowAdv= oaviewobject.first();
    RowSetIterator iterator = oaviewobject.createRowSetIterator("iterator");
    iterator.setRangeStart(0);
    iterator.setRangeSize(oaviewobject.getRowCount());
    for(int i=0; i<iterator.getRowCount(); i++)
    pageContext.writeDiagnostics(this,"Inside For loop ",OAFwkConstants.STATEMENT);
    rowAdv =iterator.getRowAtRangeIndex(i);
    if(rowAdv != null)
    pageContext.writeDiagnostics(this,"flag not null",OAFwkConstants.STATEMENT);
    pageContext.writeDiagnostics(this,"Flag Value Checked as Y",OAFwkConstants.STATEMENT);
    OAViewObject vacncyVO1 =
    (OAViewObject)am.findViewObject("XX_hr_Vacancies_CompTab_EOVO1");
    if(rowAdv.getAttribute("VacancyId")!=null)
    Object vacancyname = rowAdv.getAttribute("VacancyId").toString();
    vacncyVO1.getCurrentRow().setAttribute("VacancyId",vacancyname); This is the 86 line
    System.out.println("Vacancy ID IS = "+vacancyname);
    System.out.println("Vacancy ID IS = "+rowAdv);
    am.invokeMethod("apply1");
    // System.out.println("out of for loop :"+iterator);
    please help me where i am doing mistake...
    Regards,
    Srinivas

  • How to set the value of an array element (not the complete array) by using a reference?

    My situation is that I have an array of clusters on the front panel. Each element is used for a particular test setup, so if the array size is three, it means we have three identical test setups that can be used. The cluster contains two string controls and a button: 'device ID' string, 'start' button and 'status' string.
    In order to keep the diagrams simple, I would like to use a reference to the array as input into a subvi. This subvi will then modify a particular element in the array (i.e. set the 'status' string).
    The first problem I encounter is that I can not select an array element to write to by using the reference. I have tried setting the 'Selection s
    tart[]' and 'Selection size[]' properties and then querying the 'Array element' to get the proper element.
    If I do this, the VI always seems to write to the element which the user has selected (i.e. the element that contains the cursor) instead of the one I am trying to select. I also have not found any other possible use for the 'Selection' properties, so I wonder if I am doing something wrong.
    Of course I can use the 'value' property to get all elements, and then use the replace array element with an index value, but this defeats the purpose of leaving all other elements untouched.
    I had hoped to use this method specifically to avoid overwriting other array elements (such as happens with the replace array element) because the user might be modifying the second array element while I want to modify the first.
    My current solution is to split the array into two arrays: one control and one indicator (I guess that's really how it should be done ;-) but I'd still like to know ho
    w to change a single element in an array without affecting the others by using a reference in case I can use it elsewhere.

    > My situation is that I have an array of clusters on the front panel.
    > Each element is used for a particular test setup, so if the array size
    > is three, it means we have three identical test setups that can be
    > used. The cluster contains two string controls and a button: 'device
    > ID' string, 'start' button and 'status' string.
    >
    > In order to keep the diagrams simple, I would like to use a reference
    > to the array as input into a subvi. This subvi will then modify a
    > particular element in the array (i.e. set the 'status' string).
    >
    It isn't possible to get a reference to a particular element within an
    array. There is only one reference to the one control that represents
    all elements in the array.
    While it may seem better to use references to update
    an element within
    an array, it shouldn't really be necessary, and it can also lead to
    race conditions. If you write to an element that has the
    possibility of the user changing, whether you write with a local, a
    reference, or any other means, there is a race condition between the
    diagram and the user. LV will help with this to a certain extent,
    especially for controls that take awhile to edit like ones that use
    the keyboard. In these cases, if the user has already started entering
    text, it will not be overwritten by the new value unless the key focus
    is taken away from the control first. It is similar when moving a slider
    or other value changes using the mouse. LV will write to the other values,
    but will not rip the slider out of the user's hand.
    To completely avoid race conditions, you can split the array into user
    fields and indicators that are located underneath them. Or, if some
    controls act as both, you can do like Excel. You don't directly type
    into the cell. You choose w
    hich cell to edit, but you modify another
    location. When the edit is completed, it is incorporated into the
    display so that it is never lost.
    Greg McKaskle

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Hide multiple rows in a dynamic table based on the row value.

    Hi,
    I need to hide multiple rows in a dynamic table based on the specific value of that row.
    I cant find the right expression to do that.
    please help

    Go to the Row Properties, and in the Visibility tab, you have "Show or hide based on an expression". You can use this to write an expression that resolves to true if the row should be hidden, false otherwise.
    Additionally, in the Matrix properties you should take a look at the filters section, perhaps you can achieve what you wish to achieve through there by removing the unnecessary rows instead of just hiding them.
    It's only so much I can help you with the limited information. If you require further help, please provide us with more information such as what data are you displaying, what's the criteria to hiding rows, etc...
    Regards
    Andrew Borg Cardona

  • HT3180 setting date and time - my apple tv get stuck and says it needs to set the network date and time.  Does anyone know how to do this?

    My apple tv gets stuck and says it need to set the date and time on the network.  Does anyone know how to do this?

    I was able to get my Apple TV working again by downgrading the firmware following the instructions in this message:
    https://discussions.apple.com/message/20008613#20008613
    In case that message disappears, here's my translation:
    1. Connect your Apple TV to your computer via USB. Don't plug in the power cable.
    2. Download the older 5.0.2 firmware from Apple here:
    5.0.2 (Apple TV 2): AppleTV2,1_5.0.2_9B830_Restore.ipsw
    5.0.2 (Apple TV 3): AppleTV3,1_5.0.2_9B830_Restore.ipsw
    3. Open iTunes and select the Apple TV. Hold down the option key and press the restore button at the same time.
    4. In the dialog that opens select the firmware that you downloaded.
    5. The restore process will take a few minutes. Once it's done plug your Apple TV back into your TV. If the date and time message persists just press the menu button to skip it. This got mine working again.

Maybe you are looking for

  • Need help on configuration in 1:N mapping

    hi experts, i doing idoc to multiple file scenario,.... using 1:N multimapping without BPM... i am following the bolg https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3115... [original link is broken] [original link is broken] [original link is

  • How to delete keywords from more than one image at once?

    Is there any way to delete all the keywords from a selected group of images all at once? I've selected a group of images, but when I delete the keywords, it only deletes them from the highlighted (targeted?) image and not from the other selected imag

  • Current week/current Month/YTD data based on user response

    Hi I have one attribute request_created_date Based on this i want to create one more attribute which will have lovs as week(Request_created_date for current week),monthly(Request_created_date for current week), YTD(Request_created_date for current ye

  • Update nokia 5800 Express music problem

    Hi all! I wanted to Update my nokia using NSU and all i get is this: "No software updates available for your phone Please note that your mobile service provider, operator or carrier may not have approved the latest Nokia device firmware available." A

  • Non supported character set: oracle-character-set-46??? - pls help!

    Hello, I'm running Hello World example. Could you please help me to resolve "Non supported character set: oracle-character-set-46" error i got?!?! This seems to be nls_character problem but somehow i can't figure out what and where should be changed