Insert transaction multiples

Hi all

I have a first page that is transferred to a second page, two accounting values.

The second page has 4 elements associated with certain attributes of vo and a door to submit

Two of these elements have their value already set with 2 values, I had after the attacker

The user must enter the value of the other two.

When the user clicks on the button submit, the record is inserted.

What I want is: after the record is inserted, I want to insert a second, the first two points must retain their values because they have been defined, and the user will enter a two different values for two items left.

The user can repeat as much as he wants.

In the AM, I have these two methods:

    public void insertMethod(String item2Value, String item1Value){
  
        OAViewObject vo = getRejetVO1();
        vo.setWhereClause(null); 
        vo.setWhereClauseParams(null); 
        vo.setWhereClause("1=2"); 
        vo.executeQuery(); 
       
           
         
                 RejetVORowImpl rejetVORow;   
                 rejetVORow = (RejetVORowImpl)vo.createRow();
  
                 rejetVORow.setValue1(item1Value); 
                 rejetVORow.setValue2(item2Value);
                
            
                 vo.insertRow(rejetVORow);  
             }

        public void apply()
        {
          getTransaction().commit();
                   
        }

in the processRequest of CO, I invoke the insert method

in the processFormRequest of CO, I invoke the apply method

When I click the button submit, the first record is inserted.

now, when I want to create the second, if I just change the value of the last two items and click again on the button submit, the second disc is not inserted, but one is changed instead. I guess its because I need to call again this "insertMethod. But I don't know where.

I should call him again after the submit button is clicked?

Or should I do a forward on the same page?

In both cases, whenever I add the code after the am.invokeMethod (apply) in the processFormRequest, I get this error: declaration non-reachable

Can someone please suggest me a solution for this problem?

Thank you

Try this:

PR:

     public void processRequest(OAPageContext pageContext, OAWebBean webBean)
     {
         super.processRequest(pageContext, webBean);  

         String pidfacture = (String)pageContext.getParameter("pidfacture") ;
         String pidaction = (String)pageContext.getParameter("pidaction");

         // invoke methode
         Serializable parameters[] = {pidfacture, pidaction};
         Class paramTypes[] = {String.class, String.class};
         am.invokeMethod("insertRejet",parameters, paramTypes);  

         pageContext.putTransactionValue("PIDfacture",pidfacture);
         pageContext.putTransactionValue("PIDaction",pidaction);
      }  

PFR

OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
super.processFormRequest(pageContext, webBean);
if(pageContext.getParameter("addSubmitButton")!=null){                      

  am.invokeMethod("apply");  

  String pidfacture = (String) pageContext.getTransactionValue("PIDfacture");
    String pidaction  = (String)pageContext.getTransactionValue("PIDaction");

  // invoke methode
  Serializable parameters[] = {pidfacture, pidaction};
  Class paramTypes[] = {String.class, String.class};
  am.invokeMethod("insertRejet",parameters, paramTypes);
  }

Tags: Oracle Applications

Similar Questions

  • Insert/update multiple checkbox values in a table

    Hi all
    I've created an interactive report with boxes in it.

    Looks like my request,
    step 1: user will give its ID in a text box and click on 'submit' that redirects to the page of IR who got the boxes
    step 2: IR report displays all armies and access levels for as long as two of its columns
    step 3: If the user checks on some IR box, these environments individuals and levels of access (can be multiple environments and access levels) for this particular ID should get inserted into a table.

    I created an application of model to http://apex.oracle.com/pls/apex/f?p=71510:20 (wokspace:test_me, username = test, paswrd: apex14gm)

    I found this forum too, https://forums.oracle.com/thread/2387391?start=0 & tstart = 0. But I am confused on how to apply!


    How to get there?

    Pls help me...

    Thanks in advance

    Hi Kanishkaa,

    My blog is about what you are trying to achieve:

    http://blog.iAdvise.EU/2013/06/12/checkboxes-in-editable-reports-in-apex/

    Kind regards

    Joni

  • How can I insert a multiple page PDF into a Word doc?

    Hello

    I'm trying to insert a PDF file that has multiple pages to her in a MS Word doc.

    I use Adobe Acrobat WI Pro and Word 2010.

    I followed the path of insertion - object - Adobe Acrobat Document, but I only get the first page of the PDF file.

    Appreciate any help you have.

    life

    What you have described is the expected behavior. This is how applications MS Office insert - functions of the object for the PDF files.

    To consume the full PDF we double click on the object (represented by the first page PDF). This indicates the operating system to start the application, the operating system associated with a PDF file.

    With Acrobat or Adobe Reader install one of them is what is usually this request.

    Yes, launching Acrobat, open the PDF file and restores it to the user.

    Of course, this PDF file must be available to the user and by the same road to link when the object has been placed in the Word file.

    Be well...

  • Several box insert as multiple records

    I'm relatively new to ColdFusion. It's the simplicity, as well as Dreamweaver insert/update/delete assistants, have helped build clean enough applications for database insertion, recovery and deletion and display.

    However, I have to be able to insert several selections of boxes as multiple records in a table, and I am running into problems. I guess this sort of thing is the premise of virtually any shopping cart out there, but I can't seem to find any good information on in my 'develop with CFMX manual' or my "Kit of Construction CFMX Web App" book or on the web also. (The only examples for the page of the form or the action page are a static box!)

    The basic premise of what I'm trying to achieve:

    The user is able to select different items in several boxes. (ITEM_ID)
    This selection is associated with the user. (CUSTOMER_ID)
    The selection is associated with a point in time as a year. (INSTANCE_ID)
    These identification numbers that must all be inserted in a 3 column table expecting integers for ITEM_ID CUSTOMER_ID and INSTANCE_ID

    Example of FORM values that would be passed: (147,148,149, 23445, 4) = (3 ITEM_IDs, CUSTOMER_ID and INSTANCE_ID)

    Typical error on presentation to insert action page: Number of columns in reading / writing does not equal the number of values (which is normal, I am gathering several values via checkboxes).

    How can I insert each box is selected as a separate record in the table?

    Such as:
    (147, 23445, 4)
    (148, 23445, 4)
    (149, 23445, 4)

    My Code:

    Form:

    < are method = "post" name = "form2" action = "process_form_action_page.cfm" >

    < table >

    < cfoutput query = "Stored_Procedure1" >

    < b >
    < td > < input type = "checkbox" name = "ITEM_ID" value = "#Stored_Procedure1.ITEM_ID #" > < table >
    #Stored_Procedure1.ITEM_TITLE # < td > < table >
    < /tr >

    < / cfoutput >

    < /table >

    < input type = "hidden" name = 'CUSTOMER_ID' value = '#CUSTOMERS. CUSTOMER_ID #">"
    < input type = "hidden" name = "INSTANCE_ID' value = '#INSTANCE. INSTANCE_ID #">"
    < input type = "submit" value = "Insert record" >

    < / make >


    «"" "Action page:»»"»


    < cfquery datasource = "ORDERS" >

    INSERT INTO PRODUCT_CUSTOMER (ITEM_ID, CUSTOMER_ID, INSTANCE_ID) VALUES)
    < cfif IsDefined "(FORM. ITEM_ID") AND #FORM. NEQ ITEM_ID # "" > "".
    #FORM. ITEM_ID #.
    < cfelse >
    NULL VALUE
    < / cfif >
    ,
    < cfif IsDefined "(FORM. CUSTOMER_ID') AND #FORM. NEQ CUSTOMER_ID # "" > "".
    #FORM. CUSTOMER_ID #.
    < cfelse >
    NULL VALUE
    < / cfif >
    ,
    < cfif IsDefined "(FORM. INSTANCE_ID") AND #FORM. QNE INSTANCE_ID # "" > "".
    #FORM. INSTANCE_ID #.
    < cfelse >
    NULL VALUE
    < / cfif >
    )

    < / cfquery >
    < / cfif >

    Thank you!

    I'm not not to take good advice. If I was a bit too "hard", I'm sorry... but at least I finally got a good response.

    I realized what I wanted anyway. (Sabaidee, yours was the closest answer you to what I later came up with.) Thanks for the effort, I appreciate it. I will certainly implement your logic of to check if the box is checked).

    What I came up with a solution:





    147
    148
    149



    INSERT INTO MyTABLE (CUSTOMER_ID, ITEM_ID, INSTANCE_ID)
    VALUES (' #Form.CUSTOMER_ID # "," #Form.INSTANCE_ID # "," #Checked_ITEM # ")

    If all of the check boxes are selected, the data is inserted as:

    147, 23445, 4
    148, 23445, 4
    149, 23445, 4

    (I realize that there is much more that can be embellished in the form page and the page of the processor).

  • The difference between delete and insert transactions

    Hello

    How can I tell the difference between delete and insert in a process using Apex 5.0

    Best regards

    OraDev wrote:

    In a presentation table when you click the "Delete" button checked the database update triggers trigger I do not know why

    Do you really mean 'database trigger', or are you referring to a process of page APEX? Ensure that the tabular form MRU delete process conditional on the button DELETE and that the MRU update process is conditional on the "SAVE" button.

  • a single insert for multiple insertions, if tables from same

    Hi all

    Can I have an insert for less than 3 Insert stm.
    declare 
    v_z number;
    begin
    v_z :=0.0;
    
    INSERT INTO rd_carry_new1
    SELECT  s.ssm_id,
         s.ssm_id as adjusted_cusip,
         v_z as rolldown, --= @zero,                      
         v_z as oas, --=@zero,                      
         nvl(srm.carry_rate, 0.0) as carry,
         v_z as finance_rate, --= @zero,                            
         v_z as price_drop, --= @zero,
         sw.heldby_pco_sw,
         v_z as carry_bk1, --= @zero,        -- place holders for interim results
         v_z as carry_bk2, --= @zero,
         'Y              ' AS r_srm_flag,     --r_srm_flag     = "Y              ", /*-- Indicates value from SRM, stale these should not be updated at any point*/
         'Y              ' AS o_srm_flag,     --o_srm_flag     = "Y              ",
         'Y              ' AS c_srm_flag,     --c_srm_flag     = "Y              ",
         'Y              ' AS f_srm_flag,     --f_srm_flag     = "Y              "
         'SRM' AS oas_method                         --,          oas_method='SRM'
    
    FROM  sec_tab_sdb s, 
      sr_measures srm,
      sec_sw sw
    WHERE s.ssm_id = srm.ssm_id
    AND   s.ssm_id = sw.ssm_id;
    
    
    insert into rd_finance_new1
    select  s.ssm_id,
         v_z as rolldown,                      
         v_z as oas,                      
         v_z as carry,                         
         nvl(srm.financing_rate,0) as finance_rate,     
         v_z as price_drop,
         sw.heldby_pco_sw,
         v_z as rolldown_bk1,        -- place holders for interim results
         v_z as rolldown_bk2,
         'SRM'  as finance_method, -- audit for financing_rate queries
         'Y              ' as r_srm_flag,    -- Indicates value from SRM, stale these should not be updated at any point
         'Y              ' as o_srm_flag,
         'Y              ' as c_srm_flag,
         'Y              ' as f_srm_flag
         
    from  sec_tab_sdb s, 
      sr_measures srm,
      sec_sw sw
    where s.ssm_id = srm.ssm_id
    and   s.ssm_id = sw.ssm_id;
    
    
    insert into  pco_on.rd_rolldown_new1
    select s.ssm_id,
            nvl(srm.rolldown,0) as rolldown,     
            v_z as oas,                      
            v_z as carry,                           
            v_z as finance_rate,                            
            v_z as price_drop,
            sw.heldby_pco_sw,
            v_z as rolldown_bk1,             -- place holders for interim results
            v_z as rolldown_bk2, 
            'Y              ' as r_srm_flag,   -- Indicates value from SRM, stale these should not be updated at any point
            'Y              ' as o_srm_flag,      
            'Y              ' as c_srm_flag,      
            'Y              ' as f_srm_flag,      
            'SRM'        as  rolldown_method
    
    from  sec_tab_sdb s, 
      sr_measures srm,
      sec_sw sw
    where s.ssm_id = srm.ssm_id
    and   s.ssm_id = sw.ssm_id;
    
    end;

    Try this please

    INSERT ALL
    INTO RD_CARRY_NEW1 VALUES
      (
        SSM_ID,
        ROLLDOWN,
        OAS,
        carry,
        finance_rate,
        price_drop,
        heldby_pco_sw,
        rolldown_bk1,
        rolldown_bk2,
        r_srm_flag,
        o_srm_flag,
        c_srm_flag,
        F_SRM_FLAG,
        rolldown_method
      )
    INTO RD_FINANCE_NEW1 VALUES
      (
        SSM_ID,
        ROLLDOWN,
        OAS,
        carry,
        finance_rate,
        price_drop,
        heldby_pco_sw,
        rolldown_bk1,
        rolldown_bk2,
        r_srm_flag,
        o_srm_flag,
        c_srm_flag,
        F_SRM_FLAG,
        rolldown_method
      )
    INTO PCO_OWN.RD_ROLLDOWN_NEW1 VALUES
      (
        SSM_ID,
        ROLLDOWN,
        OAS,
        carry,
        finance_rate,
        price_drop,
        heldby_pco_sw,
        rolldown_bk1,
        rolldown_bk2,
        r_srm_flag,
        o_srm_flag,
        c_srm_flag,
        F_SRM_FLAG,
        rolldown_method
      )
    SELECT s.ssm_id,
      NVL(srm.rolldown,0) AS rolldown,
      v_zero              AS oas,
      v_zero              AS carry,
      v_zero              AS finance_rate,
      v_zero              AS price_drop,
      sw.heldby_pco_sw,
      v_zero            AS rolldown_bk1,
      v_zero            AS rolldown_bk2,
      'Y              ' AS r_srm_flag,
      'Y              ' AS o_srm_flag,
      'Y              ' AS c_srm_flag,
      'Y              ' AS f_srm_flag,
      'SRM'             AS rolldown_method
    FROM sec_tab_sdb s,
      sr_measures srm,
      sec_sw sw
    WHERE s.ssm_id = srm.ssm_id
    AND s.ssm_id   = sw.ssm_id;
    
  • Insert into multiple tables; Enter the id of the first

    I apologize if this has been answered elsewhere, but I tried searching and got no results.

    I try inserting the contents of a form in two tables. After you insert fields in a table, I want to enter the id of the first table key in the second table with the other fields.

    I tried a few different things, including trying to use SCOPE_IDENTITY(), but just kept a lot of mistakes.
    The current version of my code works perfectly, * except for the fact that it does not insert the ID *!

    Can someone tell me what I am doing wrong? or offer another way to do this?
    Thanks for your help, as usual.

    Very well! I got it to work. Thank you very much! Here's what I ended up doing (I write just the code for INSERTs). I'll play with cfqueryparam some more later - thanks a lot for the valuable info!

  • insert into multiple tables by using select in stored procedure

    I use oracle 10g R2. I want to insert records in two tables by using a select query (insert into tablename select...) in a stored procedure. How can I insert records into a table two at the same time using a select statement?

    My second question is also related to the first... can I use mechanism clustering here because the two tables are based on the same structure and data? One contains data from 24 hours and there are records of 10 days.

    Thank you.

    If you find the answer of Aman as useful/correct, please mark her answer respectively and close the debate. I think his answer is correct as always / a lot of time.

    Concerning
    Girish Sharma

  • Insertion of multiple values in the report (not in the database)

    Hello!

    I have a procedure that shows example of 50 people and for each text element three different person I access values and submit to the database. There is a check box for each line. I have a selection list of Pentecost that you choose the column and a text element where you enter the value to insert. What I want to do is insert this value just in the lines that have a selected check box. I would like to insert this value just in the report (not in the database) when I click on a button.

    What do I have to use javascript? I really have no idea how to do that.

    Thanks for any help!

    This will give you an idea on how to handle the selected lines:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:95

    Other examples show how to use tabular forms.

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • How do insert you multiple background Images on different key images into Flash Professional?

    Say if I have 50 images in my library, and I want to have every image on another keyframe in an animation, is there a way to put each image on a different keyframe without drag / drop? If so, how?

    Rename the external images, then perform an import to the stadium. This is the point at which Flash will offer to import a sequence. You will not have to distribute to keyframes.

  • Treatment of multiple Web site Transactions.

    Hello experts that my question is not really related to a particular problem, but more from the perspective of the right approach. I have a site that will insert transactions in a table and then calling a procedure to process transactions. My question is simple how to prevent transactions to intermingle. In other words, every transaction comes in full and I want to keep each transaction separated from each other. Now I read on the locks on tables and row locks, but I'm not sure that's the answer. You guys can give me a few pointers, tips or books that I can read on handling operations. My fear is that if two transactions are at the exact same time a person could get the answer from another session of web of people. Simply because they share the same table.

    All the answers on this subject would be most appreciated.

    Thanks in advance.

    Miguel

    Hello

    Rows inserted into the table 'downtime' have a primary or unique key? If so, then the stored procedure would be to use this key to make them a 'transaction' is treated at a time. If there is no unique key natural then a surrogate key (I usually advised a sequence) could be used.

    My apologies if I have misunderstood the situation here!

    Kind regards

    Mark

  • Error log can be used with multi table insert?

    I mean I want to insert into multiple tables and errors in the log for each table. Would this be possible?

    I tried something like below:

    in zzz_party)

    name,

    party_type,

    domicile_ctry_id

    ) (the values

    case

    Where rn = null then 14

    other name

    end,

    party_type,

    domicile_ctry_id

    ) Journal of log errors in zzz_err_party ("INS1")

    reject limit unlimited

    in zzz_party2)

    name,

    party_type,

    domicile_ctry_id

    ) (the values

    name,

    case

    Where rn = null then 14

    of other party_type

    end,

    domicile_ctry_id

    )

    Error log of journal zzz_err_party2 ("INS1")

    reject limit unlimited

    Select name, legal_name.

    case

    Where rownum = null then 14

    of other party_type

    end

    -t.domicile_ctry_id, rownum rn

    advantage t

    WHERE name like 'A %' and rownum < = 100

    ;

    And it does not work.

    Is there a way to do what I thought without having a separate select insert for each table with its own errors in the log?

    Whenever you have an error message the complete error message. "It doesn't work" is not an error message that others can understand.

    Looking in your statement, there are some flaws of syntax. I have fixed the. Try this

    insert all
    into zzz_party
    (
      name
    , party_type
    , domicile_ctry_id
    )
    values
    (
      case when rn=14 then  null else  name end
    , party_type
    , domicile_ctry_id
    )
    log errors into zzz_err_party ('ins1') reject limit unlimited
    into zzz_party2
    (
      name
    , party_type
    , domicile_ctry_id
    )
    values
    (
      name
    , case when rn=14 then null else party_type end
    , domicile_ctry_id
    )
    log errors into zzz_err_party2 ('ins1') reject limit unlimited
    select name
         , legal_name
         , case when rownum=14 then null else party_type end party_type
         , t.domicile_ctry_id
         , rownum rn
      from party t
     where name like 'A%'
       and rownum<=100;
    
  • Problem with Multiple Choice Quiz

    I tried several times to insert a multiple choice quiz success in my slides. The problem is that when I try to take the quiz (for a preview), I have to click several times and wait several boxes pop up coming (correct, click anywhere; incorrect, etc.). All these boxes pop up show before he let me go to the next slide. Anyone know what I need to change?

    Are you found using the preview feature in presenter or switch to slide show view (F5) in PPT? Looks like you're watching just PPT presentation, who must play through all the animations on the slide.

    You see the same questions if you publish the presentation on site and view the published version?

  • Insertion of several subforms instances with app.response on the click event.

    I could use help untangle this click event. I can't make it work the way I need too. I tried a few different variations without success. The part I have a problem with is in the loop and inserting multiple copies based on the user input to the app.response event. I have a script version that works with no loop, but who will not allow the insertion of multiple instances of the subform feature. Would appreciate any help on how I can do this.

    var cChoice = app.popUpMenu ("Add a blank section", "Copy this section", "-", "Delete this section");

    If (cChoice == 'Add a blank section') {}

    ACT.instanceManager.addInstance (1)

    } Else if (cChoice == "Delete this section") {}

    ACT.instanceManager.removeInstance (this.parent.instanceIndex)

    } Else if (cChoice == "Copy this section") {}

    var cResponse = app.response ("the number of instances of the section you want to insert?", ["copy current section"])

    }

    If (cResponse is nothing)

    {

    App.Alert ("no copy of this section was inserted because of a response zero.");

    }

    on the other

    {

    var i = ACT.instanceIndex

    var j = 0

    while(j<cResponse) do

    {

    _ACT.addInstance (1)

    xfa.resolveNode ("form1. Subform1.Act ["+ (i + 1) +"]. . RawValue row1. TextField") = xfa.resolveNode (" form1.. ") RawValue Subform1.Act.row1.TextField")

    Hello

    You code got a little truncated, but maybe something like;

    var cChoice = app.popUpMenu ("Add a blank section", "Copy this section", "-", "Delete this section");

    If (cChoice is "Add a blank section")

    {

    ACT.instanceManager.addInstance (1)

    }

    on the other

    If (cChoice is "Delete this section")

    {

    ACT.instanceManager.removeInstance (this.parent.instanceIndex)

    }

    Else if (cChoice == "Copy this section")

    {

    var cResponse = app.response ("the number of instances of the section you want to insert?", ["copy current section"])

    If (cResponse is nothing)

    {

    App.Alert ("no copy of this section was inserted because of a response zero.");

    }

    on the other

    {

    var i = ACT.instanceIndex

    var j = 0

    While (j<>

    {

    Var _ACT.addInstance = Act (1)

    Act. Row1.TextField.RawValue = xfa.resolveNode ("form1..") RawValue Subform1.Act.row1.TextField")

    j ++ ;

    }

    }

    }

  • Set the value of the transaction no. next value when the date is same

    Hello

    I use Oracle Apex 4.2.1 and oracle 11 g 2

    My table with three column trncd, trndate, trnno

    My question is when I am inserting 1st transaction on today's date, then trnno the value 1

    and the next time I insert another transaction on the same date value can trnno automatically set to 2

    next transaction same trnno is 3

    and then another date as trnno begins on the 1.

    Any idea?

    Thank you and best regards,

    Leave.

    Hi, go,

    I created the page #5 as a copy of the #3 Page in your application... The process an insert created and it works... need to create update processes... Go, now there is no need to have "Transaction/day number" field on the right.

    Do you want to save its value what we are entering this area. currently my process does not have this value according to your requirement.

    When I 1st insert transaction on today's date and then trnno has 1

    and the next time I insert another transaction on the same date value can trnno automatically set to 2

    next transaction same trnno is 3

    and then another date as trnno begins on the 1.

    According to your requirement, I added the process on page 5. Run the #5 page and try.

    Thank you

    Lacombe

Maybe you are looking for

  • Firefox blocks - tried to redownload it - who can either

    Yesterday, during the cleanup, I unplugged my two laptops, but do not turn them off. When I re-connected, my HP would not leave me access Firefox - it just kept crashing whenever I tried to use it. I did a system restore, thinking that would correct

  • Bookmarks has not transferred any Internet Explorer. Cookies?

    During the installation of Firefox, I chose the option to import bookmarks, cookies, history, settings of Explorer. I noticed that there was a small problem, while this part of the installation was going on, and of course, my favorites were not there

  • try to install the wifi adapter but NM say no

    As title, attempts to revive the old Dell with XP sp3 for shop. Installed linksys with speedbooster wusb546s ver2. Nice, its got a long enough cord to set out the window and get home signals. However said NM may not add because "other software" contr

  • cannot read the docs pdf printed, too small

    When I go to the website web sonye for download instructions / manual of my recorder, it load in pdf format. When I print it, its too small to read.  I can zoom in and read, but if I print on zoom, it always comes out even, too small to read.  In the

  • How can I change the account administrator to a standard account?

    Original title: How can you change your administrator to standard user after you have already chosen administrator? need to know that I don't know how to change it, it won't let me I have to format it?