Unable to create Insert process in forms

Hi All,
I have created a tabular form where i am able to update & delete and adding rows with out any problem.
When i am trying a insert a new record it is throwin gth ebelow error... Below is the error which i had mentioned to u.
Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "D47F24D590E442A8BCF98D5BA7D782AC", item checksum = "B3FF449D4A98A3313839C25D15586A17"., update "APEX_DEMO_SCHEME"."DEPT" set "DEPTNO" = :b1, "DNAME" = :b2, "LOC" = :b3
can u please help me out how to reolve this problem.. as i am not able to get the rtesults from past few days..
Thanks,
Anoo..

So I've posted this example before, but don't hesitate to ask questions:
Okay, Here's a quick rundown on how to build a manual form using APEX_ITEM and collections. The process goes in 4 steps: gather the data, display the data, update based on user input, then write the changes. Each step requires it's own piece of code, but you can extend this out as far as you want. I have a complex form that has no less than a master table and 4 children I write to based on user input, so this can get as complex as you need. Let me know if anything doesn't make sense.
First, create the basic dataset you are going to work with. This usually includes existing data + empty rows for input. Create a Procedure that fires BEFORE HEADER or AFTER HEADER but definitely BEFORE the first region.
DECLARE
  v_id     NUMBER;
  var1     NUMBER;
  var2     NUMBER;
  var3     VARCHAR2(10);
  var4     VARCHAR2(8);
  cursor c_prepop is
  select KEY, col1, col2, col3, to_char(col4,'MMDDYYYY')
    from table1
    where ...;
  i         NUMBER;
  cntr      NUMBER := 5;  --sets the number of blank rows
BEGIN
  OPEN c_prepop;
    LOOP
      FETCH c_prepop into v_id, var1, var2, var3, var4;
      EXIT WHEN c_prepop%NOTFOUND;
        APEX_COLLECTION.ADD_MEMBER(
        p_collection_name => 'MY_COLLECTION',
        p_c001 => v_id,  --Primary Key
        p_c002 => var1, --Number placeholder
        p_c003 => var2, --Number placeholder
        p_c004 => var3, --text placeholder
        p_c005 => var4 --Date placeholder
    END LOOP;
  CLOSE c_prepop;
  for i in 1..cntr loop
    APEX_COLLECTION.ADD_MEMBER(
        p_collection_name => 'MY_COLLECTION',
        p_c001 => 0, --designates this as a new record
        p_c002 => 0, --Number placeholder
        p_c003 => 0, --Number placeholder
        p_c004 => NULL, --text placeholder
        p_c005 => to_char(SYSDATE,'MMDDYYYY') --Date placeholder
  end loop;
END;Now I have a collection populated with rows I can use. In this example I have 2 NUMBERS, a TEXT value, and a DATE value stored as text. Collections can't store DATE datatypes, so you have to cast it to text and play with it that way. The reason is because the user is going to see and manipulate text - not a DATE datatype.
Now build the form/report region so your users can see/manipulate the data. Here is a sample query:
SELECT rownum, apex_item.hidden(1, c001),  --Key ID
     apex_item.text(2, c002, 8, 8) VALUE1,
     apex_item.text(3, c003, 3, 3) VALUE2,
     apex_item.text(4, c004, 8, 8) VALUE3,
     apex_item.date_popup(5, null,c005,'MMDDYYYY',10,10) MY_DATE
FROM APEX_COLLECTIONS
WHERE COLLECTION_NAME = 'MY_COLLECTION'This will be a report just like an SQL report - you're just pulling the data from the collection. You can still apply the nice formatting, naming, sorting, etc. of a standard report. In the report the user will have 3 "text" values and one Date with Date Picker. You can change the format, just make sure to change it in all four procedures.
What is critical to note here are the numbers that come right before the column names. These numbers become identifiers in the array used to capture the data. What APEX does is creates an array of up to 50 items it designates as F01-F50. The F is static, but the number following it corresponds to the number in your report declaration above, ie, F01 will contain the primary key value, F02 will contain the first numeric value, etc. While not strictly necessary, it is good practice to assign these values so you don't have to guess.
One more note: I try to align the c00x values from the columns in the collection with the F0X values in the array to keep myself straight, but they are separate values that do NOT have to match. If you have an application you think might get expanded on, you can leave gaps wherever you want. Keep in mind, however, that you only have 50 array columns to use for data input. That's the limit of the F0X array even though a collection may have up to 1000 values.
Now you need a way to capture user input. I like to create this as a BEFORE COMPUTATIONS/VALIDATIONS procedure that way the user can see what they changed (even if it is wrong). Use the Validations to catch mistakes.
declare
  j pls_integer := 0;
begin
for j1 in (
  select seq_id from apex_collections
  where collection_name = 'MY_COLLECTION'
  order by seq_id) loop
  j := j+1;
  --VAL1 (number)
  apex_collection.update_member_attribute (p_collection_name=> 'MY_COLLECTION',
      p_seq=> j1.seq_id,p_attr_number =>2,p_attr_value=>wwv_flow.g_f02(j));
  --VAL2 (number)
  apex_collection.update_member_attribute (p_collection_name=> 'MY_COLLECTION',
      p_seq=> j1.seq_id,p_attr_number =>3,p_attr_value=>wwv_flow.g_f03(j));
  --VAL3 (text)
  apex_collection.update_member_attribute (p_collection_name=> 'MY_COLLECTION',
      p_seq=> j1.seq_id,p_attr_number =>4,p_attr_value=>wwv_flow.g_f04(j));
  --VAL4 (Date)
  apex_collection.update_member_attribute (p_collection_name=> 'MY_COLLECTION',
      p_seq=> j1.seq_id,p_attr_number =>5,p_attr_value=>wwv_flow.g_f05(j));
end loop;
end;Clear as mud? Walk through it slowly. The syntax tells APEX which Collection (p_collection_name), then which row (p_seq), then which column/attribute (p_attr_number) to update with which value (wwv_flow.g_f0X(j)). The attribute number is the column number from the collection without the "c" in front (ie c004 in the collection = attribute 4).
The last one is your procedure to write the changes to the Database. This one should be a procedure that fires AFTER COMPUTATIONS AND VALIDATIONS. It uses that hidden KEY value to determine whether the row exists and needs to be updated, or new and needs to be inserted.
declare
begin
  --Get records from Collection
  for y in (select TO_NUMBER(c001) x_key, TO_NUMBER(c002) x_1,
             TO_NUMBER(c003) x_2,
             c004 x_3,
             TO_DATE(c005,'MMDDYYYY') x_dt
           FROM APEX_COLLECTIONS
           WHERE COLLECTION_NAME = 'MY_COLLECTION') loop
    if y.x_key = 0 then  --New record
        insert into MY_TABLE (KEY_ID, COL1,
            COL2, COL3, COL4, COL5)
          values (SEQ_MY_TABLE.nextval, y.x_1,
              y.x_2, y.x_3, y.x_4, y.x_dt);
    elsif y.x_key > 0 then  --Existing record
        update MY_TABLE set COL1=y.x_1, COL2=y.x_2,
             COL3=y.x_3, COL4=y.x_4, COL5=y.x_dt
         where KEY_ID = y.x_key;
    else
      --THROW ERROR CONDITION
    end if;
  end loop;
end;Now I usually include something to distinguish the empty new rows from the full new rows, but for simplicity I'm not including it here.
Anyway, this works very well and allows me complete control over what I display on the screen and where all the data goes. I suggest using the APEX forms where you can, but for complex situations, this works nicely. Let me know if you need further clarifications.

Similar Messages

  • Unable to create cluster, hangs on forming cluster

     
    Hi all,
    I am trying to create a 2 node cluster on two x64 Windows Server 2008 Enterprise edition servers. I am running the setup from the failover cluster MMC and it seems to run ok right up to the point where the snap-in says creating cluster. Then it seems to hang on "forming cluster" and a message pops up saying "The operation is taking longer than expected". A counter comes up and when it hits 2 minutes the wizard cancels and another message comes up "Unable to sucessfully cleanup".
    The validation runs successfully before I start trying to create the cluster. The hardware involved is a HP EVA 6000, two Dell 2950's
    I have included the report generated by the create cluster wizard below and the error from the event log on one of the machines (the error is the same on both machines).
    Is there anything I can do to give me a better indication of what is happening, so I can resolve this issue or does anyone have any suggestions for me?
    Thanks in advance.
    Anthony
    Create Cluster Log
    ==================
    Beginning to configure the cluster <cluster>.
    Initializing Cluster <cluster>.
    Validating cluster state on node <Node1>
    Searching the domain for computer object 'cluster'.
    Creating a new computer object for 'cluster' in the domain.
    Configuring computer object 'cluster' as cluster name object.
    Validating installation of the Network FT Driver on node <Node1>
    Validating installation of the Cluster Disk Driver on node <Node1>
    Configuring Cluster Service on node <Node1>
    Validating installation of the Network FT Driver on node <Node2>
    Validating installation of the Cluster Disk Driver on node <Node2>
    Configuring Cluster Service on node <Node2>
    Waiting for notification that Cluster service on node <Node2>
    Forming cluster '<cluster>'.
    Unable to successfully cleanup.
    To troubleshoot cluster creation problems, run the Validate a Configuration wizard on the servers you want to cluster.
    Event Log
    =========
    Log Name:      System
    Source:        Microsoft-Windows-FailoverClustering
    Date:          29/08/2008 19:43:14
    Event ID:      1570
    Task Category: None
    Level:         Critical
    Keywords:     
    User:          SYSTEM
    Computer:      <NODE 2>
    Description:
    Node 'NODE2' failed to establish a communication session while joining the cluster. This was due to an authentication failure. Please verify that the nodes are running compatible versions of the cluster service software.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-FailoverClustering" Guid="{baf908ea-3421-4ca9-9b84-6689b8c6f85f}" />
        <EventID>1570</EventID>
        <Version>0</Version>
        <Level>1</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2008-08-29T18:43:14.294Z" />
        <EventRecordID>4481</EventRecordID>
        <Correlation />
        <Execution ProcessID="2412" ThreadID="3416" />
        <Channel>System</Channel>
        <Computer>NODE2</Computer>
        <Security UserID="S-1-5-18" />
      </System>
      <EventData>
        <Data Name="NodeName">node2</Data>
      </EventData>
    </Event>
    ====
    I have also since tried creating the cluster with the firewall and no success.
    I have tried creating the node from the other cluster and this did not work either
    I tried creating a cluster with just  a single node and this did create a cluster. I could not join the other node and the network name resource did not come online either. The below is from the event logs.
    Log Name:      System
    Source:        Microsoft-Windows-FailoverClustering
    Date:          01/09/2008 12:42:44
    Event ID:      1207
    Task Category: Network Name Resource
    Level:         Error
    Keywords:     
    User:          SYSTEM
    Computer:      Node1.Domain
    Description:
    Cluster network name resource 'Cluster Name' cannot be brought online. The computer object associated with the resource could not be updated in domain 'Domain' for the following reason:
    Unable to obtain the Primary Cluster Name Identity token.
    The text for the associated error code is: An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client.
    The cluster identity 'CLUSTER$' may lack permissions required to update the object. Please work with your domain administrator to ensure that the cluster identity can update computer objects in the domain.

    I am having the exact same issue... but these are on freshly created virtual machines... no group policy or anything...
    I am 100% unable to create a Virtual Windows server 2012 failover cluster using two virtual fiber channel adapters to connect to the shared storage.
    I've tried using GUI and powershell, I've tried adding all available storage, or not adding it, I've tried renaming the server and changing all the IP addresses....
    To reproduce:
    1. Create two identical Server 2012 virtual machines
    (My Config: 4 CPU's, 4gb-8gb dynamic memory, 40gb HDD, two network cards (one for private, one for mgmt), two fiber cards to connect one to each vsan.)
    2. Update both VM's to current windows updates
    3. Add Failover Clustering role, Reboot, and try to create cluster.
    Cluster passed all validation tests perfectly, but then it gets to "forming cluster" and times out =/
    Any assistance would be greatly appreciate.

  • Unable to create a report painter form (Message no. KH205).

    Dear all,
    I am trying to create a report painter form, but the system gives an error:
    Key figure scheme  contains errors -> check definition
    Message no. KH205
    Diagnosis
    Entry   not contained in Table T237A.
    Procedure
    Check key figure scheme  (in particular line 9062) in table T237A.
    I checked in Tcode KER1 but did not find any Key figure scheme.
    Afterwards, I checked table T237A and T237 and found out that number of hits in table 237A is less than in T237A.
    I think this is the reason why system has such reaction.
    Please help me with this issue.
    Best regards,
    Linh.
    Edited by: tvlinh on Mar 7, 2012 11:22 AM
    Edited by: tvlinh on Mar 7, 2012 11:22 AM

    Hi,
    This issue can occur if you have transported the Key Figure Scheme (KFS) from another system and /or deleted value fields. Has this happened ?
    To fix the issue you need to renumber the T237 in the source client executing the function module RKE_FILL_TABLES_T237FF as mentioned in the note 13838.
    After this try to create a new form and check if that works. If there are still problems with the existing form/report then the best
    way might be to delete and create again
    regards
    Waman

  • Unable to Create Insert page in OAF Using ROWID as primaryKey

    I have Taken RowID as primary Key in Entity Creation.I written following Code as follow in Process Request method
    OAViewObject vo=(OAViewObject)am.findviewObject("VONAME');
    if(!vo.ispreparedforexecution)
    vo.executequery();
    Row row=vo.createRow();
    vo.insertRow(row);
    row.setNewRowstate(Row.STATUS_ INITIALIZED);
    but
    i am getting an error like Entity Create Row Exception

    Hi,
    sorry, wrong forum. This is all about Oracle JDeveloper. OAF related questions are handled on the OAF forum
    Frank

  • How to create Digital Personnel Foile for HCM Processes and Forms

    Hi I am creating HCM Processes and Forms using FPM Forms. Now to print these forms Alternate Adobe forms also developed. But once the entire process is completed by HR Admin and in future if they want to see the already processed form and if they want to take print out they should be able to do it. So, based on some knowledge I am assuming we can achieve this by Digital Personnel file creation. Can any one please confirm. Whether they can open already processed form and how to get print these forms as this is FPM form and no print option is available.
    In order to configure DPF, can any one share step by step procedure to configure DPF. I dont have any idea on SAP Records Management as I felt this basic is required. Friends help me here.
    Regards,
    Nayani.

    This seems possible.
    Refer here ... Print Form (FPM Form Type Only) - HCM Processes and Forms - SAP Library
    For DPF - ensure you have used the anchor correctly refer Save PDF file added to processes and forms WDA
    Regarding the possibility of being able to print it from process browser - I am not sure.
    Process browser for latest release is documented here...
    http://help.sap.com/erp_hcm_ias_2013_02/helpdata/en/14/9a3516789f4aceb6bb910df1220869/content.htm?frameset=/en/43/1d639b3fce3566e10000000a11466f/frameset.htm
    Regards.

  • How to create Insert & Update on master-detail form JPA/EJB 3.0

    Is there any demonstration or tips how to Insert record on master-details form for JPA/EJB 3.0 with ADF binding?

    I have master-detail forms (dept-emp). I drag the dept->operations->create method to JSF page. But when I click create button, only dept form is clear and ready for insert. But emp form is not clear. How can I add create method for this?
    Can you give some example how to pass the right object to the persist or merge method so that it can save both the two objects (master-detail tables)
    Thanks
    Edited by: user560557 on Oct 9, 2009 8:58 AM

  • Getting error while creating form and report on webservice: ORA-20001: Unable to create form on table. ORA-02263: need to specify the datatype for this column.

    i am using the following description to create a web service reference:
    web reference :REST
    Name :Yahoo Map
    URL :http://local.yahooapis.com/MapsService/V1/mapImage
    HTTP Method: GET
    Basic Authentication: No
    Add Parameter:
    Name       Type
    appid        String
    location    String
    Output Format: XML
    XPath to Output Parameters : /Result
    Output Parameter:
    Name       Path       Type
    Url          /text()      String
    Then i tried to create form and report on webservice:
    Web Service Reference Type: Yahoo Map
    Operation: doREST
    All the fields i keep as default
    I tick the checkbox (url)in report Parameter
    After clicking next whereever required i click create button
    I get the following error
    ORA-20001: Unable to create form on table. ORA-02263: need to specify the datatype for this column.
    Please someone help to solve this as i need to fix it urgently.

    i exported the application from apex.oracle.com and imported it to our environment
    import went fine, but when I ran the IR page I got
    ORA-20001: get_dbms_sql_cursor error ORA-00904: : invalid identifier
    evidently the problem is a lack of public execute on DBMS_LOB, which is used in the generated IR source.
    while waiting for the DBA to grant privs on DBMS_LOB, changing the dbms_lob.getlength call to length() fixes the IR.
    however, i am not getting the download link on the associated form page... changed templates, that's not the issue -- we'll see if that's a dbms_lob issue as well

  • APEX:Getting error while creating form and report on webservice: ORA-20001: Unable to create form on table. ORA-02263: need to specify the datatype for this column.

    I am using Apex 4.2.2.00.11
    am using the following description to create a web service reference:
    web reference :REST
    Name :Yahoo Map
    URL :http://local.yahooapis.com/MapsService/V1/mapImage
    HTTP Method: GET
    Basic Authentication: No
    Add Parameter:
    Name       Type
    appid        String
    location    String
    Output Format: XML
    XPath to Output Parameters : /Result
    Output Parameter:
    Name       Path       Type
    Url          /text()      String
    Then i tried to create form and report on webservice:
    Web Service Reference Type: Yahoo Map
    Operation: doREST
    All the fields i keep as default
    I tick the checkbox (url)in report Parameter
    After clicking next whereever required i click create button
    I get the following error
    ORA-20001: Unable to create form on table. ORA-02263: need to specify the datatype for this column.
    Please someone help to solve this as i need to fix it urgently.

    336554,
    Looks like there is a 127-column limit on the number of report columns supported when using that wizard. Do you have more than that?
    57434

  • Create Adobe Form using Design Time for Processes and Forms

    Hi all,
    I am trying to create a form that have 3 fields:
    1. pernr
    2. ename
    3. effective_date
    I done all the necessary setup of BADI ,class, interface and form.
    I need the step to step guide where you create the adobe form using the Design Time for Processes and Forms. Anyone have any idea?
    Edited by: Siong Chao on Jan 3, 2011 4:54 AM
    Edited by: Siong Chao on Jan 3, 2011 5:00 AM

    Hi,
    I couldn't get to your query..
    What do you mean by step by step procedure for a design time & process for forms.
    if you are a beginner and looking for basic examples to implement adobe forms there are lot of them in SDN, please search them.
    let me know if your query was a very specific one.
    Cheers,
    Sai

  • How to create Generic Service in HCM Processes and Forms

    Hi Friend's,
      Can you tell me what are the steps to create Generic Service in HCM Processes and Forms and also tell me how to link Generic service with BADI.
       In SPRO, I defined one customized generic service, but i cant able to implement the generic service to BADI. Moreover it's asking for Composite Badi Implementation name.
       So tell me the steps which guide me to create that.. Waiting for your replies....

    hi ramesh,
                      use HRASR00GEN_SERVICE_BASIC  create ur own.
    Madhukar

  • Creating a new position and updating IT 1028 using HCM processes and forms

    I have to create a new position and update the related infotypes using the design time framework of HCM processes and forms. The problem I am facing is the info type 1028 is not a part of the de coupled infotype framework and does not appear in the service fields list. How can I update the infotype 1028? I was thinking of updating it using the FLUSH method of the class implementing the ADV services interface IF_HRASR00GEN_SERVICE_ADVANCED by calling the function module RH_INSERT_INFTY. But, how do I get the position ID created? Is there any other way of achieving this? Please help as soon as possible.

    HI
    Create one Function Module to return all the vacant positions and load that in a drop down.
    For IT1028 you have to update via the RH_INSERT_INFTY.
    Kind Regards,
    Mukesh

  • FRM-30087: Unable to create form file F:\MYFORM\ORDG01.fmx.

    FRM-30087: Unable to create form file F:\MYFORM\ORDG01.fmx.

    If the file is open, forms might have problems to overwrite it.
    Make sure the destination file is not open

  • HCM Process and Forms - Create and End record using the same form scenario

    Hi All,
    I have the following requirement while using HCM Processes and Forms: Using one form/scenario I need to both create a record or be able to end a record for infotype 841. When looking at the back-end service SAP_PA I have operations Create, Change, Change without delimiting and Delete. My requirement would be to do both a create and a delete I guess, but these two can't be selected at the same time while configuring the form scenario.
    I was thinking about doing somethign with the startdate and enddate instead of using the effective date. But I have no clue how to do that.
    How would this be possible?
    Thanks,
    J

    You are correct in assuming that you cannot have a create and delete on the same infotype. The config will not allow it.  Instead, configure the create and then do the delete via a call to you own method in the workflow or via the advanced generic service
    Cheers
    Ian

  • HT1998 Why can't I uninstall AirPort 4.2 from my Windows 7 PC..  I downloading and reinstalling the 4.2 but during the installation process I get an error.  It reads...    "1608: Unable to Create InstallDriver instance Return Code -2147024894

    Why can't I uninstall AirPort 4.2 from my Windows 7 PC..  I tried downloading and reinstalling the 4.2 but during the installation process I get an error.  It reads...    "1608: Unable to Create InstallDriver instance Return Code -2147024894

    You should not install it again..
    Boot the computer into safe mode and try the uninstall again.
    No luck you will have to manually uninstall which is a pain. Delete the files and open regedit and delete the registry entries.. better still use the system restore to go back to a previous system where you had no 4.2 installed..
    Or just ignore it and install the latest 5.6.1 and if it gives trouble well do a clean install of windows.

  • FRM-30087: Unable to create form

    Hi,
    I am getting FRM-30087 error, when I try to run form for the second time. The error message index states as follows :
    FRM-30087: Unable to create form file %s.
    Cause:  You lack privileges in the specified directory, or you do not have the disk space required.
    Action:  Contact your DBA to make sure you have the access privileges you need.
    I am working in Windows XP and have enough disk space. What could be the problem?
    Thanks for any help.
    Mel

    Could it be that the forms is already running?

Maybe you are looking for

  • How do I stop my Time Capsule seeking the internet?

    I have taken my Time Capsule out of the internet connection feed, as I found it was slowing things down. My internet connection is much faster now that it comes to my iMac direct from the 50MB feed via the wireless router supplied by my provider. So

  • HP LaserJet 4100N-print queue reverts to pause

    I've been trying relentlessly to get my iMac (early 2008 model) to print on an HP LaserJet 4100N.  I've been able to establish the connection (via ethernet) using the IP address on the printer and configuring as Protocol LPD, HP LaserJet 4100 Series

  • Data Loader On Demand Inserting Causes Duplicates on Custom Objects

    Hi all, I am having a problem that i need to import around 250,00 records on a regular basis so have built a solution using Dataloader with two processes, one to insert and one to update. I was expecting that imports that had an existing EUI would fa

  • Help in creating a database..

    please help ... The complete command for creating a database.. please help

  • Doubt on bdc's

    i was trying my first bdc program. i wanted to record mm03 transaction. so i went to tcode SHDB, pressed new recording, gave a recording name and t-code mm03 and started recording. it asked for material number, i just entered one and pressed back to