Insert multiple records from web dynpro

Hi,
How to insert multiple records from web dynpro applications to SAP backend system ?
Thanks,
sowmya

Hi soumya..
   if want to multiple row selected  then save into the Sap back End..
   value node--table.
Backend value node=table_bapi_input;
   back end internal table --tableback.
int size=wdcontext.nodeTable().size();
int lead=wdcontext.nodeTable().getLeadSelection();
table_bapi_input in=new table_bapi_input();
wdcontext.nodetable_bapi_input().bind(in);
   for(int i=size-1;i>0;i--){
tableback set=new tableback()
if(lead==i || wdcontext.nodeTable().ismultiSelection(i)){
set.setName(wdContext.nodeTable().getTableElementAt(i).getName();
in.addZc_input(set);
wdContext.currenttable_bapi_inputElement().modelobject().excute();
wdContext.nodeOutput().invalidate();
thanks
jati

Similar Messages

  • Mapping is inserting multiple records from a single source to Dimension.

    Hi All,
    I am very new to OWB. Please help me out. I've created Dimension with the help of the wizard and then a mapping which consist of single source and single dimension. The mapping is populating nearly 500 times of the actual records. Following are some details to give you a better understanding of mapping: I created a dimension with four levels and two hierarchy. Levels are L1, L2, L3 and L4 and hierarchies are H1-> L1, L2 and L4
    and H2-> L3 and L4. L4 is lowest level of hierarchy. L1 and L3 are parent levels in the respective hierarchies. I assigned an attribute of each level as Business identifier that means business identifier attribute is different in each level. In mapping I mapped the parent natural key(Key for parent Level in a hierarchy) as the value which has been mapped for parent level. The result is coming 500 times of the record that exist in source table. I've tried even single common business identifier for each level but again the result is 5 times of the records. Please let me know the solution.
    Thanks is advance.
    Amit

    Hi ,
    You may not be having multiple records in your dimension.
    To understand better the records insertion, try a snow flake version of the dimension and see how the records are inserted as per the levels in the respective tables.
    Thanks

  • Inserting multiple records from a QofQ?

    I'm doing (still!) an app for parents to sign up for
    information from their child's school, and giving them the option
    to choose more than one grade using checkboxes. I'm passing the
    grades as a string, then parsing them into individual searchable
    grades, and then querying the db to see if that email/school/grade
    subscription already exists. If it doesn't exist, I want to add it
    to the db. Using CFDUMP, I've verfied that I'm extracting the
    correct records to add.
    I've attached the query that selects the records to be added,
    and then my current INSERT query (which chokes on "INSERT") -- I've
    tried putting brackets around INSERT per the CFWACK, but that
    didn't work either. The error is "Query of Queries syntax error;
    Encountered INSERT".

    I can see a couple things wrong with your code -
    1) You shouldn't need to apply the following restrictions to
    your subsToAdd query as you already apply them to your Ignatz
    query:
    (Email = '#Form.Email#') AND (LocationCode =
    #Form.LocationCode#)
    2) For your insert statement, you want to surround the entire
    SQL statement with the <cfloop> block:
    <cfquery name="saveSubs" dbtype="query">
    <CFLOOP query="subsToAdd">
    INSERT INTO ...
    </CFLOOP>
    </cfquery>
    3) You're probably also recieving an error because you aren't
    qualifying your text fields (like Email) with single quotes. A
    better solution would be to use the <cfqueryparam> tags with
    your query - plus it will make your SQL run faster as well!
    INSERT INTO Subscriptions (Email,LocationCode,GradeID)
    VALUES (<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
    value="#Email#" maxlength="50">,
    <cfqueryparam cfsqltype="CF_SQL_VARCHAR"
    value="#locationCode#" maxlength="30">,
    <cfqueryparam cfsqltype="CF_SQL_INTEGER"
    value="#gradeID#">)
    (I took a guess as to the datatypes of your fields, you'll
    have to adjust them accordingly).

  • Inserting multiple records into a database from a table

    I have a dynamic table with rows upto 10. i am trying to insert all the records in these rows into a database ( msaccess)
    table name: Table1 ( in my form )
    Database table : movies_comments ( as posted in stefan's forums ).
    table columns: username, movieid, comments
    i am using the following code.
    Database.ExecSQL() function is as posted in stefcamerons forums.
    var tlength = xfa.resolveNode("form1.#subform[0].Table1.Row1[*]").length;
    xfa.host.messageBox("tlength is :" +tlength);
    for ( var i = 1; i <= tlength; i++)
    var username = xfa.resolveNode("form1.#subform[0].Table1.Row1["+i+"].user_name").rawValue;
    var movieID = xfa.resolveNode("form1.#subform[0].Table1.Row1["+i+"].movie_id").rawValue;
    var commentS = xfa.resolveNode("form1.#subform[0].Table1.Row1["+i+"].comment_").rawValue;
    Database.ExecSQL("INSERT INTO movie_comments (username, movieId, comment) VALUES ('username','movieID', 'commentS');");
    i am trying to insert multiple records using the code above. But i am getting error
    GeneralError: Operation failed.
    XFAObject.resolveNode:1:XFA:form1[0]:#subform[0]:Button1[0]:click
    SOM expression returned list when single result was expected
    suggest me an alternate way to insert multiple records from a table into a database.
    thank Q

    figured it out. I changed the ...OR (alternative names = colname) in the recordset to ...OR (alternative names LIKE %colname%). Works like a charm now- the result of a good night's sleep.

  • Inserting multiple records in to database table using webdynpro abap

    Hi all,
    I have created a username inputfield,a button and a table
    with one coloumn.
    If i enter  names in the input field then the values should be
    displayed in that table.
    Even i have got the answer i am not able to insert
    the values in to database(ztable) table.
    i.e. only one value(1st) was inserted the second value was
    not inserted ....
    so kindly send me the coding to insert multiple records
    into the database table......
    by,
    ranjith

    hi Ranjith,
    If you want to insert multiple records from the webdynpro view table to database table then try the following code.
    DATA lo_nd_tablenode TYPE REF TO if_wd_context_node.
      DATA lo_el_tablenode TYPE REF TO if_wd_context_element.
      DATA ls_tablenode TYPE wd_this->element_tablenode.
      DATA it_tablenode LIKE STANDARD TABLE OF ls_tablenode.
      navigate from <CONTEXT> to <tablenode> via lead selection
      lo_nd_tablenode = wd_context->get_child_node( name = wd_this->wdctx_tablenode ).
      get element via lead selection
      lo_el_tablenode = lo_nd_tablenode->get_element(  ).
      get all declared attributes
      lo_nd_tablenode->get_static_attributes_table(
      IMPORTING
        table = it_tablenode ).
    MODIFY databasetablename FROM TABLE  it_tablenode.
    here it_tablenode is the internal table which holds the value from webdynpro view..
    Regards,
    Shamila.

  • Insert multiple records into a table(Oracle 9i) from a single PHP statement

    How can I insert multiple records into a table(Oracle 9i) from a single PHP statement?
    From what all I've found, the statement below would work if I were using MySQL:
         insert into scen
         (indx,share,expire,pitch,curve,surface,call)
         values
         (81202, 28, 171, .27, 0, 0, 'C' ),
         (81204, 28, 501, .25, 0, 0, 'C' ),
         (81203, 17, 35, .222, 0, 0, 'C' ),
         (81202, 28, 171, .27, 2, 0, 'C' ),
         (81204, 28, 501, .20, 0, 1, 'C' ),
         (81203, 28, 135, .22, 1, 0, 'C' )
    The amount of records varies into the multiple-dozens. My aim is to utilize the power of Oracle while avoiding the i/o of dozens of single-record inserts.
    Thank you,
    Will

    You could look at the INSERT ALL statement found in the documentation here:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_913a.htm#2133161
    My personal opinion is that you probably won't see any benefit because under the hood I think Oracle will still be doing single row inserts. I could be wrong though.
    The only way to confirm was if you did a test of multiple inserts vs an INSERT ALL, that is if the INSERT ALL met your requirements.
    HTH.

  • Insert Multiple records using Database adapter with Stored procedure func

    Hi All,
    I want to insert multiple records on a database using a stored procedure. I wanted to insert those records using a Database Adapter and the Database adapter should be invoked by a Mediator.
    Can somebody suggest me with ideas whether it can be acheived with OOB capabtilities in SOA suite or not?
    Thanks for your help in advance.
    Thanks,
    Shiv

    The use case you want to achieve is feature supported by the DBAdapter and it is possible to invoke the same from mediator.
    Please have a look at the oracle documentation and you should be able to get the necessary information.
    The below links should help you as well:
    http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10231/adptr_db.htm
    http://blogs.oracle.com/ajaysharma/2011/03/using_file_adapter_database_adapter_and_mediator_component_in_soa_11g.html
    There are some video tutorials as well :)
    http://www.youtube.com/watch?v=dFldS-fDx70 This should also help
    Thanks,
    Patrick

  • Inserting multiple records in a data block

    Hi, how do i insert multiple rows from a record group into a data block. Thanks

    You do it manually. Copy the values and move to the next record in the record group and in the block.
    You might like the concept of basing a block on a stored procedure better. Check out the stored procedure based block sample that comes with the Oracle Forms demos.

  • Insert Multiple Records and newest record id

    The problem I have is I am using a somewhat normalized
    database and I am trying to enter multiple records from a form into
    a table called catfit. It also needs to add information to another
    table called prodmat and pull the id of the record I just added to
    the prodmat table and insert it into the catfit table in one shot.
    Promat - Holds all of the products
    columns in this table
    prodid
    mold
    desc
    features
    pic
    Catfit - Table that links Prodmat and Modcats
    columns in this table
    prodid
    catid
    modlid
    Now the form I have
    <form method="post" action="action.cfm">
    <select name="modlid">
    <option value ="#modlid#"
    selected="selected">#modlid#</option>
    <option value="1">Sewing Machines</option>
    <option value="9">Vacuums</option>
    <option value="12">Air Purifiers</option>
    </select>
    <select name="catid">
    <option value ="#catid#"
    selected="selected">#catid#</option>
    <option value="None">None</option>
    <option value="1">Sewing
    Machines-Embroidery</option>
    <option value="2">Sewing
    Machines-Computerized</option>
    <option value="3">Sewing
    Machines-Professional</option>
    <option value="4">Sewing
    Machines-Quilting</option>
    <option value="5">Sewing
    Machines-Electronic</option>
    <option value="6">Sewing Machines-Value
    Machines</option>
    <option value="7">Sewing
    Machines-Sergers</option>
    <option value="8">Sewing
    Machines-Specialty</option>
    <option value="9">Air Purifier</option>
    <option value="10">Vacuums-Upright</option>
    <option value="11">Vacuums-Canister</option>
    <option value="12">Vacuums-Central</option>
    </select>
    <select name="catid">
    <option value ="#catid#"
    selected="selected">#catid#</option>
    <option value="None">None</option>
    <option value="1">Sewing
    Machines-Embroidery</option>
    <option value="2">Sewing
    Machines-Computerized</option>
    <option value="3">Sewing
    Machines-Professional</option>
    <option value="4">Sewing
    Machines-Quilting</option>
    <option value="5">Sewing
    Machines-Electronic</option>
    <option value="6">Sewing Machines-Value
    Machines</option>
    <option value="7">Sewing
    Machines-Sergers</option>
    <option value="8">Sewing
    Machines-Specialty</option>
    <option value="9">Air Purifier</option>
    <option value="10">Vacuums-Upright</option>
    <option value="11">Vacuums-Canister</option>
    <option value="12">Vacuums-Central</option>
    </select>
    <select name="catid">
    <option value ="#catid#"
    selected="selected">#catid#</option>
    <option value="None">None</option>
    <option value="1">Sewing
    Machines-Embroidery</option>
    <option value="2">Sewing
    Machines-Computerized</option>
    <option value="3">Sewing
    Machines-Professional</option>
    <option value="4">Sewing
    Machines-Quilting</option>
    <option value="5">Sewing
    Machines-Electronic</option>
    <option value="6">Sewing Machines-Value
    Machines</option>
    <option value="7">Sewing
    Machines-Sergers</option>
    <option value="8">Sewing
    Machines-Specialty</option>
    <option value="9">Air Purifier</option>
    <option value="10">Vacuums-Upright</option>
    <option value="11">Vacuums-Canister</option>
    <option value="12">Vacuums-Central</option>
    </select>
    <input type="text" name="modl" value="#modl#"
    style="form">
    <input type="text" name="pic" value="#pic#"
    style="form">
    <textarea name="desc" rows="25" cols="60" wrap="virtual"
    value="#desc#">#desc#</textarea>
    <textarea name="features" rows="25" cols="60"
    wrap="virtual" value="#features#">#features#</textarea>
    <input type="submit" value="Submit" style="form"
    name="submit">
    </form>
    I have worked with the action.cfm page to no avail what so
    ever so I won't even post it. Now the prodmat table is the table
    where I need to get the prodid (Autonumber column) for the record
    that was just inserted so I can insert that number into the catfit
    table under the prodid column (number column). So this what I
    hoping to get in the end.
    When someone submits this form it will add the data to the
    prodmat table and grab the prodid generated from the new record.
    Then instert a new record for each of the catid select boxes into
    the catfit table. so something like this.
    If they select all three categories upon the submit it would
    add to the catfit table for each record:
    molid = 1
    catid = 2
    prodid = 16 (for instance this would be the newest record
    added to the prodmat table)
    molid = 1
    catid = 6
    prodid = 16
    molid = 1
    catid = 8
    prodid = 16
    Please help I am loosing my hair over this!

    Azadi Saryev wrote:
    > instead of
    > AND CID=#form.CDI#
    > you have to use something like
    > AND CID IN (<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.CDI#"
    > list="yes">)
    > since #form.CDI# contains a list of values, not a single
    value
    No. Don't do that. It would produce the same results you were
    getting before ie. the values for all three records would be the
    same.
    Number the CDI fields just like you're doing with form.catID.
    So each set of values is grouped by number
    form.catId1, form.CDI1
    form.catId2, form.CDI2
    form.catId3, form.CDI3
    Then extract the values inside your loop and use them in your
    UPDATE
    <cfloop index="LoopCount" from=1
    to=#Val(form.locCount)#>
    <cfset variables.locID= form["locID"& LoopCount] >
    <cfset variables.catid = form["catid" &
    LoopCount]>
    <cfset variables.CDI = form["CDI" & LoopCount]>
    </cfloop>
    Though you may not actually need an UPDATE here. Another
    option might be to do a DELETE of all existing records for a
    product, followed by an INSERT.

  • How to insert multiple records in a single query

    Dear all,
    Can you please tell
    how to insert multiple records in a single query ??

    INSERT INTO table_name (column_1, column_2) VALUES ('value_A', 'value_B')OR
    INSERT INTO table_name
    (column_1, column_2)
    SELECT 'value_A', 'value_B' FROM DUAL
    UNION ALL
    SELECT 'value_C', 'value_D' FROM DUAL
    ;Edited by: Benton on Nov 9, 2010 1:59 PM

  • Inserting multiple records in JSP and setting date format

    Hi,
    I'm looking at the possibilities for using JSP's as a web application.
    I've got a few questions about it:
    1) Is it possible to insert multiple records in the detail block of my JSP. Normally when I click the 'insert button', an insert JSP comes up, which is a html form with the possiblity of inserting only one record.
    2) Is it possible to change the format of a date field. Now a date field is displayed as 'YYYY-MM-DD'. My nls_date_format is something else.
    3) I can't get the static combo box working for the class EditCurrentRecord. The normal use combo box is no problem. Probably, I don't have the syntax correct. Could anyone provide an example for this.

    2) Just use the Calendar object. You can format the date any way you want. I am assuming that you are talking about how the date appears after a .toString() call.
    Here is how I do it (this code will probably look very bad I am trying to type into a very small space so bear with me):
    public static String traceDate(java.sql.Timestamp dt)
    try
    if (dt == null)
    return " ";
    else
    Calendar clFmt = Calendar.getInstance();
    clFmt.setTime(dt);
    return
    String.valueOf(clFmt.get(Calendar.MONTH) + 1) + "/" +
    String.valueOf(clFmt.get(Calendar.DAY_OF_MONTH)) + "/" +
    String.valueOf(clFmt.get(Calendar.YEAR)) + " " +
    String.valueOf( (clFmt.get(Calendar.HOUR) == 0) ? 12 : clFmt.get(Calendar.HOUR) ) + ":" +
    padLt(String.valueOf(clFmt.get(Calendar.MINUTE)),2) + ":" +
    padLt(String.valueOf(clFmt.get(Calendar.SECOND)),2) + " " +
    (clFmt.get(Calendar.AM_PM) == Calendar.AM ? "AM" : "PM");
    catch (Exception e)
    throw new RuntimeException(e.getMessage());
    (padLt is a custom function that just pads 0s to the left of the number)

  • Moving from Web Dynpro Java timesheet to Web Dynpro ABAP timesheet

    Hi
    We are in the process of moving from Web Dynpro Java ESS timesheet to Web Dynpro ABAP ESS timesheet.  When using Web Dynpro Java ESS timesheet it is possible to enter time using a daily or weekly view. 
    When using the Web Dynpro version and ensuring the period type is set to weekly view for the data entry profile it is only possible to enter time on the weekly view, the tab for the daily view is no longer available.
    Still using the Web Dynpro version and changing the period type to daily view I can enter time using the daily view and the weekly tab also becomes available, but the weekly tab is read only.
    Do you know if it is possible to make daily and weekly timesheet entry for one data entry profile.
    Thanks
    Mark

    Yes you can have only one view ie weekly or daily as per your CATS profile in CAC1.
    but of course you can select multiple profiles
    Configuration
    The application configuration HRESS_AC_CATS_1 is provided by default and allows you to provide default values for the application parameters. It also allows you to specify the layout and appearance of the application.
    The following application parameters are provided:
    HIDE_CLOCK_TIMES_IN_WEEKLY
    Hides the clock times in the weekly view.
    MULTIPLE_PROFILE
    Enables the selection of multiple data entry profiles from the dropdown list

  • Update cluster table from Web dynpro

    Hi
    I am trying to export data to a cluster table from web dynpro using this statement:
    EXPORT zhr_sanct_st100 FROM zhr_sanct_st100 TO DATABASE zhr_clrm(ep) ID zhr_clrm-srtfd.
    same piece of code work well if I include it in a report program through se38, but If I use it in Web dynpro, it doesnt update the cluster table and there is no error shown.
    please reply ASAP.
    Vishal kapoor

    Thanks for your immediate reply. it worked this way:
    IMPORT structure name TO structure name
      FROM DATABASE cluster table name
      TO wa_zhr_clrm
      ID zhr_clrm-srtfd.
    initially i missed to insert a work area wa_zhr_clrm, which has all the key fields of the cluster table.
    Regards
    Vishal Kapoor

  • ORA-01654 error message when inserting multiple records

    Hello all,
    I have a Test table with attributes TEST_ID, TEST_NAME, TEST_DATE, STATUS, and want to insert multiple records into this table based on user input form. If user select a value from the drop down list, and the number of records to insert into the Test table, the application should insert that many into the Test table with the same TEST_DATE, STATUS, but TEST_NAME should be the drop down list value + i (1....the number of inserted records). I manually created the form, and wrote a sql for the process.
    For example if the user select MUSIC, 3 then data should look like this
    TEST_ID TEST_NAME TEST_DATE STATUS
    1 MUSIC1 04/06/2010 Y
    2 MUSIC2 04/06/2010 Y
    3 MUSIC3 04/06/2010 Y
    I got the error ORA-01654: unable to extend index TEST_TOOL_ID.TEST_PK by 128 in table space FLOW_13120862905990037739.
    The process query
    DECLARE IDTEST NUMBER := 1;
    BEGIN
    WHILE (IDTEST < :P1_COUNT + 1) LOOP
    INSERT INTO TEST ( TEST_NAME, TEST_DATE, STATUS )
    VALUES ((:P1_TEST_NAME || ' ' ||IDTEST), SYSDATE, 'Y');
    END LOOP;
    END;
    Here is the link to this application
    http://apex.oracle.com/pls/apex/f?p=4000:1:3173416575551580::NO:RP:FB_FLOW_ID,F4000_P1_FLOW:32828,32828
    Any help would be appreciated.
    Thanks,
    Karoline

    This is the output i get when i change the getMessage with printStackTrace.
    String getMessage() replaced with printStackTrace:
    G:\studies\Chapter11\MakeDB.java:33: 'void' type not allowed here
                   System.out.println("Could not drop primary key on UserStocks table: "
    ^
    G:\studies\Chapter11\MakeDB.java:43: 'void' type not allowed here
                   System.out.println("Could not drop UserStocks table: "
    ^
    G:\studies\Chapter11\MakeDB.java:54: 'void' type not allowed here
                   System.out.println("Could not drop Users table: "
    ^
    G:\studies\Chapter11\MakeDB.java:64: 'void' type not allowed here
                   System.out.println("Could not drop Stocks table: "
    ^
    G:\studies\Chapter11\MakeDB.java:83: 'void' type not allowed here
                   System.out.println("Exception creating Stocks table: "
    ^
    G:\studies\Chapter11\MakeDB.java:102: 'void' type not allowed here
                   System.out.println("Exception creating Users table: "
    ^
    G:\studies\Chapter11\MakeDB.java:119: 'void' type not allowed here
                   System.out.println("Exception creating UserStocks table: "
    ^
    G:\studies\Chapter11\MakeDB.java:133: 'void' type not allowed here
                   System.out.println("Exception creating UserStocks index: "
    ^
    G:\studies\Chapter11\MakeDB.java:159: 'void' type not allowed here
                   System.out.println("Exception inserting user: "
    ^
    9 errors
    Tool completed with exit code 1

  • Inserting Multiple Records into two table

    I want to insert records from a ADF swing form into two tables. In the first table the primary key is generated by a trigger and then I need to retrieve the primary id generated and then insert multiple records in another table using the primarykey obtained from the first table as foreign key.
    How to do this ?

    User,
    If you're using ADF Business components, have a read on the DBSequence data type. If you have two VO's linked by a view link, and the FK is a DBSequence type, all this happens for you out-of-the-box.
    Hope this helps,
    john

Maybe you are looking for

  • Unable to open Office files

    Hi, Odd situation.  I have a user unable to open the majority of their Office docs from a shared drive.  However as an administrator if I log into the server open the file and close it then the user is able to open the document with no problems. Is t

  • Imac upgrade to 10.8-.software.  wifi hp 4780 printer not recognized now.  any suggestions

    upgraded to 10.8.5 software on my imac.  my HP 4780 photosmart printer is wifi capable.  it is now not recognized by the imac.  worked fine before.  do i need a new printer, or is there patch or app to make this work?

  • Step by step creation of sales order in oops

    step by step creation of sales order in oops

  • Time and/or Date incorrect after moving/copying/importing

    This has been going on for years and has messed up hundreds, maybe more, of the time/date on my photos in Aperture. If I select my entire photo library (typically preset to 'Date - Ascending') in Aperture, I can find hundreds of photos out of order.

  • MRP requirements

    Hi all, I am facing a really hard problem and I don't know how to solve it. Starting from a purchase order, I need to get the list of production order requirements for STOCK MATERIALS  that generated the purchase request. So for example if I have a p