Entity Framework doesn't save new record into database

Hy,
I have problem with saving new record into database using Entity Framework.
When I run program, everything seems normal, without errors . Program shows existing, manually added records into the database, and new one too. But new one isn't save into database after running program.
I've got no idea where's problem. There is code for add new record, show existing.
Thanks for help!!
// add new record
using (var db=new DatabaseEntitiesContext())
var person = new Table()
First_Name = "New_FName",
Second_Name = "New_SName",
PIN = "4569"
db.Tables.Add(person);
db.SaveChanges();
//show all records
using (var db=new DatabaseEntitiesContext())
var selected = from x in db.Tables
select x;
foreach (var table in selected)
Console.WriteLine("{0}{1}{2}",table.First_Name,table.Second_Name,table.PIN);

Hi BownieCross;
If you are using a local database file in your project the following may be the cause.
From Microsoft Documentation:
Issue:
"Every time I test my application and modify data, my changes are gone the next time I run my application."
Explanation:
The value of the Copy
to Output Directory property is Copy
if newer or Copy
always. The database in your output folder (the database that’s being modified when you test your application) is overwritten every
time that you build your project. For more information, see How
to: Manage Local Data Files in Your Project.
Fernando (MCSD)
If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects
and unknown namespaces.

Similar Messages

  • Inserting new records into database table at runtime

    Hi all ,
    How to insert new records into database table at runtime on click update?
    Thanks.

    Hi Sasikala,
    Just for your understanding am giving a sample code snippet which you can use to read the contents of your Table UI element & save the data on to your database. Suppose you have a button up on pressing which you want to read the data from your screens table & save on to the database then you can proceed as shown below:
    1) Obtain the reference of your context node.
    2) Fetch all the data present in your table into an internal table using methods of if_wd_context_node
    3) Use your normal ABAP logic to update the database table with the data from your internal table
    In my example I have a node by name SFLIGHT_NODE and under this I have the desired attributes from SFLIGHT. Am displaying these in an editable table & the user would press up on a push button after making the necessary changes to the tables data. I would then need to obtain the tables information & save on to the database.
    data: node_sflight           type ref to if_wd_context_node,
            elem_sflight           type ref to if_wd_context_element,
            lt_elements            type WDR_CONTEXT_ELEMENT_SET,
           stru_sflight           type if_main=>element_sflight_node,
           it_flights             type if_main=>elements_sflight_node.
    "   navigate from <CONTEXT> to <SFLIGHT_NODE> via lead selection
        node_sflight_node = wd_context->get_child_node( name = 'SFLIGHT_NODE'  ).
       lt_elements = node_sflight->get_elements( ).
    "   Get all the rows from the table for saving on to the database
        loop at lt_elements into elem_sflight.
          elem_sflight->get_static_attributes( importing static_attributes = stru_sflight ).
          append stru_sflight to it_flights.
        endloop.
    " Finally save the entries on to the database
        modify ZSFLIGHT99 from table it_flights.
        if sy-subrc eq 0.
    endif.
    However a word of caution here.... SAP doesn't ever recommend directly modifying the database through an SQL query. You would preferably make use of a BAPI for the same. Try go through Thomas Jung's comments in [here|modify the data base table which is comming dynamiclly;.
    Regards,
    Uday

  • Send Email and automatically save new value into database

    Hi,
    I think this is a very unique problem, hope that anyone could help me. I tried to send email notification using pl/sql block (check_delay) as below. Please focus to this section first, from the pl/sql:
    Problem 1
    --> if emp_rec.OVERDUE_AMOUNT_PAID is not null then
    dbms_output.put_line('emp_rec.payment_progress_id ' || emp_rec.payment_progress_id || crlf);
    select c.PAYMENT_PROGRESS into payment_progress from credit_sales c where c.PAYMENT_PROGRESS_ID = emp_rec.payment_progress_id;
    payment_ratio := (payment_progress/emp_rec.invoice_amount);
    dbms_output.put_line('count ratio progress payment to invoice amount ' || payment_ratio || crlf);
    dbms_output.put_line('payment progress ' || payment_progress || crlf);
    Here, sql checks whether overdue amount is being paid in progress from payment_overdue table..then creates variables for ratio(payment_ratio) and progress payment amount(payment_progress). After that if payment_ratio < 0.1 it must sends email notification to customer_id and customer_representative_id. However, it does NOT send notification to
    customer_id! How do I amend the code so that customer_id will get the notification too?
    Problem 2
    In problem 2, please focus to :
    -->if emp_rec.OVERDUE_AMOUNT_PAID is null then
    If customer does not pay any amount, sql will first checks whether delay between scheduled payment date and current system is more than 3 days..
    dbms_output.put_line('count days delay ' || round(sysdate - to_date(emp_rec.scheduled_payment_date)) || crlf || crlf);
    if round(sysdate - to_date(emp_rec.scheduled_payment_date)) >3 then
    After that, sql will counts how many times customer delays. If first time, the notification will count notification as number 1..and update remark column with the message and count value as below..
    select count(a.payment_overdue_id) as count into count from payment_overdue a where a.customer_id = emp_rec.CUSTOMER_ID and a.invoice_no = emp_rec.invoice_no;
         dbms_output.put_line('update remark : '||emp_rec.remark);
    update PAYMENT_OVERDUE set remark='Reminder notice no '||count where payment_overdue_id=emp_rec.payment_overdue_id;
    Finally, notification to be sent to customer with the message format as below..
    email_to:=emp_rec.customer_id||default_email;
    select b.INVOICE_NO into invoice_no from INVOICE b where b.INVOICE_ID = emp_rec.INVOICE_ID;
    subj:='Reminder to make payment for Invoice No '||invoice_no;
    mesg:='Kindly make payment for your amount outstanding as per Invoice No '||invoice_no||'. Reminder notice no '||count;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    Unfortunately, no email notification being sent to customer with this message format.. Please help me to make customer to receive the notification with this format.
    Kindly, thank you so much for you guys to help me solve these two problems, Problem 1 and Problem 2....
    Thank you.
    CREATE OR REPLACE PROCEDURE TEST.check_delay AS
    NO binary_float;
    CURSOR emp_cur is
    select * from PAYMENT_OVERDUE where FLAG=3 and STATUS='OUTSTANDING';
    emp_rec emp_cur%rowtype;
    email_to varchar2(200);
    default_email varchar2(200);
    mesg varchar2(4000);
    invoice_no varchar2(100);
    subj varchar2(4000);
    payment_progress binary_float;
    payment_ratio binary_float;
    count number;
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    BEGIN
    default_email:='@test.com';
    FOR emp_rec in emp_cur
    LOOP
    if emp_rec.OVERDUE_AMOUNT_PAID is null then
    dbms_output.put_line('count days delay ' || round(sysdate - to_date(emp_rec.scheduled_payment_date)) || crlf || crlf);
    if round(sysdate - to_date(emp_rec.scheduled_payment_date)) >3 then
         select count(a.payment_overdue_id) as count into count from payment_overdue a where a.customer_id = emp_rec.CUSTOMER_ID and a.invoice_no = emp_rec.invoice_no;
         dbms_output.put_line('update remark : '||emp_rec.remark);
    update PAYMENT_OVERDUE set remark='Reminder notice no '||count where payment_overdue_id=emp_rec.payment_overdue_id;
         email_to:=emp_rec.customer_id||default_email;
    select b.INVOICE_NO into invoice_no from INVOICE b where b.INVOICE_ID = emp_rec.INVOICE_ID;
    subj:='Reminder to make payment for Invoice No '||invoice_no;
    mesg:='Kindly make payment for your amount outstanding as per Invoice No '||invoice_no||'. Reminder notive no '||count;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    end if;
    if emp_rec.OVERDUE_AMOUNT_PAID is not null then
    dbms_output.put_line('emp_rec.payment_progress_id ' || emp_rec.payment_progress_id || crlf);
    select c.PAYMENT_PROGRESS into payment_progress from credit_sales c where c.PAYMENT_PROGRESS_ID = emp_rec.payment_progress_id;
    payment_ratio := (payment_progress/emp_rec.invoice_amount);
    dbms_output.put_line('count ratio progress payment to invoice amount ' || payment_ratio || crlf);
    dbms_output.put_line('payment progress ' || payment_progress || crlf);
    if payment_ratio < 0.1 then
    email_to:=emp_rec.customer_id||default_email;
    select b.INVOICE_NO into invoice_no from INVOICE b where b.INVOICE_ID = emp_rec.INVOICE_ID;
    subj:='Reminder to settle outstanding amount for Invoice No '||invoice_no;
    mesg:='Kindly settle your outstanding payment as per Invoice No '||invoice_no;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    email_to:=emp_rec.customer_representative_id||default_email;
    subj:='Reminder to settle outstanding amount for Invoice No '||invoice_no;
    mesg:='Kindly settle your outstanding payment as per Invoice No '||invoice_no;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    if (payment_ratio < 0.5 && payment_ratio > 0.1) then
    select b.INVOICE_NO into invoice_no from INVOICE b where b.INVOICE_ID = emp_rec.INVOICE_ID;
         email_to:=emp_rec.customer_id||default_email;
    subj:='Reminder to settle outstanding amount for Invoice No '||invoice_no;
    mesg:='Kindly settle your outstanding payment as per Invoice No '||invoice_no;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    end if;
    END LOOP;
    END;
    /

    Hi BownieCross;
    If you are using a local database file in your project the following may be the cause.
    From Microsoft Documentation:
    Issue:
    "Every time I test my application and modify data, my changes are gone the next time I run my application."
    Explanation:
    The value of the Copy
    to Output Directory property is Copy
    if newer or Copy
    always. The database in your output folder (the database that’s being modified when you test your application) is overwritten every
    time that you build your project. For more information, see How
    to: Manage Local Data Files in Your Project.
    Fernando (MCSD)
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects
    and unknown namespaces.

  • To add new record into the table Data Service client

    When I am trying to add new record into the table Employeedetails using Data Service client it is giving a sql exception: "java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1."
    Code:
    DataService ds=DataServiceFactory.newDataService(getInitialContext(),"EmplDetApp","ld:EmplDetAppDataServices/EmployeeDetails");
    EmployeeDetailsDocument edoc=EmployeeDetailsDocument.Factory.newInstance();
    edoc.addNewEmployeeDetails();
    //here I set the primary key value empid
    edet.setEmpid("1212");
    edet.setEmpname("manu");
    ds.submit(edoc);
    Error
    EmpName 5 java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
    com.bea.ld.dsmediator.DataServiceException: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
         at com.bea.ld.dsmediator.update.JDBCAdaptor.save(JDBCAdaptor.java:247)
         at com.bea.ld.dsmediator.update.DataServiceMediator.submit(DataServiceMediator.java:528)
         at com.bea.ld.dsmediator.update.DataServiceMediator.submit(DataServiceMediator.java:245)
         at com.bea.ld.ServerBean.submit(ServerBean.java:529)
         at com.bea.ld.Server_ydm4ie_EOImpl.submit(Server_ydm4ie_EOImpl.java:910)
         at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
         at java.lang.Thread.startThreadFromVM(Unknown Source)
    Caused by: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
         at weblogic.jdbc.mssqlserver4.TdsStatement.processWarning(TdsStatement.java:1178)
         at weblogic.jdbc.mssqlserver4.TdsStatement.parseMsWarning(TdsStatement.java:1089)
         at weblogic.jdbc.mssqlserver4.TdsStatement.getMoreResults(TdsStatement.java:756)
         at weblogic.jdbc.mssqlserver4.TdsStatement.execute(TdsStatement.java:210)
         at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.java:97)
         at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.java:1455)
         at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:147)
         at com.bea.ld.dsmediator.update.JDBCAdaptor.save(JDBCAdaptor.java:151)
         ... 15 more
    But I am not sure why it is giving an exception as Violation of PRIMARY KEY.
    The update method works fine for the same client.
    The exception only happens when I am trying to insert a new record.
    Please help me to figure out this problem.

    If you are absolutely sure that you do not have such a row already in your table, open a case with customer support and reference CR321312. I believe the work-around is to put ld-server-core.jar in your client classpath.
    Correction: put ld-server-app.jar in the client classpath
    Edited by mreiche at 09/17/2007 3:28 PM

  • IPhone 4's standard "notes" app doesn't save new updates?

    I regularly use the 'notes' app that comes standard on the iPhone for everything. Shopping lists, to do lists, you name it. But with the new iPhone 4, the app doesn't save new edits. I'll type in or delete something, and then after I hit done, the "thinking" thing at the top left rolls around a few times, and then whatever I just typed in disappeared, or whatever I deleted reappears. Help!

    I don't live in that area (I'm in northern Orange County, CA), but my neighbor and I have been having the same problem since last Saturday (Feb. 5) in the area around where we live (we both have iPhone 4's, and they still work fine in other areas). Note that we have full bars, and the "3G" symbol on the display, but get no data over 3G; disabling 3G allows access using EDGE (slowly), and phone/texting works fine (it's just the 3G data in our neighborhood that's broken). Since we both have WiFi in our homes, we didn't initially identify the 3G problem; what we both noticed was a sudden increase in iPhone power consumption (beginning last Saturday) when we are in our neighborhood (even when the phones are idle); I used to go 3-4 days on a charge, but now the battery drops at a rate of about 10%/hour when I'm around the house. Interestingly, my neighbor also has an iPad, and it doesn't exhibit the problem. Both phones and the iPad are running iOS V4.2.1. We've tried all the normal things (rebooting, clearing network settings, etc.), and nothing works. I spent some time on the phone last night with AT&T, and they are going to send someone out to check connectivity.

  • Add a new record in database table without using table maintance generator

    Hi Expart ,
                  Plz. tell me how to add new record in database table without using table maintance ganerator ....give me one ex.
    Regards
    Bhabani

    Hi,
    The other way to safely handle the modification of tables is through is by programs that can be done with SE38 or SE80.
    To insert into database table we use INSERT statement :
    1. To insert a single line into a database table, use the following:
    INSERT INTO <target> VALUES <wa>.
    INSERT <target> FROM <wa>.
    2. To insert a several lines into a database table, use the following:
    INSERT <target> FROM TABLE <itaba>.
    Or even we can use MODIFY statementas this single statement is used to insert as well as update the records of database table.
    MODIFY <target> FROM <wa>.
    or MODIFY <target> FROM TABLE <itab>.
    thanx.
    Edited by: Dhanashri Pawar on Sep 10, 2008 12:25 PM
    Edited by: Dhanashri Pawar on Sep 10, 2008 12:30 PM

  • 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>

  • Insert multiple records into database through internal table

    Hi
      please help me how to insert multiple records into database through internal table

    Hi,
    Welcome to SCN.
    Press F1 on INSERT statement and you will teh syntax as well the docu for the same.

  • Entity Framework doesn't create the database in SQL Server Management 2012, instead it just creates in (localdb)\v11.0 How to fix it?

    Hi, I'm Begginer in Entity Framework. Then I'm having some problems.
    I created my entities and I give Save Changes. (Ok)
    Then, I Tried to Connect with the database through Server Explorer, if I use the instance of the SQL Server Management Studio 2012(PC-PAULO\INSTANCIAPJ) as Server Name, the database doesn't appears but, if I use the the instance (localdb)\v11.0 the dabase
    appears.
    How to change the save to the SQL Server Management Studio 2012, I don't know where this (localDB)\v11.0 saves.
    Help-me Thank you :D

    Hello PauloJos,
    The code should be ok and it is really strange that the database is only created into the local database in your machine. I am wondering if it is related with the machine environment, could you please have a try with below demo on your machine which works
    on my side and if it is possible, please have a try to run your application on other machines to see if it works:
    class Program
    static void Main(string[] args)
    #region https://social.msdn.microsoft.com/Forums/en-US/00eff3c4-2336-4807-9212-e6f2a6c8812e/entity-framework-doesnt-create-the-database-in-sql-server-management-2012-instead-it-just-creates?forum=adodotnetentityframework
    using (CFDbContext db = new CFDbContext())
    db.Database.CreateIfNotExists();
    #endregion
    public class CFDbContext : DbContext
    public CFDbContext() : base("UltraFoda3") { }
    public DbSet<TestOne> TestOnes { get; set; }
    public class TestOne
    public int ID { get; set; }
    public string Name { get; set; }
    Config file is similar:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </configSections>
    <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
    <parameters>
    <parameter value="v11.0" />
    </parameters>
    </defaultConnectionFactory>
    <providers>
    <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
    </entityFramework>
    <connectionStrings>
    <add name="UltraFoda3" connectionString="Data Source=YourServer;Initial Catalog=UltraFoda3;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
    </connectionStrings>
    </configuration>
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • IPhone doesn't save new contacts

    Hi there! I hope someone can help me with this. Since I have the new iOS 4 my iPhone doesn't save any new contacts I make. I got the iPhone 4 but it didn't help either... I try to save new contact and when I sync my iPhone, the new contact just gets deleted. Does anyone experience the same problem? I appreciate any help!
    Thank you!

    See this discussion-- others having the same problem
    http://discussions.apple.com/thread.jspa?messageID=11575920&#11575920

  • MVC 4 Using Entity Framework How to save Images in Database

    Iam Beginner to
    MVC 4 ... I want to Upload Image from my form and save to the SQL Database by Using Entity Framework . I have searched alot but couldnt succeed yet,,

    http://forums.asp.net/
    You should post to the MVC section of above forum first.

  • How to insert new record into oracle table from GridView in VS2005.

    I need to insert records into Oracle10g table from VS2005 GridView using the Insert Method in Business Logic Class. The Update and Delete Methods are working fine. What's the best way out?

    How is it "not possible"?
    Either modify the Class for the new fields, or give the new fields default values (if applicable). If the type of an existing column has changed, then only the first option is available.
    Where's the problem?

  • How do you insert new records into multiple tables using the same unique primary key?

    I’ve created a PHP site and MySQL server using a free app called XAMPP.  I have successfully created a form in Dreamweaver that will write data to a (name) table in the SQL database.  Here’s my question: How do you write to two (or more) tables in the same database and pass the same primary key to both tables?  In the SQL database, I defined the first field as ID and set it as the primary key with auto update.  So, when you insert a new record, it creates a unique primary key for that record.  In my form, I’m capturing info that needs to be stored to two tables at the same time; a Name table and Address table. Since the Name and Address tables use the ID field as the primary key, I believe I will need to pass the ID value from the Name table to the insert of the Address table to insure they both have the same primary key, right?

    No. You probably need the primary key from one table to be a foreign key in the other tables. In any case, I believe you can use two methods to obtain the auto generated key. First with SQL:
    http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html
    And the other using a PHP function:
    http://us3.php.net/mysql_insert_id

  • New records into 0FI_AP_4 extractor

    Hello Experts - We have a situation, where the 0FI_AP_4 extractor needs to be enhanced to add additional records instead of updating some fields in the extract structure. Standard extractor routine is not considering the multiple purchase orders that are part of one invoice. We are on planing on enhancing the extractor to retrieve the missing records.
    As far as I know, we can only enhance the extractor to populate additional fields and not sure about adding totally new records. Please help me out here. Other option we have been thinking about is to create a new generic extractor with the same structure as 0FI_AP_4 and write custom routine to populate the missing records and send it BW as a new datasource.
    Any input will be appreciated.
    Regards,
    Venu.

    You are correct in your understanding. The generic extractor would be for the accounting document, and other key fields on the 0FI_AP_4 extractor, and the purchase orders. If there is any additional data required for each row of data for an accounting document / purchase order combination, you can include it on this generic extractor too.
    Since this is based off of mutiple tables, you may want to first create a view, in your source system, that contains only the fields that you require and then create the generic extractor off of that view.

  • How to insert new record into altered table

    I am using JDBC with MySQL. I altered existing table and want to insert new record using java class. But it is not possible.How to do?

    How is it "not possible"?
    Either modify the Class for the new fields, or give the new fields default values (if applicable). If the type of an existing column has changed, then only the first option is available.
    Where's the problem?

Maybe you are looking for