Insert data into msql thru table trigger

Hi,
I installed dg4msql 11.2 and I would like to insert some data into our msql thru one of our Oracle table after insert table,
I used the syntax below
insert into test@dg4msql ("PN") values (:new.PN)
but the below error problem if I insert data into my Oracle table,
ORA-02054: transaction 4.17.15898 in-doubt
ORA-028500, connect from ORACLE to a non-Oracle system returned this message
[Oracle][ODBC SQL Server Driver][SQL Server] Invalid object name "RECOVER.HS_TRANSACTION_LOG
Do I have to create the HS_TRANSACTION_LOG table in my msql server to resolve this problem?
Thanks
Vincent

Vincent,
If the gateway insert is being done as part of a trigger then it will almost certainly be part of a distributed transaction so yes, you will have to create the transaction log table and the recovery user in the SQL*Server database.
As well as the gateway documentation have a look at this note in My Oracle Support -
Note.227011.1 How to Setup DG4MSQL to Use Distributed Transactions          (Doc ID 227011.1)
Regards,
Mike

Similar Messages

  • How to insert data into the mysql table by giving as a text file

    Hi,
    Any one know's how to insert data into the mysql table by giving as a text file as the input in JSP.Please respond ASAP.
    Thanks:)

    At least you can try StringTokenizer to parse your text files. Or download a text JDBC driver to parse your files, for instance, HXTT Text(www.hxtt.net) or StelsCSV(www.csv-jdbc.com).

  • Drop, create and insert data into few intermediate tables

    Hi All,
    I need to schedule a process to drop, create and insert data into few intermediate tables on a weekly basis. Here is what i need to do in the stored procedure, which can be scheduled weekly.
    DROP TABLE TABLE_NAME1;
    DROP TABLE TABLE_NAME2;
    DROP TABLE TABLE_NAME3;
    CREATE TABLE TABLE_NAME1
    CREATE TABLE TABLE_NAME2
    CREATE TABLE TABLE_NAME3
    INSERT INTO TABLE_NAME1 SELECT ....;
    INSERT INTO TABLE_NAME2 SELECT ....;
    INSERT INTO TABLE_NAME3 SELECT ....;
    Any suggestions, examples or code on how to accomplish this task would be very helpful. Any question pls let me know.
    Thanks in advance.

    I am using the intermediate tables in an extract process. The idea was that the table would be created prior to calling the extract procedure and once the data written to the intermediate table had been processed the table would be dropped. This would be repeated each time the extract process is run. From a DBA's point or view, would it be better to just leave the table on the database and truncate it after each run or is removing it entirely best?

  • Urgent help needed in inserting data into a custom table in oracle WorkFlow

    Hi
    I am trying to get data from the WF and insert into a custom table..
    I read that workflow procedures WONT allow commits...
    Oracle Workflow will not support autonomous commits in any procedure it calls directly. If you need to perform commits, then embed your SQL in a subprocedure and declare it as an autonomous block. This subprocedure must be capable of being rerun. Additionally, note that Oracle Workflow handles errors by rolling back the entire procedure and setting its status to ERROR. Database updates performed by autonomous commits cannot be rolled back, so you will need to write your own compensatory logic for error handling
    Have anyone did this..
    Please give me some idea ...It is urgent
    I am getting data using getitemattribute..and try to insert it into a custom table
    thanks
    kp

    Pl do not post duplicate threads - insert dont work in Workflow
    Srini

  • Insert data into a database table from a string

    Hi,
    I am need to insert data into a table from  the text file. I pull the data into an internal table using GUI_UPLoad. I read the data into an internal table and concatenate data into a string. I need to do this because the structure of the table is dynamic. it is used to upload a series of tables each with different structure, But the data is stored in the string v_tabledata.  How to do that.
    after uploading the data  from the textt file into a table
    oop at i_final.
       v_tabname = i_final-table_name.
      concatenate i_final-table_rec1 i_final-table_rec2 i_final-table_rec3
                  i_final-table_rec4 i_final-table_rec5 into v_tabledata.
    from  'v_table data'  i need to upload the data into a table and the structue of the table is known dynamically. Any thoughts using field symbols?
    Thanks,
    VG

    Let me see if I've understood your issue
    You have a file to be uploaded into an internal table but this file has many different layouts and then you don't know how to link these fields with the internal table...is it your issue?
    Then you've read the internal table, you've sent it to a string divided by space or something else and then are you trying to read this string to send it to a table?
    We could read the standard tables which maintain the program names, table names etc... (DD* tables, as the DD03L table) and then create some rules...
    We could create a parameter table to read your file/table dynamically...
    Please, try to rewrite in other words your problem...because there are a lot of ways to achieve your issue...
    Alexandre Mendes

  • How  to  insert data into custom database table from an hcsf

    i want to insert data into database table that i have created from an hcsf.
    example :
    say i have created a table in oracle database and i hav created a hcsf file.now i want that when somebody fills in that hcsf and click submit ,i want that entries should be updated in my database table.
    plzzz reply ASAP(it's urgent)

    you'll need a bit of Java code... extract the data during a check-in filter, and insert it into the database.
    check out the "DataAccess" component in the HowToComponents for query-running examples, and the "DynamicPrefix" component for a check-in filter example.
    I have older copies here:
    http://bezzotech.com/library

  • DB Adapters inserting data into 2 diff tables of same database giving issue

    Hello,
    I am using Oracle soa suite 11g BPEL.
    I need to insert data in 4 different tables of same Oracle database with the requirement of rollback all data if error occurs anywhere.
    I have configured the DB adapater as XA enabled on console .
    In code:-
    I am using 2 DBAdapters to insert data one by one in 2 diff tables of same DB (using INSERT ONLY operations). Before each invoke activity i am using a transformation activity to prepare the input variable of the DBAdapter.
    When i run this code i get below error:-
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [DBINS_DIANA.XxontPoiHdrsIface]. Caused by java.sql.BatchUpdateException: ORA-02049: timeout: distributed transaction waiting for lock . ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary>
    If i use a wait activity between the 2 invokes i get the data inserted fine , but that means the transactions between inserts would be committed which i want to be rollback fully in case of any errors.
    Can anyone have a clue what is wrong here?
    Thanks
    Shivani

    Hi Anagha,
    Have a look at these links:
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    http://help.sap.com/saphelp_nw04/helpdata/en/b0/676b3c255b1475e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/2b/d5653fd1d3b81ae10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/95/bb623c6369f454e10000000a114084/frameset.htm
    Regards,
    Chandra

  • Insert data into an OR Table

    Can I please have some help to insert some data into a table.
    I have created an Peripheral_objtyp object and then created a table from this object:
    create type Peripheral_objtyp as Object (
    PeriphNo NUMBER,
    Comp_ref REF Computer_objtyp,
    PeriphName varchar2(20),
    PeriphType varchar2(20)
    create table Peripheral_objtab of Peripheral_objtyp (PeriphNo Primary Key) Object ID Primary Key
    Here is the Computer_objtyp:
    create type Computer_objtyp as object (
    CompNo Number,
    CompName      Varchar2(20),
    CompOS          Varchar2(20),
    CompProcessor     Varchar2(20),
    CompRAM          Varchar2(20),
    CurrentUser_obj CurrentUser_objtyp,
    HardDriveList_var HardDriveList_Vartyp )
    I am wanting to insert some data into the Peripheral_objtab. This is the code I have tried:
    INSERT INTO Peripheral_objtab
    SELECT 1, REF(C), 'Test', 'Test'
    FROM Computer_objtab C
    Where C.CompNo = 1;
    I am getting this error:
    SQL Error: ORA-22979: cannot INSERT object view REF or user-defined REF
    22979. 00000 - "cannot INSERT object view REF or user-defined REF"
    *Cause:    Attempt to insert an object view REF or user-defined REF in a
    REF column created to store system generated REF values"
    *Action: Make sure the REF to be inserted is not from an object view
    or from a user-defined REF column

    Difficult to know what is causing the issue without a complete test case (with sample data).
    Is Computer_objtab's object identifier the primary key as well ?
    Maybe the Comp_ref column has to be scoped, but that's just a guess at this point.
    BTW, you should have posted your question in the {forum:id=68} forum.

  • Inserting data into dynamic internal tables

    Hello everyone, i need some suggestions on the following problem:
    I have created a dynamic table that consist of storage locations(SL) belonging to a plant. Each record in the internal table would need to display all the SL on the same line. I have succesfully created it and displayed it on an ALV, the problem now is how to insert data for the dynamically created storage locations:
    EXAMPLE: Created dynamic itab
    colA | colB | SL1 | SL2 | ... | SLn | colC | <--header
    data | data | 100 | 120 | ... | 200 | data | <--record
    I would like to insert data from the fields of another itab into SL1 to SLn. How can i go about doing it?
    Data from ColA to ColC has been filled through:
    <i>loop at itab into w_itab.
    move-corresponding w_itab to <dyn_tab>.
    endloop.</i>
    I cannot do the same to the SLs as the fields is dynamically created during runtime and the fieldname is different from the data that i am to insert in into.
    Any ideas?

    Hi,
      I have the following code in my BADI:
    ct_value_list is defined in the parameters of the method as a type standard table.
    Create values list reference
    CREATE DATA lv_value_list_ref LIKE LINE OF ct_value_list.
    ASSIGN lv_value_list_ref->* TO <lfs_value_list>.
      IF CT_VALUE_LIST IS INITIAL.
        lv_tabix = sy-tabix.
        IF NOT LT_DATA[] IS INITIAL.
          LOOP AT lt_data assigning <lfs_data>.
            assign <lfs_data> to <lfs_value_list>.
          assign <lfs_value_list> to <lv_value_list>.
            ASSIGN COMPONENT lc_prvar OF STRUCTURE <lfs_value_list>
            TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
    Get the material id
            READ TABLE it_matkey_tab ASSIGNING <lfs_matkey>
              WITH KEY matnr = <lfs_attribute>.
            IF sy-subrc = 0.
              lv_matid = <lfs_matkey>-matid.
            ENDIF.
            ENDIF.
            ASSIGN COMPONENT lc_mktgr OF STRUCTURE <lfs_value_list>
              TO <lfs_attribute>.
            IF <lfs_value_list> IS ASSIGNED.
            READ TABLE it_loc ASSIGNING <lfs_loc>
              WITH KEY locno = <lfs_attribute>.
            IF sy-subrc = 0.
              lv_locid = <lfs_loc>-locid.
            ENDIF.
            READ TABLE it_matloc ASSIGNING <lfs_matloc_int>
              WITH KEY matid = lv_matid
                       locid = lv_locid.
           if sy-subrc = 0.
          MATLOC: Assignment of Values - START
              ASSIGN COMPONENT 'MATLOCID'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-matlocid.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
                INSERT <lfs_matloc_int> INTO TABLE <lv_value_list>.
              ENDIF.
              ASSIGN COMPONENT 'PLANNER_SNP'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-planner_snp.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
              ENDIF.
              ASSIGN COMPONENT 'AT101'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-at101.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
              ENDIF.
              ASSIGN COMPONENT 'AT102'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-at102.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
              ENDIF.
              ASSIGN COMPONENT 'AT103'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-at103.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
              ENDIF.
              ASSIGN COMPONENT 'AT104'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-at104.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
              ENDIF.
              ASSIGN COMPONENT 'AT105'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-at105.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
              ENDIF.
            endif.
           ENDIF.
            ASSIGN COMPONENT 'PRVAR'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-prvar.
               INSERT <lfs_value_list> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'PARPR'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-parpr.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'VARID'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-varid.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'VARCT'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-varct.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'VARTX'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-vartx.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'DMOAP'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-dmoap.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'PRDID'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-prdid.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'BRFAM'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-brfam.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MATKL'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-matkl.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'BRDIF'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-brdif.
               INSERT <lfs_attribute> INTO TABLE ct_value_list.
            ENDIF.
            ASSIGN COMPONENT 'MEIND'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-meind.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MKLEN'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-mklen.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'PCKTY'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-pckty.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'ITPCK'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-itpck.
               INSERT <lfs_attribute> INTO TABLE ct_value_list.
            ENDIF.
            ASSIGN COMPONENT 'PMEIN'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-pmein.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MKTHK'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-mkthk.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'FLIND'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-flind.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'EDTID'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-edtid.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'BNDTY'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-bndty.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'ITBND'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-itbnd.
                INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'ITCSE'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-itcse.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'TPCOL'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-tpcol.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'SPFLV'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-spflv.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'PRSHP'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-prshp.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MKTGR'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-mktgr.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'SUBMK'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-submk.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'BOMHD'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-bomhd.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'BRDSC'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-brdsc.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MKSTR'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-mkstr.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'EDDSC'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-eddsc.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'EDCAT'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-edcat.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'CCIND'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-ccind.
             INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'CGSTY'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-cgsty.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'FLTTY'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-fltty.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'CPIND'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-cpind.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MBIND'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-mbind.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'USPRP'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-usprp.
             INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'EDDET'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-eddet.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'BRGEW'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-brgew.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'NTGEW'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-ntgew.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'GEWEI'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-gewei.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'VOLUM'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-volum.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'VOLEH'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-voleh.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'DMOAPP1'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-dmoapp1.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MAKTX'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-maktx.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'RPLVL'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-rplvl.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
         ENDLOOP.
        ENDIF.
    ENDIF.
    I get a shortdump in the code for the above code. There are diff types of inserts that I am trying to do and each one gives a short dump.
    Looking forward to your inputs.
    Your program is not applicable in my case as I have ct_value_list passed as a changing parameter of type standard table in my APO BADI.
    cheers
    Aveek

  • Insert Data into a PK Table from a Non-PK Table

    Suppose I have a Table A with 10 columns in Schema 1 and there are 100 records in it. Now I create a Table B with the same 10 columns but create 4 columns as Primary Key in another Schema 2. I want to Insert the data from Table A into Table B but the 100 rows of data have duplicate entries of Primary Key and so I get Primary Key constraint violation. I want to know whether I will be able to Insert data by a quey and if so how?

    Tried to simulate ur scenario in my environment...check the insert statement...you can implement it to get ur solution.
    Here it goes:
    SQL> desc testt; <table u want to insert from,this has no pk>
    Name Null? Type
    DEPTNO NUMBER
    JOB VARCHAR2(10)
    SQL> desc testt_t;<table to be loaded,table with pk>
    Name Null? Type
    DEPTNO NOT NULL NUMBER
    JOB VARCHAR2(10)
    SQL> select * from testt;
    DEPTNO JOB
    10 aaa
    11 bbb
    12 ccc
    10 aaa
    11 bbb
    12 ccc
    10 aaa
    7 rows selected.
    SQL> select * from testt_t;
    no rows selected
    SQL> insert into testt_t (select t1.deptno,t1.job from testt t1 where t1.rowid =(select min(t2.rowid
    ) from testt t2 where t1.DEPTNO=t2.DEPTNO and t1.JOB=t2.job));
    3 rows created.
    SQL>

  • Insert data into two related tables in one transaction

    Hi all,
    I’ve got problem with developing functionality.
    Background:
    I’ve got two tables: OFFER_HEADER and OFFER_CONTENT
    For now, user has to insert and commit the OFFER_HEADER(single-row view), then content becomes reachable and OFFER_CONTENT(multi-row view) can be filled. It is being done by choosing record from PRODUCTS form and inserting values into OFFER_CONTENT. Product data can be modified on the CONTENT form canvas.
    My goal:
    I know that is not convenient way to implement the functionality. I want to insert all the data(header and content) in one transaction. What is the best way to do it?
    Thanks in advance,
    Best Regards,
    Bartek

    1. User is on the OFFER_CONTENT canvasOk
    2. User presses ‘+’ buttonOk
    3. On the screen is displayer PRODUCT list
    4. User set focus on desired product
    5. Using popup menu user choose ‘Add’ option
    6. PRODUCT list is being closedSo, the functionlatity is like a LoV?
    7. OFFER_CONTENT is being shown with set of information from the productOk, you would either take the values directly from the fields of the PRODUCT-list and copy them into the OFFER_CONTENT-fields, or you just get something like the PRODUCT-ID from your PRODUCT-list and use a SELECT to read the product-details into the OFFER_CONTENT-block
    8. User can then manually change desired elements of the recordOk.
    So, where do you have the need to do an INSERT in your scenario?

  • Doubt on inserting data into rcv interface tables

    Hi all,can anyone kindly suggest me what are the mandatory columns in rcv_headers_interface and rcv_transactions_interface tables to insert data so that after running Material Transaction Processor concurrent program the data in these interface tables should populate in rcv_shipment_headers and rcv_shipment_lines.
    I am close on this,but i am getting some errors in po_interface_errors like "transaction_type" is invalid in rcv_transactions_interface table and invalid "shipment_num" in rcv_headers_interface.
    So, someone kindly suggest me what exactly i need to insert into these tables.
    FYI..this is what i inserted
    INSERT INTO rcv_headers_interface
    HEADER_INTERFACE_ID,
    GROUP_ID,
    PROCESSING_STATUS_CODE,
    RECEIPT_SOURCE_CODE,
    TRANSACTION_TYPE,
    AUTO_TRANSACT_CODE,
    LAST_UPDATE_DATE,
    LAST_UPDATE_LOGIN,
    LAST_UPDATED_BY,
    CREATION_DATE,
    CREATED_BY,
    VALIDATION_FLAG,
    COMMENTS,
    SHIPMENT_NUM,
    FROM_ORGANIZATION_ID,
    SHIP_TO_ORGANIZATION_ID,
    EXPECTED_RECEIPT_DATE,
    RECEIPT_HEADER_ID
    SELECT
    landed_cost_interface_s.NEXTVAL,              --Header Interface ID
    landed_cost_interface_groups_s.NEXTVAL,       --Group ID
    'PENDING',                                    --Processing Status Code
    'INVENTORY',                                  --Receipt source Code
    'RECEIVE',                                    --Transaction Type
    'DELIVER'  ,                                   --AUT Transact Code
    lc.last_update_date,                          --last update date
    lc.last_updated_by,                           --last updated by
    fnd.user_id,                                  --Last Update Login
    sysdate,                                      --creation date
    lc.created_by,                                --created by
    'Y',                                          --Validation Flag
    'Receiving Through Interface',                --Comments
    lc.file_number,                                --Shipment Number
    81,                                           --From Org
    82,                                           --To org
    sysdate,                                      --Expected Receipt Date
    regal.regal_inv_landed_cost_seq.nextval       --Receipt Header ID
    FROM   regal.regal_inv_landed_cost_tab lc,
            fnd_user fnd
    WHERE  lc.last_updated_by = fnd.last_updated_by
    AND    lc.file_number='NOV612';
    INSERT INTO rcv_transactions_interface
                 HEADER_INTERFACE_ID,
                 GROUP_ID,
                 INTERFACE_TRANSACTION_ID,
                 TRANSACTION_TYPE,
                 TRANSACTION_DATE,
                 PROCESSING_STATUS_CODE,
                 PROCESSING_MODE_CODE,
                 TRANSACTION_STATUS_CODE,
                 CATEGORY_ID,
                 QUANTITY,
                 LAST_UPDATE_DATE,
                 LAST_UPDATED_BY,
                 CREATION_DATE,
                 CREATED_BY,
                 RECEIPT_SOURCE_CODE,
                 DESTINATION_TYPE_CODE,
                 AUTO_TRANSACT_CODE,
                 SOURCE_DOCUMENT_CODE,
                 UNIT_OF_MEASURE,
                 INTERFACE_SOURCE_CODE,
                 ITEM_ID,
                 UOM_CODE,
                 EMPLOYEE_ID,
                 SHIPMENT_HEADER_ID,
                 SHIPMENT_LINE_ID,
                 TO_ORGANIZATION_ID,
                 SUBINVENTORY,
                 FROM_ORGANIZATION_ID,
                 FROM_SUBINVENTORY,
                 EXPECTED_RECEIPT_DATE,
                 SHIPPED_DATE
    SELECT
         landed_cost_interface_s.CURRVAL,              --Header Interface ID
         landed_cost_interface_groups_s.CURRVAL,       --Group ID
         landed_cost_interface_s.NEXTVAL,              --Interface_transaction_id
         'RECEIVE',                                       --Transaction Type
         sysdate,                                      --Transaction Date
         'PENDING',                                    --Processing Status Code
         'BATCH',                                      --Processing Mode Code
         'PENDING',                                    --Transaction Status Code
         129,                                      --Category ID   
         lc.quantity_received,                          --Quantity
         lc.last_update_date,                          --last update date
         lc.last_updated_by,                           --last updated by
         sysdate,                                      --creation date
         lc.created_by,                                --created by
         'INVENTORY',                                  --Receipt source Code
         'INVENTORY',                                  --Destination Type Code
         'DELIVER' ,                                    --AUTO Transact Code
         'INVENTORY',                                  --Source Document Code
          msi.primary_unit_of_measure ,                --Unit Of Measure
          'RCV',                                       --Interface Source Code
          msi.inventory_item_id,                        --Item ID
          msi.description,                              --Item Description
          msi.primary_uom_code,                         --UOM COde
          fnd.user_id,                                  --User
          V_A,                                         --Shipment Header ID
          V_B,                                         --SHipment Line ID
          82,                                           --To Organization ID
          'Brooklyn',                                     --Sub Inventory ID
          81,                                            --From Organization
          'Vessel',                                      --From Subinventory
          sysdate,                                       --Expected Receipt Date
          sysdate                                        --Shipped Date
      FROM
         regal.regal_inv_landed_cost_tab lc,
         fnd_user fnd,
         mtl_system_items msi
      WHERE
                 lc.organization_id = msi.organization_id
            AND  lc.inventory_item_id = msi.inventory_item_id
            AND  lc.last_updated_by = fnd.last_updated_by
            AND  msi.created_by = fnd.created_by
            AND  lc.file_number='NOV612';Any help is appreciated.
    Thanks in advance!!

    Thanks for your reply Sandeep Gandhi,i followed your advice and went through that metalink note but it didn't help much.Errors are cropping up every time,i am testing with only one value right now.Am i missing something like the flow of the whole process..
    --->First i have loaded data into mtl_interface table
    --->Next,i am trying to insert into rcv_headers_interface and rcv_transactions_interface
    So,is there any link between the data i am passing into mtl interface table and rcv interface tables?
    Thanks in advance!!
    Edited by: sandy on Oct 18, 2011 9:38 PM
    Edited by: sandy on Oct 19, 2011 10:03 AM

  • How to read a CSV file and Insert data into an Oracle Table

    Hi All,
    I have a Clob file as a in parameter in my PROC. . File is comma separated.need procedure that would parse this CLOB variable and populate in oracle table .
    Please let me some suggestions on this.
    Thanks,
    Chandra R

    jeneesh wrote:
    And, please don't "hijack" 5 year old thread..Better start a new one..I've just split it off to a thread of it's own. ;)
    @OP,
    I have a Clob file as a in parameter in my PROC. . File is comma separated.need procedure that would parse this CLOB variable and populate in oracle table .You don't have a "clob file" as there's no such thing. CLOB is a datatype for storing large character based objects. A file is something on the operating system's filesystem.
    So, why have you stored comma seperated data in a CLOB?
    Where did this data come from? If it came from a file, why didn't you use SQL*Loader or, even better, External Tables to read and parse the data into structured format when populating the database with it?
    If you really do have to parse a CLOB of data to pull out the comma seperated values, then you're going to have to write something yourself to do that, reading "lines" by looking for the newline character(s), and then breaking up the "lines" into the component data by looking for commas within it, using normal string functions such as INSTR and SUBSTR or, if necessary, REGEXP_INSTR and REGEXP_SUBSTR. If you have string data that contains commas but uses double quotes around the string, then you'll also have the added complexity of ignoring commas within such string data.
    Like I say... it's much easier with SQL*Loader of External Tables as these are designed to parse such CSV type data.

  • How to insert data into the existin table dynamically

    Hi All....
    Iam creating the table dynamically(on the fly) if the the table already exist in the database then the data should be inserted. though the table is created dynamically we dont know the columns of the table.. how i can solve the issue.. pls help me

    This will create your table and also data will be inserted. Use execute immediate.
    CREATE TABLE Table_name AS <Query to fetch data>

  • How do you access a web service to insert data into table?

    Ok I have a simple html/jsp survey form to host on our web site. Because of firewall issues I cannot do a direct connect to the database and insert the data from the form. So I need to take the data from the survey form, and pass it to an existing web service, or create a web service that will insert this information for me into the database table?
    Thanks again.
    orozco

    Thanks for the reply shanu. Well, because of firewall issues, as a work around we use a web service to insert data into the database table. Since the Web Service already exist, we just thought it would be easy enough just to pass the parameters to it, and have it do the insert. So really all I need is just to communicate with the already existing web service. I will be honest though I have not really worked with web services before.
    orozcom

Maybe you are looking for

  • Print quality problems on Fuji Xerox printers when printing from ArchiCAD and/or Preview.

    Hello, We experience major print quality problems when printing directly from Graphisoft's ArchiCAD, Nemetscheks Vectorworks and from Apple's Preview. Basically we see various artefacts on our printed drawings, e.g. line thicknesses change and hatche

  • How can I display playlists on the side and all my music?

    I want to list my playlists on the left and have my entire library in the main window to the right, but the new Itunes can't seem to do this.  Or at least I can't figure it out.  I want to be able to search and then drag songs into a playlist.  Can't

  • Using PXI 6711

    Hello, I am using a PXI system including a 6711 card, and Windows XP. On Labview, when I try to generate a square signal at 100 kHz, all the system crashes or slows because of a too high computer time used (that prevent any further tasks running on t

  • Facial Recognition with scanned photos - Elements Organizer 11

    My facial recognition works fine with my digital photos but not my scanned photos. It used to work a couple of weeks ago but the power was turned off and my computer was turned on at the time. Im not sure if that has anything to do with it but though

  • Is an ATV worth having for me?

    I am a little dubious about buying an ATV, so I would like some opinions please. Firstly I live in the UK, so please take into account we haven't got movie rentals over here yet, so for the moment the ATV I buy will not have that function. I have a f