Creating multiple records

When creating multiple records in a table using a SBO object eg invoice object, do you have to create a new business object for each record that is created?  There is a lot of overhead in doing this (eg each object takes about 1MB of mem so to create 1000 invoices would hog 1GB of mem).  Is there a way to create just one instance of the object and use it to create many records?  How is the object cleared in between each record creation?

Greg,
Everytime you call GetBusinessObject() you should, at the end, also release the acquired memory.
This can be done with the following code in .net (C#):
System.GC.Collect();
System.GC.WaitForPendingFinalizers();
Another way to clear all the data is to call the <b>GetByKey(-1)</b>; the document with docentry '-1' does never exists and the fields of the object are normally cleared.
Regards,
Jurgen

Similar Messages

  • Creating multiple records from 1 record in the source file for Import DM

    Hi Experts,
    Today I am working on an interface/import where I want to get the following result:
    Source file contains a records like:
    Account, Entity, DriverX
    Sales,EntityA,ZZ
    The BPC appset contains the 2 dimensions Account and Entity next to CostCenter dimension. The DriverX field in the source file is just additional information in the source file. However based on this DriverX we need to determine what CostCenter to choose but we also need to have the same record assigned to a second record in BPC.
    Following my example, based on DriverX value I need to create 2 records:
    Account, Entity, CostCenter,
    Sales,EntityA,CC1
    Sales,EntityA,CC2
    I don't have a problem assigning the record to 1 CostCenter based on DriverX value but I have a problem creating my second record. Does any of you have had the same "challenge" and if so would you like to share the solution for this?
    Best regards,
    Johan
    PS: I am working on SAP BPC, version 7.0 Microsoft version.

    Hi Greg,
    Many thanks for your answer. And yes this would be a solution. However I just simplified my case as the decision to create an second record and where to post is depending on more than 1 field in the source.
    But I will keep it in mind, because I also can opt for a solution to store data differently in BPC fac-tabels which will help me to use script logic.
    If it is not possible to create multiple records from a single records in the standard functionality in the Transformation and/or Conversion file, I have to create a custom DTSX or change my way of storing data.
    Anyone else who is having an alternative idea like Greg came up with?
    Please let it know!
    Best regards,
    Johan

  • HCM Processes and Forms - Create multiple records of one infotype (eg 0008)

    Dear all,
    I'm trying to create two new records in infotype 0008 (basic pay). Regarding it's time constraint 1 it should like the following:
    Before
    01.01.2010 - 31.12.9999 - 2000u20AC
    After
    01.01.2010 - 08.11.2010 - 2000u20AC
    09.11.2010 - 31.12.2010 - 2500u20AC
    01.01.2010 - 31.12.9999 - 3000u20AC
    So I want to add two splits two the record. One is easy, as it's done by the SAP_PA operation. I experimented with the record indices and duplicating my fields, but it didn't work. Another idea would be to retriggerd the SAP_PA several times using scenario steps.
    Can you give me a hint, by which lever multiplee splits can be achieved? Or is this not possible at all?
    Thanks in advance,
    Peter

    Thanks for your fast reply.
    Knowing this as a fallback is comforting. I just want to ensure, that I don't apply any coding, if a task is also possible by customizing.
    Another idea I had in the meantime was to execute the SAP_PA several times. Do you have any experience, if this works to create multiple records in one infotype?
    Edited by: Peter Gilberg on Nov 9, 2010 2:34 PM

  • Can we create multiple records before navigation to that block

    Can we create multiple records and assign values in Forms, before navigation to that block (in a trigger ), and populate ?

    Hello,
    No you cannot. You need to be inside the block in order to use the Create_Record built-in.
    Francois

  • How to create multiple records using ADF

    Currently working on my first ADF BC and UIX project, and I basically want to create multiple records after a user makes a choice on the screen. I would like to know at what layer should this functionality be implemented?
    Would this be more at the Struts/Controller level, where I have a java class to perform the creation as part of a data action? I ask because, I am not sure if this is feasible at the ADF BC level (View objects and Entity Objects) via some sort of customization, and i am new to the different possibilies avail as part of the ADF framework
    Regards
    Anora
    (Jdeveloper 10.1.2.1 build 1913, Oracle DB 10.1.2)

    I'd put it into the application module. You then can call the method from the controller layer or from an other application module. This way you put it into the business logic, which helps if you ever decide to use a different client approach (like swing).

  • JDev 11g: Create Multiple Record.

    Hi,
    I have a requirement to create multiple record by clicking the create button multiple times and on one click it should save all the records. Everything is working fine, but the issue is,
    when user created 4 records and the 5th record he doesn't want to create then issue is comming. Application is forcing him to enter the data, is there is any way to handle this situation.
    I mean, if the 5th record doesn't contain any data.. it should save 4 records only. Please suggest me the solution to achieve this.
    Thanks,
    Rajesh

    Hi Shay,
    Thanks for your reply. But your second solution will never occur in my case because validator methods will not allow user to click on save button without entering the proper data.
    Is there any otherway instead of deleting the record to achieve this functionality.
    Thanks,
    Rajesh

  • Single Form Erroneously Creating Multiple Records

    I've created a form that uses several pages, with different fields of the form on each page. The pages branch from one to the next depending on the choices made by the user, mostly using a regular select list or a radiogroup with submit. The problem I'm having is that some fields are being populated in one record on one page, and then the information entered by the user on the next page, for another column, creates a new record, so that every time a user would be finished making a complete entry into the form, multiple records have been created, with null fields in each from where those fields were populated, but in a different record. How can I make sure that only one record is created by the user each time they use this form?

    Basically the way the page is designed is that there are only three main pages the user will see. 1) The login page then 2) The main menu page, and then 3) The page where they input the information that should populate the remainder of the fields in that record in the table.
    The login page simply allows the user to access the menu page, and submits no data. The main menu page consists of 5 fields. Three of them are text fields, the fourth is a date field with a date picker. The fifth field is a radiogroup with submit that has 5 options which branch to 5 respective pages. Upon selecting an option from the radiogroup, these fields submit their data to the table and redirect the user to whichever page was designated by their choice.
    This brings up the third page. Most of these other 5 pages consist simply of 4 fields; two required select lists, one required textarea field, and one nonrequired textarea field. Anyway, the problem occurs because instead of populating the remaining fields in the same record, each page with information to submit creates a new record.
    I realize that the preceding may not be any additional relevant info., but I thought that if anything, there may be a better way to do that anyway. I thought that maybe editing the "Process" in the Page Definition could be where I need to change something, but I'm not sure how.
    Right now my "Process Point" is set as "On Submit - After Computations and Validations," and my "Run Process" is set as the default "Once Per Page Visit." These settings are the same on every page on which I have fields that submit data; however, one difference I noticed is in the process editing interface for the initial menu page, the "Name" says "Insert row into USER_INPUT (table name) with a "Type" of "PL/SQL Anonymous Block", whereas all the other pages processes are named "Process row of USER_INPUT" with a type of "Automatic Row Processing (DML)." Am I even close to where I need to be looking to find the solution to this problem? Sorry for the novel I just wrote, but if there's any additional info. I can provide, just let me know.

  • Data merge CS5, will not create multiple records.

    I have my base elements on the master page and two text boxes on page 1 on of a single page document. I am creating raffle tickets so there is box on the left side of the page and the right side of the page. I need this step 3 times down the sheet.
    I've tried using a comma delimited and tab delimited file. These files have two columns with numbers 1-500 and each with a different heading. Ticket 1 and Ticket 2.
    When I turn on multiple records nothing step and repeats. It looks exactly the same as a single record. I make raffle tickets like these quite often but the template I've used for the last few years is 1 up, built to the size of the ticket, and everything works great. I end up with 500 pages, send through our impositioning software then print.
    In this case, my client wants to print the files themselves and have them stepped up 4 per sheet.
    Does anyone know what I might be doing wrong?
    Thanks!

    When I read the third line of Kimberli's email, I thought of this article from my blog which might help if the artwork was set up as it was in previous years (i.e. 1up)
    http://colecandoo.wordpress.com/2011/10/28/theres-more-than-one-way-to-cut-and-stack/
    It takes the 1-up PDF and allows it to be placed into InDesign as it it were prepared in an n-up imposition.
    It isn't a fix to the multiple record issue that the OP has, but rather a workaround.

  • Create Multiple records in transformation routine

    Hi,
    Could anyone let me know how to do creation of multiple records (from one source record) in BI 7.0 transformation routine, E.g.
    Source record
    Cost Center   Period 01       Period 02
           1234          $30                $50
    --> (After transformation)
    Period    Cost center    Total cost
    01              1234             $30
    02              1234             $50
    Many thanks,
    Alvin

    The problem was with the following code segment:
    tmp_curr_rec_id := get_block_property( :system.current_block, current_record );
    set_record_property( tmp_curr_rec_id, :system.current_block, status, new_status );
    After omitting these two lines, the code worked properly.
    Thansk for all whoe replied.
    Regards,
    Tamas

  • Creating Multiple records from 1 record

    Very new to OWB and running into a problem. I have data from a reservation system that stores an arrival and departure date for a reservation. I need to be able to create a separte record for each day of the stay in order to simplify reporting. In addition there is a revenue field which I need to divide over each day of the stay.
    Any assistance would be apreciated.

    It's easy to turn a single row into multiple rows - that's what Pivot operator is for http://download.oracle.com/docs/html/B12146_01/mapoperators.htm#sthref1865.
    The challenge I see is how to turn the range of values into discrete individual values (which then can serve as input to Pivot). Does the range have predictable and manageable upper limit, like a week?
    Nikolai Rochnik

  • Creating multiple records in a block while sitting in another block

    Hey friends....I've 2 blocks in my form. Block-A contains producats A,B etc and Block-B contains colors like Black, Blue etc. I wish that when user selects 2 or more colors in Block-B and presses a button in that block, then each color should be assigned to each of the product with a (No.of colors x No. of Products) recods e.g if user entered 2 products A & B in two rows of Block-A and 2 colors Black & White in Block-B, then Product A should have 2 records with each color i.e Black and White. In the same way Product B should have 2 records i.e Product B with 1 record with color Black and 2nd record with color White.
    Is there any body to accomplish this job?

    Product table is not a Master/Detail because Product itself is not dependant on color at the time of creationMaster-detail means that you can create a master (Product) without any details (colors).
    2 records for Paint with color Black and Red. And 2 records for Shirt with color Black and Red. So total 4 records will be created with a minimum entry from userDoing it that way will cause data-redundancy and possible inconsistences. I would go with a detail-table for Color-Assignments to products.
    I created one detail block of products and anothers detail block of colors with check-boxesOk so far. Lets assume you go with the "Detail"-table for color-assignments to products, then you would:
    - Base the Color-block on the color-table.
    - Create an additional checkbox as non-dasetable-item.
    - Create a POST-QUERY-trigger which check the PRODUCT_COLOR-table, if a record exists for the combination of color and product and sets the checkbox to checked or unchecked.
    - Create a ON-UPDATE-trigger on that block, which does an INSERT into PRODUCT_COLOR if the checkbox is checked or an DELETE from PRODUCT_COLOR if the checkbox is unchecked.
    hope this helps

  • SqlLoader: how to create multiple records out of one CSV input line?

    A question concerning the SQL-Loader.
    I need to load data from a CSV file where one of the CSV values determines how many records should be inserted.
    Example of the input data:
    KEYWORD;2;REC1_COL1_X,REC1_COL2_X;REC2_COL1_X;REC2_COL2_X
    KEYWORD;3;REC1_COL1_Y;REC1_COL2_Y,REC2_COL1_Y;REC2_COL2_Y;REC3_COL1_Y;REC3_COL2_Y
    KEYWORD;4;REC1_COL1_Z;REC1_COL2_Z,REC2_COL1_Z;REC2_COL2_Z;REC3_COL1_Z;REC3_COL2_Z,REC4_COL1_Z;REC4_COL2_Z
    If the KEYWORD is found, then the next value determines how many value pairs will follow, and therefore how many rows should be created in the affected DB table.
    As a result I hope to achieve this:
    SELECT Column1, Column2 FROM testTable
    REC1_COL1_X,REC1_COL2_X
    REC2_COL1_X;REC2_COL2_X
    REC1_COL1_Y;REC1_COL2_Y
    REC2_COL1_Y;REC2_COL2_Y
    REC3_COL1_Y;REC3_COL2_Y
    REC1_COL1_Z;REC1_COL2_Z
    REC2_COL1_Z;REC2_COL2_Z
    REC3_COL1_Z;REC3_COL2_Z
    REC4_COL1_Z;REC4_COL2_Z
    I learned how to import data using Oracle SQL loader for cases where one input line more or less matches a (new) row in a DB table. But how to handle this?

    Hello 784948.
    Assuming that the delimiter is a comma, and also assuming that the number of pairs is limited to four, you could use the following tested control fileLOAD DATA
    APPEND
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '1'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER
    , PairCountColumn  FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '2'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '3'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '2'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '3'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '4'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '3'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '4'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '4'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    , InputColumn1
    , InputColumn2
    )Luke
    Please mark the answer as helpful or answered if it is so. If not, provide additional details.
    Always try to provide create table and insert table statements to help the forum members help you better.
    Edited by: Luke Mackey on Aug 5, 2010 1:23 PM (always better to test before posting)

  • Pl/Sql for creating Multiple record type file

    Hi all,
    I have a scenario where I need to create a flat file that contains two different record types in the same file. Basically, a way of getting both the header record and the corresponding detail records. Following are the details:
    Table A (Header Records)
    "REC_TYPE" "M_ID" "DATE" "*C_ID*"
    1 123 090807 *222*
    1 345 090907 *333*
    Table B (Detail Records)
    "REC_TYPE" "A_NO" "LINE_NO" "*C_ID*"
    2 7564 1 *222*
    2 4535 2 *222*
    2 4656 1 *333*
    2 6576 2 *333*
    In the output file, the resultset should be as:
    222, 123, 090807 (Header Record)
    *222, 7564, 1* (Detail Record)
    *222, 4535, 2* (Detail Record)
    333, 345, 090907 (Header Record)
    *333, 4656, 1 (Detail Record)*
    *333, 6576, 2 (Detail Record)*
    Any input is greatly appreciated.
    Thank you!

    NOT TESTED ! Don't remember when I used loops for the last time. I won't have database access until september (on vacation).
    declare
      type header_t is record
        c_id ... ,
      type detail_t is record
        c_id ... ,
      header_r header_t;
      detail_r detail_t;
      cursor c_h is select c_id, ...
                      from ...
                     order by 1;                      -- header cursor
      cursor c_d is select c_id, ...
                      from ...
                     order by 1;                      -- detail cursor
      end_line    varchar2(2) := chr(13) || chr(10);  -- chr(10) to be used for non Windows
      a_separator varchar2(1) := ',';
      a_buffer    varchar2(32767);
      l_buffer    constant number := 32767;
      f_handle    utl_file.file_type;
      procedure buffer_put(p_line in varchar2) is
      begin
        if length(a_buffer) + length(p_line) < l_buffer then
          a_buffer := a_buffer || p_line;
        else
          utl_file.put(f_handle,a_buffer);
          a_buffer := p_line;
        end if;
      end;
      function build_header_record(p_record in header_t) return varchar2 is
        retval varchar2(4000) := '';
      begin
        retval := retval || to_char(p_record.c_id) || a_separator;
        retval := retval || ... || a_separator;
        retval := retval || ... || end_line;
        return retval;
      end;
      function build_detail_record(p_record in detail_t) return varchar2 is
        retval varchar2(4000) := '';
      begin
        retval := retval || to_char(p_record.c_id) || a_separator;
        retval := retval || ... || a_separator;
        retval := retval || ... || end_line;
        return retval;
      end;
    begin
      f_handle := utl_file.fopen ('THE_DIRECTORY','the_file.ext','w',l_buffer);
      open c_h;
      open c_d;
      loop
        fetch c_h into header_r;
        exit when c_h%notfound;
        buffer_put(build_header_record(header_r));
        if c_h%rowcount > 1 and (header_r.c_id = detail_r.c_id) then
          buffer_put(build_detail_record(detail_r));
        end if;
        loop
          fetch c_d into detail_r;
          exit when c_d%notfound or (detail_r.c_id != header_r.c_id);
          buffer_put(build_detail_record(detail_r));
        end loop;
      end loop;
      if length(a_buffer) > 0 then
        utl_file.put(f_handle,a_buffer);
      end if;
      utl_file.fflush(f_handle);
      utl_file.fclose(f_handle);
    end;Regards
    Etbin
    utl_file.fclose(f_handle); instead of utl_file.fclose;
    Edited by: Etbin on 11.8.2009 8:54

  • HOW TO CREATE MULTIPLE RECORDS IN A NONE DATABASE BLOCK?

    I have a Form where I have a none database block with unbound items. The block
    has 10 records. In the when-new-block instance I run a query by which I would
    like to fill up the block with data. The code fragment looks like the
    following:
    begin
    declare
    tmp_curr_rec_id number;
    begin
    -- a hibak kiolvasasa
    for c_hibak in ( select h.*, h.rowid
    from hibak h
    where 1=1 -- WF - Ide kerul a szurofeltetel
    order by bejelentes_datum asc
    ) loop
    -- bemasoljuk az adatokat az unbound item-ekbe
    :mc_adat.ub_azonosito := c_hibak.azonosito;
    :mc_adat.ub_verzio_letrehozas_datum :=
    c_hibak.verzio_letrehozas_datum;
    :mc_adat.ub_bejelento := c_hibak.bejelento;
    :mc_adat.ub_bejelentes_datum := c_hibak.bejelentes_datum;
    :mc_adat.ub_wf_verzio_csomopont :=
    c_hibak.wf_verzio_csomopont;
    :mc_adat.ub_wf_utolso_esemeny_szoveg :=
    c_hibak.wf_utolso_esemeny_szoveg;
    :mc_adat.ub_hiba_leiras := c_hibak.hiba_leiras;
    :mc_adat.ub_hiba_hely := c_hibak.hiba_hely;
    :mc_adat.ub_rekord_jelleg := 'H';
    :mc_adat.ub_rowid := c_hibak.rowid;
    -- beallitjuk a rekordot-ot olyanra, mintha semmi nem valtozott
    volna
    -- nem szeretnenk a form bezaraskor mindenfele figyelmezteteseket
    -- olvasni a kepernyon
    tmp_curr_rec_id := get_block_property( :system.current_block,
    current_record );
    set_record_property( tmp_curr_rec_id, :system.current_block,
    status, new_status );
    create_record;
    end loop;
    end;
    end;
    The block's update allowed, insert allowed, delete allowed property is set to
    true.
    The result of the code above is that only the last record fetched shows up in
    the block. The problem is - as I found out - is that aech record is fetched,
    the values are copied to the block items, but the create_record built-in
    command would not move the cursor to the next row.
    Can some one please help me with this?
    TIA,
    Tamas Szecsy

    The problem was with the following code segment:
    tmp_curr_rec_id := get_block_property( :system.current_block, current_record );
    set_record_property( tmp_curr_rec_id, :system.current_block, status, new_status );
    After omitting these two lines, the code worked properly.
    Thansk for all whoe replied.
    Regards,
    Tamas

  • File Adapter - Multiple Record Types to same Target

    I am currently reading in a fixed length file and loading into a table.
    The issue is, some of the lines in my file differ by two spaces at the end. See example below.
    For example,
    Record 1 might look like :
    DD/MM/YY - length of 8
    Record 2 might look like:
    DD/MM/YY{space}{space} - length of 10
    and they both go into the same date column of my target
    Question 1) Is there a way for BPEL to skip the two spaces at the end of each line for Record 2
    Queston 2) I have currently created multiple record types for the two types but it won't allow me in my transformation to map them both to the "date" column in the target table. It says multiple nodes cannot be mapped to the target
    Any help would be appreciated.

    Hi,
    Unfortunately the IKM SQLDR doesn't have the "when" condition to be wrote at ctl file.
    If you wish a simple solution, just add an option (drop me a email if you want a LKM with this)
    The point is:
    With a single option, you will control the when ctl clause and, for instance, can define:
    1) create 2 datastores (1 for each file)
    2) the first position will be a column at each datastore
    3) write the when condition to this first column at the LKM in the interface.
    Does it help you?

Maybe you are looking for