To insert values in same table

hi,
  based on date difference  i want insert the data  in same table
eg: if date diff is 2
  i want insert 2 rows in a same table
how to resolve this
Edited by: hareeshKR on Oct 1, 2011 9:10 AM

Hi,
Please explain further what is your goal, what table are trying to add?
Because inserting data in a table is not supported.
Thanks.
Clint

Similar Messages

  • Insert data in same table based on some condition

    Hi. I am new to this forum.
    I have to write a stored procedure to Insert Data into a table say MYTABLE ,having structure as:
    Col1 Col2 Col3 ................ TotalInstallments CurrentInstallment PaidAmount MonthYear
    I have to insert all the data as it is in the same table(MYTABLE) except changing some fields on basis of some conditions:
    1. if PaidAmount>0 && CurrentInstallment<TotalInstallment then
    CurrentInstallment=CurrentInstallment+1
    2. In the MonthYear field I am having data in formate(month/year)ex. 01/2012, 11/2012 ....
    So I have to insert data by incrementing month and year. for example:
    if currentdata is 11/2012 then next data will be 12/2012
    But next will be 01/2013
    I have to select all the records which belongs to previous month(through MonthYear field ) and put checking & changes on each record of the selected data and then insert them into same table(MYTABLE).
    How to achive that?
    Thanks.

    978184 wrote:
    Every thing is working fine but some strange result as:
    when i run my Procedure TRANSFERDATATONEXTMONTH
    1. by Passing Value as : CUSTOMERID_var ='ABX101' and MONTHYEAR_var='12/2012' it insurts 5 rows
    which is correct , since I have 5 records where CUSTOMERID='ABX101' and MONTHYEAR='12/2012' and
    new 5 rows has CUSTOMERID='ABX101' and MONTHYEAR='01/2013' (all other values are as expected)
    2. now when i again run by passing values: CUSTOMERID='ABX101' and MONTHYEAR='01/2013' it inserts 10 records(just double )
    and new records has value CUSTOMERID='ABX101' and MONTHYEAR='02/2013' (while on the basis of condition CUSTOMERID='ABX101' and MONTHYEAR='01/2013' i have in my table only 5 records)
    and all records are duplicate. Some times it inserts three times , while on condition basis it should no. What is happening?Probably, meanwhile you were trying to Insert the First time and the second time, someone did run the procedure that Inserted 5 More records for 01/2013. And, hence your Second run inserted 10 records instead of 5.
    >
    Why it is inserting double of records while i have only 5 records on given condition? Am I missing some thing?Yes, you are. You are missing your Tables, Your Dummy/Sample Data, Working Procedure/Function that can be replicated.
    Without this, we cannot simply believe on assertions that Oracle is behaving incorrectly.
    In addition to this, the GetMonthYear function, should be scrapped. It is un-necessary, when the same logic can be achieved using Oracle ADD_MONTHS function (See my previous post). And you are storing the MonthYear in a Varchar field, which ideally should be a Date field. This eradicates the un-wanted need to cast from VARCHAR - DATE - VARCHAR.
    Please do make some time to read {message:id=9360002} and mentioned relevant details.
    And notice, the code difference in my previous post and in your code.
    Please use
    {noformat}
    (exactly as shown) above and below your code, that indents the code properly for better readability.
    {noformat}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Possible solution to avoid deadlock when two inserts happen on same table from two different machines.

    Possible solution to avoid deadlock when two inserts happen on same table from two different machines.
    Below are the details from deadlock trace.
    Deadlock encountered .... Printing deadlock information
    Wait-for graph
    NULL
    Node:1
    KEY: 8:72057594811318272 (ffffffffffff) CleanCnt:3 Mode:RangeS-S Flags: 0x1
    Grant List 2:
    Owner:0x00000013F494A980 Mode: RangeS-S Flg:0x40 Ref:0 Life:02000000 SPID:376 ECID:0 XactLockInfo: 0x000000055014F400
    SPID: 376 ECID: 0 Statement Type: INSERT Line #: 70
    Input Buf: RPC Event: Proc [Database Id = 8 Object Id = 89923542]
    Requested by:
    ResType:LockOwner Stype:'OR'Xdes:0x0000002AA53383B0 Mode: RangeI-N SPID:238 BatchID:0 ECID:0 TaskProxy:(0x00000027669B4538) Value:0x10d8d500 Cost:(0/38828)
    NULL
    Node:2
    KEY: 8:72057594811318272 (ffffffffffff) CleanCnt:3 Mode:RangeS-S Flags: 0x1
    Grant List 2:
    Owner:0x0000000B3486A780 Mode: RangeS-S Flg:0x40 Ref:0 Life:02000000 SPID:238 ECID:0 XactLockInfo: 0x0000002AA53383F0
    SPID: 238 ECID: 0 Statement Type: INSERT Line #: 70
    Input Buf: RPC Event: Proc [Database Id = 8 Object Id = 89923542]
    Requested by:
    ResType:LockOwner Stype:'OR'Xdes:0x000000055014F3C0 Mode: RangeI-N SPID:376 BatchID:0 ECID:0 TaskProxy:(0x000000080426E538) Value:0x30614e80 Cost:(0/41748)
    NULL
    Victim Resource Owner:
    ResType:LockOwner Stype:'OR'Xdes:0x0000002AA53383B0 Mode: RangeI-N SPID:238 BatchID:0 ECID:0 TaskProxy:(0x00000027669B4538) Value:0x10d8d500 Cost:(0/38828)
    deadlock-list
    deadlock victim=process5daddc8
    process-list
    process id=process5daddc8 taskpriority=0 logused=38828 waitresource=KEY: 8:72057594811318272 (ffffffffffff) waittime=2444 ownerId=2994026815 transactionname=user_transaction lasttranstarted=2014-07-25T12:46:57.347 XDES=0x2aa53383b0 lockMode=RangeI-N schedulerid=43 kpid=14156 status=suspended spid=238 sbid=0 ecid=0 priority=0 trancount=2 lastbatchstarted=2014-07-25T12:46:57.463 lastbatchcompleted=2014-07-25T12:46:57.463 clientapp=pa hostname=pa02 hostpid=1596 loginname=myuser isolationlevel=serializable (4) xactid=2994026815 currentdb=8 lockTimeout=4294967295 clientoption1=671088672 clientoption2=128056
    executionStack
    frame procname=mydb.dbo.SaveBill line=70 stmtstart=6148 stmtend=8060 sqlhandle=0x03000800d61f5c056bd3860170a300000100000000000000
    INSERT INTO [dbo].[Prod1] .....
    inputbuf
    Proc [Database Id = 8 Object Id = 89923542]
    process id=process5d84988 taskpriority=0 logused=41748 waitresource=KEY: 8:72057594811318272 (ffffffffffff) waittime=2444 ownerId=2994024748 transactionname=user_transaction lasttranstarted=2014-07-25T12:46:57.320 XDES=0x55014f3c0 lockMode=RangeI-N schedulerid=39 kpid=14292 status=suspended spid=376 sbid=0 ecid=0 priority=0 trancount=2 lastbatchstarted=2014-07-25T12:46:57.440 lastbatchcompleted=2014-07-25T12:46:57.440 clientapp=pa hostname=pa01 hostpid=1548 loginname=myuser isolationlevel=serializable (4) xactid=2994024748 currentdb=8 lockTimeout=4294967295 clientoption1=671088672 clientoption2=128056
    executionStack
    frame procname=pa.dbo.SaveBill line=70 stmtstart=6148 stmtend=8060 sqlhandle=0x03000800d61f5c056bd3860170a300000100000000000000
    INSERT INTO [dbo].[Prod1]....
    inputbuf
    Proc [Database Id = 8 Object Id = 89923542]
    resource-list
    keylock hobtid=72057594811318272 dbid=8 objectname=pa.dbo.prod1 indexname=PK_a id=lock1608ee1380 mode=RangeS-S associatedObjectId=72057594811318272
    owner-list
    owner id=process5d84988 mode=RangeS-S
    waiter-list
    waiter id=process5daddc8 mode=RangeI-N requestType=convert
    keylock hobtid=72057594811318272 dbid=8 objectname=pa.dbo.prod1 indexname=PK_a id=lock1608ee1380 mode=RangeS-S associatedObjectId=72057594811318272
    owner-list
    owner id=process5daddc8 mode=RangeS-S
    waiter-list
    waiter id=process5d84988 mode=RangeI-N requestType=convert

    Don't know. Perhaps these can help. I scanned the second link but didn't see much about Ending Deadlocks. I'd say the Fourth link probably has better information than the first three links. But maybe read them all just in case the Fourth is missing something
    one of the first three have.
    Deadlocking
    Detecting and Ending Deadlocks
    Minimizing Deadlocks
    Handling Deadlocks in SQL Server
    Google search for "SQL Deadlock"
    La vida loca

  • Insert value in WWWDATA  table for sending picture in body of email

    Hi
    .Requrement: Send image in the body of the email.
    I am using cl class to sending email and Function module WWW_GET_MIME_OBJECT requre values from table  WWWDATA and WWWPARAMS.
    I have image file need to be used in email body for the same i want to entry in the table  wwwdata and wwwparams so that they can be used to fetch url detail.
    I am not able to insert value in wwwdata. Anybody having idea about it.
    Thanks & Regards,
    Ravi Grover
    Edited by: Ravi Grover on Jul 27, 2011 12:34 PM

    To display the image in other systems you will have to store the image in SMWO(SAP Web Repository)
    Then call the function WWW_GET_MIME_OBJECT .
    Please check this link to [Upload|http://abap-explorer.blogspot.com/2008/10/how-to-display-picture-in-screen.html] data in SMWO.
    Regards
    Mishra

  • Insert values to one table based on a value inserted into another table

    Hi,
    I've got a form based off a report which creates a new project. I've added an additional process to this form to insert four new values into another table as soon as the new project is created and the PK for that project is generated. This was working last week (of course!) and now seems to not work at all. It's complaining that the PK I was getting from my first insert was null. Here is one the the statements in my process I'm trying to run:
    insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY')) FROM dual), 0, '', :P45_PROJECT_SEQ, sysdate, :APP_USER);
    The complaint I get that it's getting null where :P45_PROJECT_SEQ should be.
    Thoughts?
    Thanks,
    Jon

    Hi Andy,
    Thanks for the tip. Those two values didn't match and I updated them so they do and I'm still getting a "cannot insert NULL..." error.
    When I turn on debug I see that I'm getting the PK and I see the value. Here's my debug output:
    0.24: ...Process "Get PK": PLSQL (AFTER_SUBMIT) declare function get_pk return varchar2 is begin for c1 in (select PROJECT_SEQ.nextval next_val from dual) loop return c1.next_val; end loop; end; begin :P45_PROJECT_SEQ := get_pk; end;
    0.25: ...Session State: Saved Item "P45_PROJECT_SEQ" New Value="252"
    0.25: ...Process "Process Row of PROJECT": DML_PROCESS_ROW (AFTER_SUBMIT) #OWNER#:PROJECT:P45_PROJECT_SEQ:PROJECT_SEQ|IUD
    0.26: ...Session State: Save "P45_PROJECT_SEQ" - saving same value: "252"
    0.26: ...Process "reset page": CLEAR_CACHE_FOR_PAGES (AFTER_SUBMIT) 45
    0.27: Nulling cache for application "120" page: 45
    0.27: ...Process "Add Week Groups": PLSQL (AFTER_SUBMIT) insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY')) FROM dual), 0, '', :P45_PROJECT_SEQ, sysdate, :APP_USER); insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY') +
    0.28: Encountered unhandled exception in process type PLSQL
    0.28: Show ERROR page...
    0.28: Performing rollback...
    I notice that when it runs my process "Add Week Groups" it's not displaying all of the SQL. But the SQL is fine, it's right here:
    insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY')) FROM dual), 0, '', :P45_PROJECT_SEQ, sysdate, :APP_USER);
    Hmmm....what about the "reset page" action in the last of the 0.26 lines?
    Thanks,
    Jon

  • Help in query required – Insert, Select in same table

    Hi All
    I need your help on writing the queries effectively.
    Oracle Version: 10.2.0.3.0
    OS: UNIX
    I have a table METRICS_TBL as mentioned below.
    CYCLE_DATE     METRICS     VALUE
    08/17/2008     COST-TV     100
    08/17/2008     COST-NEWSPAPER     50
    08/17/2008     COST-POSTALMAIL     25
    08/17/2008     PROD-TV     10
    08/17/2008     PROD-NEWSPAPER     25
    08/17/2008     PROD-POSTALMAIL     5
    Based on the above data, I need to append (Insert into METRICS_TBL select from METRICS_TBL) the same table with the records as mentioned below.
    08/17/2008     COSTPERPROD-TV     10
    08/17/2008     COSTPERPROD-NEWSPAPER     2
    08/17/2008     COSTPER PROD-POSTALMAIL     5
    Basically, I need to calculate Cost per Product for each category. Depending upon the available metrics, metrics also should be changed like COSTPERPROD and values should be Cost/prod under each category.
    Can somebody help me with the query.
    Thanks

    SQL> WITH t AS
      2       (
      3          SELECT TO_DATE('8/17/2008', 'MM/DD/YYYY') AS CYCLE_DATE, 'COST-TV' AS METRICS, 100 AS VALUE
      4            FROM DUAL
      5          UNION ALL
      6          SELECT TO_DATE('08/17/2008', 'MM/DD/YYYY'), 'COST-NEWSPAPER', 50
      7            FROM DUAL
      8          UNION ALL
      9          SELECT TO_DATE('08/17/2008', 'MM/DD/YYYY'), 'COST-POSTALMAIL', 25
    10            FROM DUAL
    11          UNION ALL
    12          SELECT TO_DATE('08/17/2008', 'MM/DD/YYYY'), 'PROD-TV', 10
    13            FROM DUAL
    14          UNION ALL
    15          SELECT TO_DATE('08/17/2008', 'MM/DD/YYYY'), 'PROD-NEWSPAPER', 25
    16            FROM DUAL
    17          UNION ALL
    18          SELECT TO_DATE('08/17/2008', 'MM/DD/YYYY'), 'PROD-POSTALMAIL', 5
    19            FROM DUAL)
    20  SELECT COST.CYCLE_DATE, 'COSTPERPROD-' || SUBSTR(COST.metrics, 6) AS Metrics,
    21         COST.VALUE / prod.VALUE AS COSTPERPROD
    22    FROM t COST, t prod
    23   WHERE COST.CYCLE_DATE = PROD.CYCLE_DATE
    24     AND COST.metrics LIKE 'COST-%'
    25     AND prod.metrics LIKE 'PROD-%'
    26     AND SUBSTR(COST.metrics, 6) = SUBSTR(prod.metrics, 6)
    27  /
    CYCLE_DA METRICS                                    COSTPERPROD
    17.08.08 COSTPERPROD-NEWSPAPER                                2
    17.08.08 COSTPERPROD-POSTALMAIL                               5
    17.08.08 COSTPERPROD-TV                                      10

  • Problem in Master-Details  - Inserting Records to same Table

    I have 3 column of one table in master as primary key and 3 column of same table in detail as primay key. These 6 column collection as the composite primary key. when i try to insert the records in detail table it showing me Too many objects match the primary key oracle.jbo.Key Error.
    I have done the Following things:
    In HR Schema, I have created one Transient View Object for Master and Employee View Object for Details.
    I have taken EmployeeId, FirstName and LastName columns in the Master i.e., From Transient View Object and droped it as the Form.
    And I have taken E-mail, JobId, ManagerId columns in Details i.e From and droped it as the Table.
    When I entered values in master and click CreateInsert in the details record. It showing me Too many objects match the primary key errors.
    Help me out!!! for this problem.

    Hi Kumar,
    I was not in office for couple of days. Thats you couldnt reply for your earlier post. You had mentioned how can we set the value of the import parameter.
    What i wanted to tell you is not to set the value for that Binary_flag, but that flag influences the data download in ASCII FORMAT.
    You just try this: Try attaching a file through CL_CRM_DOCUMENTS~CREATE_WITH_TABLE. Before read the contents of a file into SAP using GUI_DOWNLOAD and read it in ASCII mode. Now when you try to pass this to Ascii internal table of the method specifing the MIME type, it will attach the document to the opportunity, but the document content will be still in ASCII.
    If you try to download this file using GET_WITH_TABLE, then you can see BINARY_FILE is not set to 'X' and the content gets downloaded to Ascii internal table.
    This is my observation.
    I think when attaching documents in Opportunities by default, it reads the file in Binary mode. Because when i tried to attach a file directly in Opportunity transaction, and tried the method GET_WITH_TABLE, the BINARY_FLAG was set.
    Hope now you understood, why i was mentioning that BINARY_FLAG influences the download of content in binary and Ascii format.
    Regards,
    karthik.

  • UPDATE value in column with value in SAME TABLE

    Hi all,
    Here's my issue...
    I have a table which records all incidents for a person.
    The table looks something like this:
    tbl_connect(person_Id NUMBer,
    OLD_ID VARCHAR2(24),
    CASE_NUMBER     VARCHAR2(10),
    CASE_TYPE     VARCHAR2(10),
    PERSON_ROLE     VARCHAR2(30),
    INCIDENT_TYPE     VARCHAR2(40));
    The table is populated from a source table with all fields except person_id. Person_id is a sequence number that gets generated if the person comitting the incident is a NEW PERSON to our system. OLD_Id is the unique identifier between the source table and tbl_connect to identify a person.
    The problem: If an existing person commits a new incident, a new record will be inserted into tbl_connect without PERSON_ID. Since the person already is in the database the person_id already exists in tbl_connect for that person. I now need to UPDATE person_id column with the person_id that already exists for this person. How can i achieve this.
    Ive been trying all sorts of update queries but nothing seems to work. ANy help will be appreciated. Thanks in advance.

    Frank,
    Thanks for the speedy reply. Here is a sample table.
    I know it's a bit confusing. The data that is being dumped into this table is information from a old system. The OLD_ID is in here because it is the relationship between this table and the old table. PERSON_ID is new to this system to identify a person uniquely. That is why i need them both in this table for right now.
    So say my tbl_connect got populated with new info from the old table. As you can see, old_id=567A has comitted another incident. Since he already exists in tbl_connect, now i need to update person_id with the value of 1. Does that make sense now????? If old_id did not exist, all i would do is insert a new row and set person_id to the next sequence number.
    TBL_CONNECT
    PERSON_ID OLD_ID      CASE_NUMBER CASE_TYPE          
    1     567A     12345          IR          
    1     567A     15236          MV
         567A     98547          IR<--newly inserted record of same person

  • Insert value in a table through forms

    hello friends,
    I have table "log" with following fields.
    SQL> desc log;
    Name Null? Type
    IN_HR NUMBER
    IN_MIN NUMBER
    OUT_HR NUMBER
    OUT_MIN NUMBER
    DAYHR NUMBER
    DAYMIN NUMBER
    LOGUSER VARCHAR2(20)
    I created one form "user_activity" with two buttons named "IN" and "OUT"..
    when i press "IN" button i want to store follwing in LOG table..
    LOGUSER----> This should store the global variable value derived from another form called "login_main"...Actually i called "user_activity" form from "login_main" with global variable..this global variable have the username who is currently logged in...But my problem is i cant insert this value..
    NOTE: pls tell me how can i check this global variable is hold value or not...
    IN_HR---> This is successfully updated in log table..
    in_min--> This is successfully updated in log table..
    Pls help me how to store this global variable value into log table... my actual code is follows..I write this code in "when-button-pressed"trigger of "IN" Button..
    <code>
    declare
         name varchar2(30);
    begin
         name:=:global.username;
         insert into log(loguser)values(name);
    commit;
    :CUSTOMER.IN_TIME:=to_char(sysdate,'hh24:mi:ss');
    update log set in_hr=round(to_number(to_char(sysdate,'HH24'))),
    in_min=round(to_number(to_char(sysdate,'mi')))
    where loguser=name;
    commit;
    end;
    <\code>

    Hello,
    please don't open multiple threads for the same question. It only adds confusion to those willing to help you, and you won't get quicker answers when posting questions more then once.
    Also, mostly solutions to problems are version dependend, so the very first thing you should do is to provide the involved versions (database, forms, java, OS; remember that oracle products have 5 digit version numbers; 10g is not a version number, 10.2.0.5 is; also "Windows" has a lot of flavors; "Windows 3.11" is also "Windows", so don't say just "Windows"). Even if you think a solution isn't version dependend provide the involved versions. It isn't much effort on your side and saves us a question roundtrip when it is needed anyway.
    after that you didn't give us much to work with except a - sorry but I don't have any other word for this - ill data model where you seem to want to reinvent the date datatype and some code which seem to compile (no I didn't try it). Oh, and the fact that "it didn't work". Did you debug your code? How do you populate your global variable? Did you inspect your global variable before the insert? Also what should be stored in your global? is it the current logged on oracle user? You could simply use user to get this and forget about the global
    Oh, and before I forget it:
    please, don't reinvent the date datatype, and fix your data model.
    loguser varchar2(20)
    in_date date
    out_date date
    insert into log(loguser, in_date) values (user, sysdate);
    commit;no muss, no fuss and about 20% of the amount of code you wrote.
    cheers

  • Inserting values in a table

    I have a table "xyz" with two columns.
    code id
    1
    1
    2
    3
    4
    5
    6
    The columns id is null and has no constraints.
    I need now to insert values in id just like
    code id
    1       1
    1       2
    2       3
    3       4
    4       5
    5       6
    6       7How to do that?
    Thanks

    Hey guys,
    Thanks for the reply.
    I create a cursor as
    declare
    j number :=1;
    begin
    for i in (select code from a order by code) loop
    insert into a (id) values(j);
    j:=j+1;
    end loop;
    end;but this insert values as:
    SQL> select * from a;
          CODE         ID
             1
             1
             2
             3
             4
             5
             6
                        1
                        2
                        3
                        4
          CODE         ID
                        5
                        6
                        714 rows selected.

  • Inserting values into multiple tables in one jsf page with single commit op

    hi all,
    i have two tables ,
    one is parent table and other is child record.
    record details:
    table1:(parent table)
    emplid (primary key)
    empl_name
    table 2:(child table)
    empl id ( Foreign key)
    empl_name ( Foreign key)
    contact_no (primary key)
    my senario is , i need insert values into both parent and child table in one save option.
    and both the tables will be in one jsf page.
    is this possible to do?
    thanks all,
    regards,
    M vijayalakshmi

    hi,
    i feel my question is not clear.
    let me explain my question clearly.
    1. i have two records
    *1. emp_names*
    attributes of this table is 1.emplid
    2.emp_name.
    emplid is a primary key.
    2. emp_contact
    attributes of this table is 1.emplid
    2. contact_no
    In this table emplid is forigen key from emp_name table
    contact_no is primary key.
    and my senerio is,
    for one emplid there are many contact no.
    in database diagram i have created these two entities. and from that i have generated two views objects.
    now in jsf page ,
    i shd have all fields from both the records.
    wn ever i click on add button , i shd be able to insert one complete row of data to both the tables.
    means,
    emplid
    empl_name
    contact_no.
    and if i click on commit button data shd be insert in both the tables.
    so how to achive this?
    am very beginner to the jdeveloper tool.
    regards,
    m vijayalakshmi.

  • MULTIPLE UPDATES/INSERTIONS TO THE SAME TABLE

    How can I update/insert mutiple rows into the same table from one form ?

    Hi,
    Using the portal form on table you can insert only a single row. You can use master-detail form to insert multiple rows.
    Thanks,
    Sharmila

  • RFC to insert values to a table.

    Hello ABAP Experts-
    I am pretty new to ABAP devlopment. Recently, I got access where I can develop ABAP program.
    Can any one give me steps in writing a program to insert values to Ztable. I want to use this ABAP program in File to RFC scenarion in XI.
    I really appreciate your help.
    Thanks,
    Raj.

    Hi...
    check this code.
    DATA : wa1 type Ztable.
    Here it_tab and wa_tab are your internal table and work area.
    loop at it_tab into wa_tab.
    move wa_tab-vbeln to wa1-vbeln.
    insert Ztable from wa1.
    Please get back to me if you have any concerns.
    Thank you.
    Regards,
    Lokeswari.

  • Concurrency when inserting in the same table

    Hi,
    I have a report used by several users and in this record there is a sentence to insert in a z table. My question is, what happens whether two or more users are inserting records in that table at the same time?  There is a concurrency problem, isn't there?
    How does SAP manage this issue? or, what must I do in this case?
    Thanks in advance.
    Regards.

    Hi David,
    As SAP applications are accessed by many end users at same time, SAP has concept called LOCKING of particular tables involved in the transaction.
    You can achieve your requirement as below
    Go to t-code SE11, and create a lock object for your Ztable
    Now, system create 2 function modules - 1 for locking ENQUEUE_* & other for un-locking DEQUEUE_*  ( search for function module in SE37 )
    Before saving data to ZTABLE, call function module ENQUEUE_* to lock the table for writing data, if locking fails, means there is somebody already working on it, hence you can display error message
    After Save action, you can unlock the table by using FM ... DEQUEUE_*
    Note: you can lock and unlock event during DISPLAY/CHANGE mode if your requirement requires.
    Hope this helps you.
    Regards,
    Rama

  • How to Insert values in virsa_cc_config table?- Post Installation of RAR5.3

    Hi Experts,
    We checked in the debugger that the values 105,106 &107 are not added in the virsa_cc_config table.
    Where to add the values in the table? In J2ee database or in server database (which is oracle for us)? When we searched in oracle data base this table doesnot exist.
    So we believe it has to be inserted in J2EE database. If yes, can somebody help us how to check and insert the values in the respective table in J2ee database
    Thanks and Best Regards,
    Srihari.K

    Dear Sri,
    Yes this table resides in database where GRC is installed.
    To insert these lines, you need to login into GRC server-
    if it is windows goto -
    sqlplus /nolog
    connect /as sysdba
    run this command
    INSERT INTO SAPSR3DB.VIRSA_CC_CONFIG (CNFGPARAM, CNFGSEQ, CNFGVALUE) VALUES
    ('105', 0, 'http')
    INSERT INTO SAPSR3DB.VIRSA_CC_CONFIG  VALUES ('106', 0, '<port number>', 'J2EE Engine Port')
    INSERT INTO SAPSR3DB.VIRSA_CC_CONFIG  VALUES (107, 0,'http://<fully qualified hostname>:<port number>/webdynpro/dispatcher/sap.com/grc~ccappcomp/BgJobStart','BgJobStart URL')
    Commit;
    Put your hostname and port accordingly and run.
    Let me know if it works.
    Regards,
    Sabita

Maybe you are looking for

  • How to restrict material output in the report published in the portal

    Hi all, I am new to BI 7.  I have a series of materials that start with the material IDs TR52, RL25, XY56 and son on.  Now my user wants to view only the materials that are starting with the ID TR52 when he runs the report from the portal. In the mat

  • ML, Parallels (Aspen Hysys) and multi-display. How much RAM do I need?

    Hello, I'm a proud owner of a 13-inch Mid '10 MB with a 2.4 Intel Core 2 Duo Processor. I recently upgraded my machine with a 250 GB Samsung 840 SSD and bought an enclosure for my original 250 GB HDD to sit on. I'm in ML 10.8.3 and need to use Parall

  • CS2 crashes

    I have a Mac Book Pro (Intel Core 2 Duo) laptop. I am running system 10.4.11. I am using CS2 with all the latest updates. All of a sudden, when I open Illustrator I get this message, 'The application Illustrator CS2 quit unexpectedly'. Indesign also

  • DEP, M55, Advanced Bios Settings

    Thinkcentre M55,  Windows XP Does the M55 use Hardware-enforced DEP? For some reason DEP can't be disabled or modified from Windows XPs GUI or  boot.ini switches. Boots  back to it's default setting of On  and  OptIn (default configuration) Only Wind

  • What are the true min spec's for PRE7

    I have been using PE7  with mixed results on my Sony 1.8 GH moble centrino laptop with 2 gig of memory running XP. When importing Jpeg video from a Sony flash memory camcorder the problem is centered around the low on memory issue. I seam to get this