I need to insert records in a ztable through bapi

Hello Gurus,
I am new to bapi creation. And I need to insert records in a ztable through bapi. similarly updation.can you send me with example.Its urgent.
Thanq you.

Hi satish,
I have created a bapi but what is happening is i need to insert few records through bapi.say i have to insert records for an employeeno say 1 and for that employee i need to insert other field values like item_no and value and date.but i am not givin the other fields in import parameters.that is item_no and value and date.so plz give me a solution for this querry.
Thanq you Satish.

Similar Messages

  • Inserting Record In same table through triggers.

    Hi,
    I've a table cus_mst ( cus_div_cd vachar2(1), cus_cd varchar2(5), cus_nm varchar2(100) )
    Records are inserted in this table through forms ...
    We need to automatically insert a record with a diff div_cd for any record inserted in the table .
    If div_cd 'I' is entered automatically a record with div cd 'S' with other coulmns having same values should get inserted .
    In case div_cd is 'S' then record with div_cd 'I' should get created.
    Eg : If in insert ( 'S', 'A0001', 'ABC COmpany' ); another record with values ( 'I', 'A0001', 'ABC Comapny' ) gets created;
    One way to do is to insert records in a view ( on the table ) and use instead of trigger to insert the corresponding record. But that is not possible as development team has to change form and use view instead of table.
    Have tried doing it by populating a collection in-each-row trigger and then using statment level trigger to insert from the collection. But this leads to recursive error.
    Would be great to get more insights into this..
    thanks
    cheers
    Jaani

    Hi,
    Within the following script you need to make adjustments according to your needs about the columns you need to test. But this might help you.
    Sorry for the layout. But I was not able to adjust it in a short time.
    drop table ad_test
    create table ad_test ( col1 varchar2(1), col2 varchar2(5), col3 varchar2(100) )
    create or replace package ad_test_pkg is
    procedure initialize_postpone ;
    procedure postpone_record( r_atst in ad_test%rowtype ) ;
    procedure handle_postponed_records ;
    end ad_test_pkg ;
    create or replace package body ad_test_pkg is
    type type_atst is table of ad_test%rowtype index by binary_integer ;
    t_atst type_atst ;
    procedure initialize_postpone is
    begin
    t_atst.delete ;
    end initialize_postpone ;
    procedure postpone_record( r_atst in ad_test%rowtype ) is
    begin
    t_atst(t_atst.count) := r_atst ;
    end postpone_record ;
    procedure handle_postponed_records is
    cursor c_test( cpiv_col1 in ad_test.col1%type ) is
    select 'x'
    from ad_test
    where col1 = cpiv_col1
    r_test c_test%rowtype ;
    r_atst ad_test%rowtype ;
    begin
    for i in t_atst.first .. t_atst.last
    loop
    r_atst := t_atst(i) ;
    if r_atst.col1 = 'I'
    then
    r_atst.col1 := 'S' ;
    else
    r_atst.col1 := 'I' ;
    end if ;
    open c_test( cpiv_col1 => r_atst.col1 ) ;
    fetch c_test into r_test ;
    if c_test%found
    then
    close c_test ;
    else
    close c_test ;
    insert into ad_test
    ( col1
    , col2
    , col3
    ) values
    ( 'S'
    , r_atst.col2
    , r_atst.col3
    end if ;
    end loop ;
    end handle_postponed_records ;
    end ad_test_pkg ;
    create or replace trigger test_ad_bis
    before insert on ad_test
    begin
    ad_test_pkg.initialize_postpone ;
    end ;
    create or replace trigger test_ad_air
    after insert on ad_test for each row
    declare
    r_atst ad_test%rowtype ;
    begin
    r_atst.col1 := :new.col1 ;
    r_atst.col2 := :new.col2 ;
    r_atst.col3 := :new.col3 ;
    ad_test_pkg.postpone_record( r_atst => r_atst ) ;
    end ;
    create or replace trigger test_ad_ais
    after insert on ad_test
    begin
    ad_test_pkg.handle_postponed_records ;
    end ;
    insert into ad_test values ( 'I', 'A0001', 'ABC COmpany') ;
    select * from ad_test ;
    Greets,
    Ad
    Edited by: loaddev on 10-nov-2010 4:47

  • Need to Insert Records in target table.

    Hi All,
    This is my first thread in this forum.
    My source table name is Emp and Target table name is Emp_Org.
    Given below is the structure of the source table
    Empno(p.key) deptno(p.key) empname currenttimestamp
    Target Table MetaData.
    Empno(p.key) country Emporg currenttimestamp Targettimestamp
    My problem is In my source table I have 10000 records. While I run the job, out of 10000 records only 4000 records are Inserted into the target table. If I run the job again, I need to run the job from 4001 onwards not from the begining.
    I don't know exactly how can I write a sql for above logic.
    I don't have idea how to do this?. Any help would be really appreciated.
    Edited by: 896227 on Nov 9, 2011 3:46 AM

    Welcome to the forum.
    You can try your hands on MERGE while performing the INSERT operation
    Something like this
    MERGE INTO Emp_Org eo
    USING (
              select Empno,deptno,empname,currenttimestamp from Emp
           ) x           
    ON (
                   eo.Empno      = x.Empno
    WHEN NOT MATCHED THEN
         INSERT
              Empno,
              country,
              Emporg,
              currenttimestamp,
              Targettimestamp
         VALUES
              x.Empno,
              'USA', /* Used Constant here */
              'Emporg', /* Used Constant here */
              x.currenttimestamp,          
              sysdate /* Used Constant here */
         );If you are not ok with the solution, then provide some sample data with expected output

  • Why grant select is needed on a table when you are only inserting records

    Please can you tell me why a grant select is needed when inserting records which are being inserted across a link?
    We have a table in database1 which we are trying to insert records from database2. database2 has a db_link to database1.
    The table residing in database1 has grant insert to the named user in the db_link. But unless there is also a grant select to that user we cannot insert records. We do not actually need to be able to select the records across the db_link, but nevertheless we get the following error on trying to insert records without the grant select being in place:
    ORA-01031: insufficient privileges
    Cause: An attempt was made to change the current username or password without the appropriate privilege. This error also occurs if attempting to install a database without the necessary operating system privileges. When Trusted Oracle is configure in DBMS MAC, this error may occur if the user was granted the necessary privilege at a higher label than the current login.
    Action: Ask the database administrator to perform the operation or grant the required privileges. For Trusted Oracle users getting this error although granted the the appropriate privilege at a higher label, ask the database administrator to regrant the privilege at the appropriate label.
    Your thoughts would be appreciated.

    Since there is no remote describe function, a select must be done to get the table structure. This is talked about in Note: 1004923.6.

  • Fatch last inserted record in ztable

    hi all,
    any buddy can tell me how can i get last inserted record from my ztable.

    Hi,
    I think this wont work .....
    Ex: table has   (considering first two cols as PK's)
    000123   AA   124
    000123   AB   124
    000123   AC   124
    000123   BA   124
    000123   BB   124
    000123   BC   124
    000123   LH   124
    Now i am inserting         000123   BD   124
    => Records will be arranged as
    000123   AA   124
    000123   AB   124
    000123   AC   124
    000123   BA   124
    000123   BB   124
    000123   BC   124
    000123   BD   124
    000123   LH   124
    How will yur query works ? Please clarify ....

  • Servlet inserting record into postgresql through hibernate

    Hi
    I have developed a servlet. This servlet is inserting record into postgres sql through hibernate using eclispe ide. When I run my code then I find the following exception
    exception
    java.lang.NullPointerException
         hibernate.example.FirstExample.doGet(FirstExample.java:54)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    I have developed the following code
    package hibernate.example;
    public class Contact {
         private String firstName;
         private String lastName;
         private String email;
         private long id;
         public String getEmail() {
         return email;
         public String getFirstName() {
         return firstName;
         public String getLastName() {
         return lastName;
         public void setEmail(String string) {
         email = string;
         public void setFirstName(String string) {
         firstName = string;
         public void setLastName(String string) {
         lastName = string;
         public long getId() {
         return id;
         public void setId(long l) {
         id = l;
    **Now the servlet is**
    package hibernate.example;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.cfg.Configuration;
    public class FirstExample extends HttpServlet     {
         Session session = null;
         public String getServletInfo() {
              return "Servlet connects to PostgreSQL database and displays result of a SELECT";
         public void doGet(HttpServletRequest request, HttpServletResponse response)
         throws IOException, ServletException {
              try{
                   response.setContentType("text/html");
                   PrintWriter out = response.getWriter();
                   Configuration cfg = new Configuration().configure();
                   SessionFactory factory = cfg.buildSessionFactory();
                   session = factory.openSession();
                   out.println("Inserting Record");
                   Contact contact = new Contact();
                   contact.setId(6);
                   contact.setFirstName("Deepak");
                   contact.setLastName("Kumar");
                   contact.setEmail("[email protected]");
                   session.save(contact);
                   out.println("Done");
              catch(Exception e){
                   System.err.println(e.getMessage());
              finally{
                   session.flush();
                   session.close();
    **web.xml is**
    <web-app>
              <database>
                   <driver>
                   <type>org.postgresql.Driver</type>
              <url>jdbc:postgresql://127.0.0.1:5432/ali</url>
              <user>ali</user>
              <password>ali</password>
                   </driver>
              </database>
              <servlet>
              <servlet-name>FirstExample</servlet-name>
              <servlet-class>hibernate.example.FirstExample</servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>FirstExample</servlet-name>
              <url-pattern>/hb</url-pattern>
              </servlet-mapping>
    </web-app>
    **And contact.hbm.xml is**
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
    <class name="hibernate.example.Contact" table="CONTACT">
    <id name="id" type="long" column="ID" >
    <generator class="assigned"/>
    </id>
    <property name="firstName">
    <column name="FIRSTNAME" />
    </property>
    <property name="lastName">
    <column name="LASTNAME"/>
    </property>
    <property name="email">
    <column name="EMAIL"/>
    </property>
    </class>
    </hibernate-mapping>
    **And hibernate.cfg.xml is**
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
    <session-factory>
    <property name="hibernate.connection.driver_class">com.postgressql.jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:postgresql://127.0.0.1:5432/ali</property>
    <property name="hibernate.connection.username">ali</property>
    <property name="hibernate.connection.password">ali</property>
    <property name="hibernate.connection.pool_size">10</property>
    <property name="show_sql">true</property>
    <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
    <property name="hibernate.hbm2ddl.auto">update</property>
    <!-- Mapping files -->
    <mapping resource="contact.hbm.xml"/>
    </session-factory>
    </hibernate-configuration>
    Pleas tell me that where I have done the mistake and how can I resolove the error.

    ahmadgee wrote:
    Thank u very much.
    First I tried with out the servlet. I took a simple class. But it was displaying the null pointer exception.
    then you still have the problem. do you understand the root cause?
    After then I made a servlet. how was that going to help your null pointer exception?
    Now it is displaying error hibernate.cfg.xml not found.that's part of the problem. where is the servlet reading that file and initializing the session factory? how is it finding that file?
    i don't know where you have that .cfg.xml file, or where the recommended place is where hibernate expects to see it, but i'd bet it needs to be in the CLASSPATH, which means WEB-INF/classes.
    figure out why you get that NPE first, though. the servlet is only making things worse.
    %

  • Validations when inserting records into database using table control?

    hi , guru's.
          iam inserting records into database table through table control when i press insert i want check which record is existing and which is not . so please give me any sample code
    regards,
    satheesh.

    hi , arjun.
    please check this code.
        WHEN 'INSERT'.
        data: g_vcontrol_itab1 like table of zcust_call_rec,
              g_vcontrol_wa1 like g_vcontrol_wa.
         SELECT *  FROM zcust_call_rec
                   INTO CORRESPONDING FIELDS OF TABLE g_vcontrol_itab1
                   FOR ALL ENTRIES IN g_vcontrol_itab
                   WHERE kunnr = g_vcontrol_itab-kunnr AND budat = g_vcontrol_itab-budat.
            loop at g_vcontrol_itab into g_vcontrol_wa.
               read table g_vcontrol_itab1 into g_vcontrol_wa1
                    with table key  g_vcontrol_wa-kunnr = kunnr and g_vcontrol_wa-budat = budat.
                     if sy-subrc = 0.
                       delete g_vcontrol_itab.
                     endif.
            endloop.
          LOOP AT g_vcontrol_itab INTO g_vcontrol_wa.
            INSERT into zcust_call_rec values g_vcontrol_wa.
          ENDLOOP.
    with this iam getting error message like this.
              <b>g_vcontrol_wa-budat is not expected.</b>

  • Help need on inserting system date on database

    hello every body,
    I need to insert system date into database through prepared statement.
    i wrote code :
    java.util.Date d=new java.util.Date();
    Preparestatement psmt;
    psmt.setDate(8, java.sql.Date(d));
    am getting class cast exception :
    could u please tell me how to insert system date through prepared statement..
    thanks in advance..

    Surround your code with a
    try{
    //Insert date here
    catch(Exception e){
    //handle exceptions here
    e.printStackTrace();
    Who says he didn't already?
    Try this:
    java.util.Date d=new java.util.Date();
    >
    Preparestatement psmt;
    psmt.setDate(8, new
    java.sql.Date(d.getTime()));This is correct, but can be condensed (if you want)
    psmt.setDate(8, new java.sql.Date(new java.util.Date().getTime()));
    >
    It's good idea to use the JDBC escape function
    instead of using a specific DBMS function. This way,
    your code will be portable.
    sql = "INSERT INTO USERS VALUES("
    + "'" + userName + "'" + ","
    + "'" + userPw   + "'" + ","
    + "  {fn now() }  )"; e Real's How To
    (http://64.18.163.122/rgagnon/javadetails/java-0567.ht
    ml)
    And this is only marginally applicable.  If he wishes to use the same statement for the current date, as well as other dates, he cannot make use of this.  Of course, I don't really know if I would trust or recommend a tutorial site that advocates building statements that are screaming for injection attack attempts.
    Edit:  Too slow by a mile!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Need to insert a multiple select list as individual records

    i have one list that is popluated with names and the names
    have a unique number assigned to them
    The other list is populated with county names and they also
    have a number assigned to them
    As the code is now it will not work because, the loop is in
    the wrong place, I think??
    CF throws an error saying invalid data type because it is
    trying to insert "1,2,3,4,5,6,etc..."
    I changed the data type to text so it would atleast accept
    the insert, which worked but that is not what i want. I then
    changed it backed to numeric, but get the invalid data type error.
    The database would look like this if changed to text data
    type:
    personnel_ID countyID
    1 1,2,3,4,5,6
    i want it to look like this:
    personnel_ID countyID
    1 1
    1 2
    1 3
    1 4
    1 5
    etc.....
    I somehow need a loop to check and see if a county is
    selected and then insert the personnel_ID and countyID into one
    record, then check the next county and so on.
    below is my code.........Any help would be greatly
    appreciated
    <cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
    <cfif IsDefined("FORM.MM_InsertRecord") AND
    FORM.MM_InsertRecord EQ "form2">
    <cfquery datasource="wildlife_nwco"
    name="insertCounties">
    <cfloop index="listElement" list="#form.countyID#">
    INSERT INTO countiesWorked (personnel_ID, countyID)
    VALUES (
    <cfif IsDefined("FORM.personnel_ID") AND
    #FORM.personnel_ID# NEQ "">
    <cfqueryparam value="#FORM.personnel_ID#"
    cfsqltype="cf_sql_numeric">
    <cfelse>
    NULL
    </cfif>
    <cfif IsDefined("FORM.countyID") AND #FORM.countyID# NEQ
    "">
    <cfqueryparam value="#FORM.countyID#"
    cfsqltype="cf_sql_numeric">
    <cfelse>
    NULL
    </cfif>
    </cfloop>
    </cfquery>
    </cfif>
    <cfquery name="personnel" datasource="wildlife_nwco">
    SELECT *
    FROM personnel
    ORDER BY personnel.lastName
    </cfquery>
    <cfquery name="county" datasource="wildlife_nwco">
    SELECT *
    FROM countyID
    ORDER BY countyID.countyName
    </cfquery>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form method="post" name="form2"
    action="<cfoutput>#CurrentPage#</cfoutput>">
    <table align="center">
    <tr valign="baseline">
    <td nowrap align="right">Name of NWCO::</td>
    <td><select name="personnel_ID">
    <cfoutput query="personnel">
    <option value="#personnel.personnel_ID#" <cfif
    (isDefined("personnel.personnel_ID") AND personnel.personnel_ID EQ
    personnel.personnel_ID)>selected</cfif>>#personnel.lastName#,
    #personnel.firstName#</option>
    </cfoutput>
    </select>
    </td>
    <tr>
    <tr valign="baseline">
    <td nowrap align="right">Counties Worked:</td>
    <td><select name="countyID" size="10"
    multiple="multiple">
    <cfoutput query="county">
    <option value="#county.countyID#" <cfif
    (isDefined("county.countyID") AND county.countyID EQ
    county.countyID)>selected</cfif>>#county.countyName#</option>
    </cfoutput>
    </select>
    </td>
    <tr>
    <tr valign="baseline">
    <td nowrap align="right"> </td>
    <td><input type="submit" value="Insert
    record"></td>
    </tr>
    </table>
    <input type="hidden" name="MM_InsertRecord"
    value="form2">
    </form>
    <p> </p>
    </body>
    </html>

    You are on the right track. Most dbs do not allow mulitple
    queries in a single cfquery tag. Put your query in the loop instead
    of the the loop in the query. Also, your countyid will be
    ListElement, not form.countyId.

  • Insert Multiple Records into Multiple ZTABLEs inside the BAPI

    Hi,
    I have a requirement to Insert or Update Multiple Records into a ZTABLE inside the BAPI. Is there any special approach inside the BAPI to insert or update ZTABLEs with multiple records. It looks like the simple INSERT Statement is not working. Can you please suggest me a Suitable solution for this req?
    Thanks and Regards,
    Kannan

    Hi,
    INSERT ZTABLE FROM TABLE ITAB.
    The itab structure should be of the structure ZTABLE..
      Same for MODIFY and update.
      MODIFY ZTABLE FROM TABLE ITAB..
    Thanks,
    Naren

  • Clueless NEWBIE DEVELOPER, NEEDS ASSIST with Insert Record Server Behavior

    Experienced DW designer learning CFMX7. I cannot seem to get
    beyond this error message when using the Insert Record server
    behavior to write data from a form into the database. Using MS
    Access 2002, CFMX7's internal server, DW 6.0. Please note that I am
    learning development for the first time and am using tutorials. I
    was able to connect at one point but now I cannot.
    See error message below:
    The following information is meant for the website developer
    for debugging purposes.
    Error Occurred While Processing Request
    Error Executing Database Query.
    Syntax error in INSERT INTO statement.
    Resources:
    Enable Robust Exception Information to provide greater detail
    about the source of errors. In the Administrator, click Debugging
    & Logging > Debugging Settings, and select the Robust
    Exception Information option.
    Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
    SV1; .NET CLR 1.1.4322)
    Remote Address 127.0.0.1
    Referrer
    http://localhost:8500/moosek/TMPu724j3nl2j.cfm
    Date/Time 07-Aug-06 07:23 PM
    Text
    Text

    MongoSlade,
    I had this exact same problem with a CFMX 7 datasource that
    was set up as Microsoft Access with Unicode. It turns out that
    "Password" is a reserved word in the Unicode driver. Or somewhere.
    I got around it by putting square brackets, i.e., [ ] around the
    column name, like this:
    update MyTable
    set [Password] = '#form.Password#'
    where UserID = '#form.UserID#'
    That solved the problem nicely. I hope this solution will
    work for you as well.

  • Inserting records in the table

    Hi All,
    I am working on a report where we are inserting huge numbers of records from an internal table to the ztable, I have been advised that rather than inserting all the records at one time we should divide the recods into small blocks may be let's say 100,000 of each block and try inserting the blocks in the ztable. So I was just wondering if anyone of you can help me with this how can I get this?
    my internal table is it_data_table and my ztable is z_data_table.
    Thanks,
    Rajeev

    Hi,
    Rather than inserting records from the workarea it is better if you use the inetrnal table for insertion. If youu have say 50025 records than it will hit the database that many times which definitely is a performance issue.If you have an internal table say 'it' and another internal table 'it_temp' with a similiar structure, you can try something like as follows
    loop at it.
      count = count + 1.
      it_temp = it.
      append it_temp.
      if count = 10000.
        insert ztable from table it_temp accepting duplicate keys.  "to avoid a dump if there are duplicates count = 0.
        refresh it_temp.
      endif.
    endloop.
    if it_temp is not initial.
      insert ztable from table it_temp accepting duplicate keys.
    endif.
    In the above code the loop will run the number of record times but, the insert statement will run only 50025/10000 times (i.e, 5 times). After the completion of the loop we need to add the remaining 25 records (because insert will work last inside the loop when 50000 records are reached), for that we will issue the insert statement after completion of the loop, after checking the it_temp table. So the total of 50025 records would be entered in a batch of 6 inserts rather than that many inserts if using just the workarea.
    I hope this does help you in your issue.
    Thanks and Regards,
    Sachin.

  • File To RFC Scenario- simply insert records into ztab

    Hi
    i have a requirment, where XI gets a flatfile and needs to map to RFC function module and then inserts records into ztable in SAP system. it doesn't require any response back.
    proble here is:
    i don't want to get RFC 'Response mesage' when i import RFC into XI IR. i require only 'Request message'.
    please help me, how to create a RFC function module with out Response message, and it should contain only Request message.
    i have created RFC in this way:
    RFC doesn't vcontains neither import nor export parameters. and i have defined on table in TABLE tab which refers to a ztable created already.
    Thanks in advance..
    Regards,
    Rajesh

    Thankx Michal,
    I have written ZRFC this way:
    insert ZMM_AUTO_GR from INPUT_TABLE .
      if sy-subrc = 0.
        commit work.
      else.
       rollback work.
    im not using neither import nor export parameters..but using only tables parameters. but when imported in XI im getting same table  structure in both request an response.
    please suggest what changes required in above code to invoke my ZRFC in async way.
    you will not get any response in XI- what chages required in my code to dnt get .reponse in XI.
    appreciate your help.
    Regards,
    Rajesh.

  • [SOLVED] FRM-40508:ORACLE error: unable to INSERT record

    Hi all,
    I have migrated this form from 4.5 to 10g (Version 10.1.2.0.2 ). This form inserts a record into the database table when all the fields in the form are filled and a button Save is presed.
    At the time when I press the Save button, I get this error. FRM-40508:ORACLE error: unable to INSERT record
    So I went on to see the "Display Error" from help and found to be the database error, inserting into a table.
    The error message is ORA-00932: inconsistent datatypes: expected DATE got NUMBER
    The form where I press Save button has 3 date fields and I checked the properties of them and they are Date only.
    I also generated to object list report and tried to find some answer, but no use.
    Please help me in debugging this form.
    Edited by: Charan on Aug 18, 2011 4:05 PM

    I think you need to get a description of the table and compare all the "database" columns in the form with the ones in the database table to see that the types match. Somewhere there's a mismatch. Also check the block(s) "query data source columns" and see if there's any
    columns in there that the type does not match the table. (check the sizes of things too while you're at it.)

  • How can i display recent update/delete/insert records in form

    Hai !!!!
    i am new for forms,.......any body tell me, how can i display recent no of records updated or no of records deleted or no of records are inserted in a form. these records count are display in display items....give me detail explination......
    Subbu.....

    the easiest way is copy and paste the oracle-forms example from the OU.
    You need form-level-trigger ON-ERROR + ON-MESSAGE, POST-INSERT, POST-UPDATE, POST-DELETE, three global variables and a procedure:
    ON-ERROR
    handle_message( error_code, 'ERROR: ' || ERROR_TYPE || '-' || TO_CHAR(ERROR_CODE) ||': '|| ERROR_TEXT );
    ON-MESSAGE
    handle_message( message_code, MESSAGE_TYPE || '-' || TO_CHAR(MESSAGE_CODE) || ': ' || MESSAGE_TEXT );
    PROCEDURE handle_message( message_number IN NUMBER, message_line IN VARCHAR2 ) IS
    BEGIN
        IF message_number IN ( 40400, 40406, 40407 )
        THEN
          DEFAULT_VALUE( '0', 'GLOBAL.insert' );
          DEFAULT_VALUE( '0', 'GLOBAL.update' );
          DEFAULT_VALUE( '0', 'GLOBAL.delete' );
          MESSAGE('Save Ok: ' ||
            :GLOBAL.insert || ' records inserted, ' ||
           :GLOBAL.update || ' records updated, ' ||
           :GLOBAL.delete || ' records deleted !!!' );
          ERASE('GLOBAL.insert'); 
          ERASE('GLOBAL.update');
          ERASE('GLOBAL.delete');
        ELSE
             MESSAGE(message_line );
              END IF;
    END;
    POST-INSERT
    DEFAULT_VALUE('0', 'GLOBAL.insert');
    :GLOBAL.insert := TO_CHAR( TO_NUMBER( :GLOBAL.insert ) + 1 );
    POST-UPDATE
    DEFAULT_VALUE('0', 'GLOBAL.update');
    :GLOBAL.update := TO_CHAR( TO_NUMBER( :GLOBAL.update ) + 1 );
    POST-DELETE
    DEFAULT_VALUE('0', 'GLOBAL.delete');
    :GLOBAL.delete := TO_CHAR( TO_NUMBER( :GLOBAL.delete ) + 1 );try it
    Gerd

Maybe you are looking for

  • Way to Copy Doc,Due and Posting Date from Sale Document to Other Sale Doc

    Hey SAP B1 Community,                               Most of the users facing Problems When they create Sale Order and then want to create Del and Invoice Doc. They have to Change Doc and Del Date, There is solution to avoid to write  dates again. Fir

  • Printing Separations in Freehand

    Hi, I have been using an HP 5MP Laser printer to do color seps. I recently purchased a new USB printer, and the separtions dialog box will not appear. Any ideas!!! Thanks

  • ACE to Load Balance SurfControl/Win App

    According to SurfControl is it possible to use a L4 - L7 load balancer to bear the 10000 per server limitation. Is the any know option to do this using the ACE module?

  • Import flash movieclip into flashbuilder

    Hi i tried this tutorial http://www.codeandvisual.com/2009/how-to-import-movieclips-into-a-flas h-builder-actionscript-project/ but when i import flash movieclip into flashbuilder then it shows source attachment None after view swc which i import. is

  • Java to binary

    Those of you of a sensitive disposition please read no further. Okay, can anyone else give me information regarding the production of binary executables from Java sources (or bytecode).