Updating EBAN TAble with custom field values by BAPI_PR_CREATE

Hi all,
My requirement is PR creation by BAPI_PR_CREATE Function Module .
for pr item level customer added 10 fields in the EBAN table append structure CI_EBANDB. .
i am creating PR by using Funcation module BAPI_PR_CREATE.
In this Function Module I have to pass the structure name and field values in the EXTENTIONIN .
what is the structure name I have to pass and how populate data in to the EBAN table.
after that i have to create PR and updating 10 two custom field values in the EBAN Table.
how to proceed for updating the customer field values in the eban table.
thanks in advance.
sri

Hi Sri,
better you dont use it. try this..
example code:
data: i_banc type bapiebanc occurs 0 with header line.
data: i_bkn type bapiebkn occurs 0 with header line.
data: i_ret type bapireturn occurs 0 with header line.
data: i_band type bapieband occurs 0 with header line.
data: i_bantx type bapiebantx occurs 0 with header line.
data number type bapiebanc-preq_no.
i_banc-acctasscat = par_asset.
i_banc-short_text = 'VehicleBooking'.
i_banc-quantity = '1'.
i_banc-DEL_DATCAT = '1'.
i_banc-deliv_date = par_date .
i_banc-mat_grp = 'TRAVEL'.
i_banc-unit = 'ST'.
i_banc-c_amt_bapi = 100.
i_bkn-cost_ctr = par_cost.
i_bkn-g_l_acct = par_gl.
i_bkn-fund = par_fund.
i_bkn-funds_ctr = par_fund_ctr.
append i_banc.
append i_bkn.
call function 'BAPI_REQUISITION_CREATE'
exporting
skip_items_with_error = 'X'
importing
number = number
tables
requisition_items = i_banc
requisition_account_assignment = i_bkn
requisition_item_text = i_bantx
return = i_ret
Describe table i_ret lines count.
If count > 0.
loop at i_ret.
Message e000(zbooking) with i_ret-message
endloop.
Endif.
if not number is initial.
S000(zbookings) with 'Requisition number ' , number ,' created'.
endif.
thanks
trinadh

Similar Messages

  • Updating EBAN table with custom field values for BAPI_PR_CREATE

    Hi all,
    My requirement is PR creation by BAPI_PR_CREATE Function Module .
    for pr item level customer added 10 fields in the EBAN table append structure CI_EBANDB. .
    i am creating PR by using Funcation module BAPI_PR_CREATE.
    In this Function Module I have to pass the structure name and field values in the EXTENTIONIN .
    what is the structure name I have to pass and how populate data in to the EBAN table.
    after that i have to create PR and updating 10 two custom field values in the EBAN Table.
    how to proceed for updating the customer field values in the eban table.
    thanks in advance.
    sri

    Hi
    First you need to append a  structure in EBAN table, The values you need to pass to the
    BAPIPAREX - Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
    Structure will be the appen strucre created in EBAN.
    You can pass the values of the 10 fileds to the VALUEPART1, VALUEPART2 fileds in the structure with 240 charcters each.
    Hope this helps.
    Thanks & Regards
    Kishore

  • Problem in updating FPLT Table with custom fields of the billing plan

    Hi Guys
    I have a requirement to add 2 custom fieldd in the billing plan tab of sales order and I could not find any screen exit for that. However I got access key and added those 2 fields on the screen but I am not able to uodate table FPLT from there.
    I can see exits to pass the value but because there is no screen exit, the program cant retain the values keyed given by use on the screen.
    I really dont know where do I need to write the code and how to make screen fields read by the program.
    Please please help.
    Thanks a lot

    Hi,
    Probably too late, but here's the solution:
    - Transaction SE51 program: SAPLV60F and dynpro number: 0030
    - Goto 'Logical execution' or something like that (i'm connected in french)
    -  Modify standard code line 75: here I have added the field 'LIBEL'
        FIELD:
          FPLT-FAKSP,
          FPLT-FAREG MODULE FPLT-FAREG_PRUEFEN ON REQUEST,
    *{   REPLACE        DTAK910958                                        1
    *\      FPLT-FPTTP.
          FPLT-FPTTP,
          FPLT-LIBEL.
    *}   REPLACE
        CHAIN.
    Il means that field LIBEL will be checked with field FPTTP.
    regards.

  • How to update database table with key field?

    Hello Experts,
    I have a database table with following fields
    MATNR   - Key
    SSOUR  -  Key
    KUNNR   - Key
    MENG1 
    MENG2
    MENG3
    And this table contains records like...
    MSD50001     R      1000001     5.30    2.30    5.25
    MSD50002     R      1000002     5.30    2.30    5.25
    MSD50003     R      1000003     5.30    2.30    5.25
    MSD50005     R      1000004     5.30    2.30    5.25
    MSD50004     R      1000005     5.30    2.30    5.25
    I have an internal table with same fields of above database table.
    MSD50001     A      1000001     5.30    2.30    5.25
    MSD50002     A      1000002     5.30    2.30    5.25
    MSD50003     A      1000003     5.30    2.30    5.25
    MSD50005     A      1000004     5.30    2.30    5.25
    MSD50004     A      1000005     5.30    2.30    5.25
    MSD50006     A      1000006     5.30    2.30    5.25
    I want to update the DB table with following internal table records.
    If internal table records = db table records are same then Update....else insert from internal table to db table.
    But here, SSOUR is key field so i am not able to use
    MODIFY dbtab from itab.
    It results me , entries in internal table are inserted into db table.
    So i have double records.
    Is there any statement which updates the key field? and if no fields in db table then insert it?
    Regards
    RH

    hi,
    u cannot update akey field.u can update only non key fields by using key field as a selection criteria.For example if u go to sm30 if u enter any table for inserting values, the key field will always be greyed out it is not succumbed to chnges.but u can insert value into ,if ur inserting and in the insert staemnet if  u have key field which is already present in the table it will return sy-subrc = 4 otherwise it will insert the record and return 0.
    eg for update :
    UPDATE zdm_wtyprof  SET upload_status = 'S'
                             WHERE spart = wa_upd-spart.
    here spart is the key field and it will update the status field in the table as S.
    if updated succesfully it will return 0.
    SIMILARLY U CAN USE select.

  • Joining tables with "similar" field values

    I have run into a situation where I want to join two tables on a field called U_LotusBox.    In my main table the the feild can contain values like 1 or 2 or 3 or 1,2,3,4.  That's 1 comma 2 comma 3 comma 4.  My field in the second tables contains only single digit values, like 1 ,2, 3 up to 5.
    When the two fields are identical I am able to retrieve data.  But if my field in the main contains a value of 1,2,3 and my secondary table field value is 2 I get no data returned because the two fields are not identical.  
    Is it possible to have a join that is "fuzzy" meaning that if the main table field values contains the value of the secondary field value, 2 in my example would it be possible to return data?
    Any thoughts would be appreciated.

    Ralph,
    Here in high-level details is an SQL example of creating two tables (test1 and test2) with one column in each table (col_a and col_b, respectively) to show how a join on a substring of one column can be tied to a column of another table:
    create table test1 (col_a char(5))
    create table test2 (col_b char(1))
    insert into test1 values ('1')
    insert into test1 values ('1,2,3')
    insert into test2 values ('1')
    insert into test2 values ('2')
    select col_a,test2_tbl1.col_b
    from test1 inner join test2 as test2_tbl1 on col_a=test2_tbl1.col_b or
    substring(col_a,1,1)=test2_tbl1.col_b or
    substring(col_a,3,1)=test2_tbl1.col_b or
    substring(col_a,5,1)=test2_tbl1.col_b
    col_a     col_b
    ~~~~~~~|~~~~~
    1         1
    1,2,3     1
    1,2,3     2
    thanks,
    John

  • Update one table with the max value of another table

    CREATE TABLE [dbo].[General](
    [a_id] int NOT NULL,
    [a_date] datetime NOT NULL,
    [c_date] datetime NULL)
    CREATE TABLE [dbo].[Specific](
    [a_id] int NOT NULL,
    [a_date] datetime NOT NULL,
    [b_id] int NOT NULL,
    [d_date] datetime NULL)
    insert into General values (111,'Jan 1 2013', null)
    insert into General values (112,'Jan 1 2013', 'Mar 10 2014')
    insert into General values (113,'Jan 1 2013', null)
    insert into General values (114,'Feb 1 2013', null)
    insert into General values (115,'Feb 1 2013', 'Apr 1 2013')
    insert into General values (116,'Feb 1 2013', 'Jan 1 1970')
    insert into Specific values (111,'Jan 1 2013',1, 'Jan 1 2013')
    insert into Specific values (111,'Jan 1 2013',2, 'Feb 1 2013')
    insert into Specific values (111,'Jan 1 2013',3, 'Mar 1 2013')
    insert into Specific values (112,'Jan 1 2013',1, 'Jan 1 2013')
    insert into Specific values (112,'Jan 1 2013',2, 'Feb 1 2013')
    insert into Specific values (113,'Jan 1 2013',1, 'Jan 1 1970')
    insert into Specific values (114,'Feb 1 2013',1, null)
    insert into Specific values (115,'Feb 1 2013',1, 'Jan 15 2013')
    insert into Specific values (115,'Feb 1 2013',2, 'Feb 15 2013')
    insert into Specific values (116,'Feb 1 2013',1, 'Jan 30 2013')
    insert into Specific values (116,'Feb 1 2013',2, 'Jan 1 1970')
    I want to update General.c_date only when the values are null or Jan 1 1970 from the maximum value of Specific.d_date as long as the maximum is not null or Jan 1 1970.    The two tables join on a_id and a_date.  In the example  above 
    a_id = 111 and a_date = Jan 1 2013 should have c_date = Mar 1 2013 and a_id = 116 and a_date = Feb 1 2013 should have c_date = Jan 30 2013.
    lg

    Try the below:
    CREATE TABLE [dbo].[General](
    [a_id] int NOT NULL,
    [a_date] datetime NOT NULL,
    [c_date] datetime NULL)
    CREATE TABLE [dbo].[Specific](
    [a_id] int NOT NULL,
    [a_date] datetime NOT NULL,
    [b_id] int NOT NULL,
    [d_date] datetime NULL)
    insert into General values (111,'Jan 1 2013', null)
    insert into General values (112,'Jan 1 2013', 'Mar 10 2014')
    insert into General values (113,'Jan 1 2013', null)
    insert into General values (114,'Feb 1 2013', null)
    insert into General values (115,'Feb 1 2013', 'Apr 1 2013')
    insert into General values (116,'Feb 1 2013', 'Jan 1 1970')
    insert into Specific values (111,'Jan 1 2013',1, 'Jan 1 2013')
    insert into Specific values (111,'Jan 1 2013',2, 'Feb 1 2013')
    insert into Specific values (111,'Jan 1 2013',3, 'Mar 1 2013')
    insert into Specific values (112,'Jan 1 2013',1, 'Jan 1 2013')
    insert into Specific values (112,'Jan 1 2013',2, 'Feb 1 2013')
    insert into Specific values (113,'Jan 1 2013',1, 'Jan 1 1970')
    insert into Specific values (114,'Feb 1 2013',1, null)
    insert into Specific values (115,'Feb 1 2013',1, 'Jan 15 2013')
    insert into Specific values (115,'Feb 1 2013',2, 'Feb 15 2013')
    insert into Specific values (116,'Feb 1 2013',1, 'Jan 30 2013')
    insert into Specific values (116,'Feb 1 2013',2, 'Jan 1 1970')
    update A
    Set c_date = (Select MAX(d_date) From Specific B where A.a_id = B.a_id Group by a_id
    having MAX(d_date) is not null
    and MAX(d_date)<>'1970-01-01 00:00:00.000')
    From General A
    Select * From General
    Drop table general,specific
    This would cause all records in General table to get updated which is not what asker want
    see below statement
    I want to update General.c_date only when the values are null or Jan 1 1970
    from the maximum value of Specific.d_date as long as the maximum is not null or Jan 1 1970
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to Update ESTMJ table with appended fields

    Attempting to do a mass load of data to table ESTMJ. Tried using an LSMW, but took a very long time...days in fact. Added a couple Z fields to this table in an append structure. Attempting to run BAPI_BUS1077_CREATE to add records, but how do I update the new Z fields using this BAPI?

    Hi,
    the af:column allows you to group columns
    <af:column>
    <af:column> </af:column>
    <af:column> </af:column>
    </af:clomn>
    Also, in HTML it is easy to assign a background color to cell, e.g. cell with Label 1 is red, Label 2 is green.
    Is there something like this in JSF?
    You can use CSS on the inlineStyl or contentStyle property to dynamically set CSS using EL. You can reference e.g. a managed bean , access the #{row} variable within the managed bean method and return the color based on the value you read for the each row
    Frank

  • Use of FM BAPI_EQUI_CHANGE to update equipement with customer fields

    Hello all
    I have extended the EQUI table with customer fields using customer include structure and append structure.
    I want to populate these customer fields with BAPI BAPI_EQUI_CHANGE Or BAPI_EQUI_CREATE.
    So I have extended the structure ITOB appending the same customer fields as in table EQUI.
    I have enhanced the function MAPXI_BAPI_ITOB_TO_ITOB which map data from structure BAPI_ITOB to internal structure ITOB.
    But the fields are not populated ?
    Has someone already the BAPI in that way ?
    Thanks
    Jerome

    Hello all
    I have extended the EQUI table with customer fields using customer include structure and append structure.
    I want to populate these customer fields with BAPI BAPI_EQUI_CHANGE Or BAPI_EQUI_CREATE.
    So I have extended the structure ITOB appending the same customer fields as in table EQUI.
    I have enhanced the function MAPXI_BAPI_ITOB_TO_ITOB which map data from structure BAPI_ITOB to internal structure ITOB.
    But the fields are not populated ?
    Has someone already the BAPI in that way ?
    Thanks
    Jerome

  • How to Update EKPO table with enhancement at header level-customer data tab

    Experts,
    I have a requirement where I had to create a new button in the 'customer data' tab(header) in the ME21N/ME22N Transaction and once it gets clicked a table control will appear and in that all the line items with item no, material and plant and an additional check box will display, and once any one checks the check box against the item/material in the table control the item data with additional z fields (already created the zfields in EKPO Table) should get updated.
    Displaying Table control and item data on the click of button was successful, but once you check the check box against the item and save the PO it is not updating the z-fields in the EKPO table.
    I have implemented all the user exits , badis but no results. 
    Once you check the box in the table control against each item in the header part (Table control is in header part (customer tab)) the line item EKPO table with z fields should get updated.
    Any Clues/ideas will be appreciated.
    Thanks in advance,
    Kalikonda.

    Hi,
    Can you please share the remedy for above issue, recently we have same issue in our system.
    or please send me any supportive doc. for the below mail
    Looking forward for your positive response.
    Thanks
    Mohan
    ([email protected])

  • Best way to update a table with disinct values

    Hi, i would really appreciate some advise:
    I need to reguarly perform a task where i update 1 table with all the new data that has been entered from another table. I cant perform a complete insert as this will create duplicate data every time it runs so the only way i can think of is using cursors as per the script below:
    CREATE OR REPLACE PROCEDURE update_new_mem IS
    tmpVar NUMBER;
    CURSOR c_mem IS
    SELECT member_name,member_id
    FROM gym.members;
    crec c_mem%ROWTYPE;
    BEGIN
    OPEN c_mem;
    LOOP
    FETCH c_mem INTO crec;
    EXIT WHEN c_mem%NOTFOUND;
    BEGIN
    UPDATE gym.lifts
    SET name = crec.member_name
    WHERE member_id = crec.member_id;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN NULL;
    END;
    IF SQL%NOTFOUND THEN
    BEGIN
    INSERT INTO gym.lifts
    (name,member_id)
    VALUES (crec.member_name,crec.member_id);
    END;
    END IF;
    END LOOP;
    CLOSE c_mem;
    END update_new_mem;
    This method works but is there an easier (faster) way to update another table with new data only?
    Many thanks

    >
    This method works but is there an easier (faster) way to update another table with new data only?
    >
    Almost anything would be better than that slow-by-slow loop processing.
    You don't need a procedure you should just use MERGE for that. See the examples in the MERGE section of the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9016.htm
    MERGE INTO bonuses D
       USING (SELECT employee_id, salary, department_id FROM employees
       WHERE department_id = 80) S
       ON (D.employee_id = S.employee_id)
       WHEN MATCHED THEN UPDATE SET D.bonus = D.bonus + S.salary*.01
         DELETE WHERE (S.salary > 8000)
       WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus)
         VALUES (S.employee_id, S.salary*.01)
         WHERE (S.salary <= 8000);

  • How to Generate sales orders with custom Fields using BAPI_BUSPROCESSND_CREATEMULTI

    Hi,
    I need to generate sales orders with custom fields on table CRMD_ORDERADM_H using BAPI_BUSPROCESSND_CREATEMULTI, after changing the structure BAPI_TE_CRMD_ORDERADM_H, and feed the  EXTENSIONIN table of the BAPI with data, the order is created, but any value on custom fields.
    After debuging, I saw that the BAPI search for structure conversion in table CRMC_OBJECTS_GEN, but we haven't entry with BAPI_TE_CRMD_ORDERADM_H in this table. is that the problem ?, Is there any way to fix it?
    Best Regards,
    Salah.

    That depends on where do you have the customer fields, check the table CRMD_CUSTOMER_H, if your custom fields are there, you need to use the changing parameter CUSTOMER_HEAD, I guess your already checked that one, right? but there's no custom fields, well...AET/EEWB doesn't enhance the strcuture of the BAPI, so you should do it manually, check the note following note for further details.
    988410 - FAQ: User-defined fields in the BAPI
    If you don't have access to the SAP Marketplace, in resume you should create an append on the structure BAPIBUS20001_CUSTOMER_H and include the following strcutrue CI_EEW_CUSTOMER_H
    Cheers!
    Luis

  • Creating an SQL Query for Project Custom Fields Values

    Hello:
    I'm currently trying to create an SQL Query to show all of the server's Project Custom Fields Values, along with the modification date.
    So far, I've managed to display correctly all of the data for all of the Projects' text value Custom Fields (those not based on a LookUp Table) with this query:
    SELECT
    MSP_PROJECTS.PROJ_NAME,
    MSP_CUSTOM_FIELDS.MD_PROP_NAME,
    MSP_PROJ_CUSTOM_FIELD_VALUES.CODE_VALUE,
    MSP_PROJ_CUSTOM_FIELD_VALUES.TEXT_VALUE,
    MSP_PROJ_CUSTOM_FIELD_VALUES.MOD_DATE
    FROM
    MSP_PROJ_CUSTOM_FIELD_VALUES
    INNER JOIN
    MSP_CUSTOM_FIELDS
    ON MSP_CUSTOM_FIELDS.MD_PROP_UID = MSP_PROJ_CUSTOM_FIELD_VALUES.MD_PROP_UID
    INNER JOIN
    MSP_PROJECTS
    ON MSP_PROJECTS.PROJ_UID = MSP_PROJ_CUSTOM_FIELD_VALUES.PROJ_UID
    WHERE
    MSP_PROJ_CUSTOM_FIELD_VALUES.CODE_VALUE IS NULL
    ORDER BY
    MSP_PROJ_CUSTOM_FIELD_VALUES.PROJ_UID,
    MSP_PROJ_CUSTOM_FIELD_VALUES.MD_PROP_UID
    However, when I try a new Query to obtain the actual values for the Projects Custom Fields that do use a LookUp Table, I can't seem to find what table in the model I'm supposed to link to the MSP_PROJ_CUSTOM_FIELD_VALUES.CODE_VALUE field (the TEXT_VALUE
    field has NULL value when CODE_VALUE field isn't NULL)
    Any suggestions on how to obtain the actual Projects' custom fields values instead of the Code Value, for Metadata that do use a LookUp Table?
    Also, I'm able to run this query only in the Published Database, since the MSP_CUSTOM_FIELDS table is empy in the Draft Database. Why is that?
    Awaiting your kind reply,
    Sebastián Armas PMO Project Manager

    Hi Sebastián, rather than directly accessing the database it would be better to use the PSI to get this data.  Take a look at the ProjTool sample in the SDK whcih gets this data.
    Best regards,
    Brian.
    Blog |
    Facebook | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
    Project Server TechCenter |
    Project Developer Center |
    Project Server Help | Project Product Page

  • Understanding logminer results -- inserting row into table with CLOB field

    In using log miner I have noticed that inserts into rows that contain a CLOB (I assume this applies to other LOB type fields as well, have only tested with CLOB so far) field are actually recorded as two DML entries.
    --the first entry is the insert operation that inserts all values with an EMPTY_CLOB() for the CLOB field
    --the second entry is the update that sets the actual CLOB value (+this is true even if the value of the CLOB field is not being set explicitly+)
    This separation makes sense as there may be separate locations that the values are being stored etc.
    However, what I am tripping over is the fact the first entry, the Insert, has a RowId value of 'AAAAAAAAAAAAAAAAAA' which is invalid if I attempt to use it in a flashback query such as:
    SELECT * FROM PERSON AS OF SCN #####'  where RowId = 'AAAAAAAAAAAAAAAAAA'The second operation, the Update of the CLOB field, has the valid RowId.
    Now, again, this makes sense if the insert of the new row is not really considered "+done+" until the two steps are done. However, is there some way to group these operations together when analyzing the log contents to know that these two operations are a "+matched set+"?
    Not a total deal breaker, but would be nice to know what is happening under the hood here so I don't act on any false assumptions.
    Thanks for any input.
    To replicate:
    Create a table with CLOB field:
    CREATE TABLE DEVUSER.TESTTABLE
            ID NUMBER
           , FULLNAME VARCHAR2(50)
          , AGE NUMBER  
          , DESCRIPTION CLOB
           );Capture the before SCN:
    SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER FROM DUAL;Insert a new row in the test table:
    INSERT INTO TESTTABLE(ID,FULLNAME,AGE) VALUES(1,'Robert BUILDER',35);
         COMMIT;Capture the after SCN:
    SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER FROM DUAL;Start logminer session with the bracketing scn values and options etc:
    EXECUTE DBMS_LOGMNR.START_LOGMNR(STARTSCN=>2619174, ENDSCN=>2619191, -
               OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG + DBMS_LOGMNR.CONTINUOUS_MINE + -
               DBMS_LOGMNR.COMMITTED_DATA_ONLY + DBMS_LOGMNR.NO_ROWID_IN_STMT + DBMS_LOGMNR.NO_SQL_DELIMITER)Query the logs for the changes in that range:
    SELECT
           commit_scn, xid,operation,table_name,row_id
           ,sql_redo,sql_undo, rs_id,ssn
           FROM V$LOGMNR_CONTENTS
        ORDER BY xid asc,sequence# ascResults:
    2619178     0C00070028000000     START                  AAAAAAAAAAAAAAAAAA     set transaction read write
    2619178     0C00070028000000     INSERT     TESTTABLE     AAAAAAAAAAAAAAAAAA     insert into "DEVUSER"."TESTTABLE" ...
    2619178     0C00070028000000     UPDATE     TESTTABLE     AAAFEXAABAAALEJAAB     update "DEVUSER"."TESTTABLE" set "DESCRIPTION" = NULL ...
    2619178     0C00070028000000     COMMIT                  AAAAAAAAAAAAAAAAAA     commitEdited by: 958701 on Sep 12, 2012 9:05 AM
    Edited by: 958701 on Sep 12, 2012 9:07 AM

    Scott,
    Thanks for the reply.
    I am inserting into the table over a database link.
    I am using the new version of HTML Db (2.0)
    HTML Db is connected to an Oracle 10 database I think, however the table I am trying to insert data into (via the database link) is in an Oracle 8 database - this is why we created a link to it as we couldn't have the HTML Db interacting with the Oracle 8 database directly due to compatibility problems (or so I've been told)
    Simon

  • How to update two tables with trigger

    Hi:
    how to update two tables with trigger ?
    I have two tables :
    (1)ASIA
    MI number;
    (2)ASIA_P
    ID number;
    When I insert a new value into the asia.MI ,I also can
    insert the same value into the asia_p.id field.
    I have write a trigger as follows but it does't work.
    create or replace trigger MI_TRG
    before insert on asia
    for each row
    declare
    seq number;
    begin
    select MI_SEQ.Nextval into seq from dual;
    :new.MI:=seq;
    insert into ASIA_PRO(MI_ID)
    values
    (seq);
    end MI_TRG;
    How to realize it ?
    thanks
    zzm

    Why do you say it does not work?

  • URGENT  update a table with a text that has a single quote in it

    Hello, I am trying to update a table with a text that has a single quote in it. I believe I need to use two singles quotes but I am not sure how.
    For example:
    UPDATE TEST
    SET DESCRLONG='Aux fins d'exportations'
    WHERE etc...
    Should I put 2 singles quotes before the quote in the text?
    UPDATE TEST
    SET DESCRLONG='Aux fins d'''exportations'
    WHERE etc...
    Thank you very much :)

    The best way depends on the version of Oracle.
    But, the quick and universal answer is to use two single quotes
    SQL> connect test/test
    Connected.
    SQL> create table test (descrlong varchar2(128));
    Table created.
    SQL> insert into test values ('This is a string with a '' single quote');
    1 row created.
    SQL> select * from test;
    DESCRLONG
    This is a string with a ' single quote
    SQL> update test set descrlong='Aux fins d''exportations'
      2  where descrlong like 'T%';
    1 row updated.
    SQL> select * from test;
    DESCRLONG
    Aux fins d'exportations
    SQL>                                             

Maybe you are looking for

  • Why can't I connect to Itunes store, after updating my ipad to OS 6?

    Why can't I connect to Itunes store, after updating mt Ipad to Os 6?

  • Problem loading Compact Flash to PSE6

    Never had a problem until today. Loaded a SDHC (NEF files) no problem. Tried loading Compact Flash (NEF files) and got the following message: "Nothing was imported. The file(s) or folder(s) selected to import did not contain any supported file types,

  • How do rename the Home Folder

    Someone else set up my iMac and named the home folder.  I want to change it to my name, not theirs.  How do I do that?

  • How to set encoding

    Hi! How do I set the encoding in an xml-file? I'm using the DocumentBuilder to create a Document and adds data to the DOM tree. Then I'm using a Transformer to write the DOM tree to a stream. The default encoding is UTF-8. I want to change this to is

  • Modeling Multi-Instance Loops of Activities?

    Hi, in the help for BPM 7.20 it says "When you use the Parallel For Each loop option, the following additional loop-specific data objects are automatically created: numberOfCompletedIterations This data object contains the number of completed loop in