Multi-level accumulation

I need help!
On following tables, "Proj_Dict_Cost" is a cost list to be a dictionary,
And I want keep the accumulatative relation on "Proj_Cost". But It doesnot work
Return an Error with code -4091. Where I missed?
create table Proj_Dict_Cost (
Cost_Code varchar2(10) ,
Cost_Name Varchar2(40) ,
constraint PK_CostList
Primary key (Cost_Code)
SQL> select * from proj_dict_cost where cost_code like '02%';
COST_CODE COST_NAME
02 G0FZ9$3L7Q
0201 ?IPPPTQP>?7QSC
0202 Ih<F7Q
020201 W(R5Ih<F7Q
02020101 9f;.7=08Ih<F7Q
02020102 =(V~5%Le7=08Ih<F7Q
02020103 @)3uIh<F7Q
02020104 J)9$M<Ih<F7Q
02020105 W(R5Ih<F7Q
02020106 Ih<FD#PM7QSC
02020107 Ih<F?<2l7QSC
02020108 I9M<7Q
020202 Ih<FUP1j7QSC
020203 Ih<FWIQ/7QSC
0203 5XVJ?12l7QSC
020301 9\O_L=2b7Q
020302 ?12l2bA?7Q
020303 WjL=7Q
020304 5XUpF@9@7Q
0204 1(=(7QSC
020401 9$3LIs2i7~Nq7Q
create table Proj_Cost(
Proj_No varchar2(20) not null,
Cost_Code Varchar2(10) not null,
Cost_Real number(12,2)
check(Cost_plot>=0) ,
constraint PK_Proj_Cost primary key(Proj_No,Cost_Code) ,
constraint FK_Proj_Cost Foreign Key (Cost_Code)
references Proj_Dict_Cost(Cost_Code)
CREATE OR REPLACE TRIGGER T$PROJ_COST_IDU
BEFORE INSERT OR DELETE OR UPDATE ON PROJ_COST
FOR EACH ROW
DECLARE
PRIOR_COST_CODE VARCHAR2(8);
BEGIN
IF INSERTING OR UPDATING THEN
IF INSERTING THEN
DBMS_OUTPUT.PUT('INSERTING... ');
ELSE
DBMS_OUTPUT.PUT('UPDATING... ');
END IF;
DBMS_OUTPUT.PUT_LINE(:NEW.COST_CODE);
IF LENGTH(:NEW.COST_CODE) > 2 THEN
PRIOR_COST_CODE := SUBSTR(:NEW.COST_CODE,1,LENGTH(:NEW.COST_CODE) - 2);
BEGIN
INSERT INTO PROJ_COST ( PROJ_NO
, COST_CODE
, COST_NAME
, COST_RESEARCH
, COST_PLOT
, COST_TARGET
, COST_BUDGET
, COST_SETTLED
, COST_REAL
SELECT :NEW.PROJ_NO
, COST_CODE
, COST_NAME
, :NEW.COST_RESEARCH
, :NEW.COST_PLOT
, :NEW.COST_TARGET
, :NEW.COST_BUDGET
, :NEW.COST_SETTLED
, :NEW.COST_REAL
FROM PROJ_DICT_COST
WHERE COST_CODE = PRIOR_COST_CODE
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT('EXCEPTION (');
DBMS_OUTPUT.PUT(SQLCODE);
DBMS_OUTPUT.PUT(') RAISED: ');
DBMS_OUTPUT.PUT_LINE(SQLERRM);
DBMS_OUTPUT.PUT_LINE(PRIOR_COST_CODE);
IF SQLCODE = -1 THEN --N%74N(R;T<JxLu<~
UPDATE PROJ_COST SET
COST_RESEARCH = NVL(COST_RESEARCH,0) + NVL(:NEW.COST_RESEARCH,0)
, COST_PLOT = NVL(COST_PLOT,0) + NVL(:NEW.COST_PLOT,0)
, COST_TARGET = NVL(COST_TARGET,0) + NVL(:NEW.COST_TARGET,0)
, COST_BUDGET = NVL(COST_BUDGET,0) + NVL(:NEW.COST_BUDGET,0)
, COST_SETTLED = NVL(COST_SETTLED,0) + NVL(:NEW.COST_SETTLED,0)
, COST_REAL = NVL(COST_REAL,0) + NVL(:NEW.COST_REAL,0)
WHERE COST_CODE = PRIOR_COST_CODE;
ELSE
RAISE;
END IF;
END;
END IF;
END IF;
END;
/* ELSIF DELETING THEN
IF LENGTH(:OLD.COST_CODE) > 2 THEN
PRIOR_COST_CODE := SUBSTR(:OLD.COST_CODE,1,LENGTH(:OLD.COST_CODE) - 2);
UPDATE PROJ_COST SET
COST_RESEARCH = COST_RESEARCH - NVL(:OLD.COST_RESEARCH,0)
, COST_PLOT = COST_PLOT - NVL(:OLD.COST_PLOT,0)
, COST_TARGET = COST_TARGET - NVL(:OLD.COST_TARGET,0)
, COST_BUDGET = COST_BUDGET - NVL(:OLD.COST_BUDGET,0)
, COST_SETTLED = COST_SETTLED - NVL(:OLD.COST_SETTLED,0)
, COST_REAL = COST_REAL - NVL(:OLD.COST_REAL,0)
WHERE COST_CODE = PRIOR_COST_CODE;
END IF;
DELETE PROJ_COST WHERE COST_CODE LIKE :OLD.COST_CODE&#0124; &#0124;'__' AND LENGTH(COST_CODE) > LENGTH(:OLD.COST_CODE);
SQL> insert into proj_cost (PROJ_NO, COST_CODE,COST_NAME, COST_REAL)
2 VALUES ('E1-1', '02020101','jjjjj',1234567);
insert into proj_cost (PROJ_NO, COST_CODE,COST_NAME, COST_REAL)
ERROR at line 1:
ORA-04091: table GCMIS.PROJ_COST is mutating, trigger/function may not see it
ORA-06512: a t "GCMIS.T$PROJ_COST_IDU", line 58
ORA-04088: error during execution of trigger 'GCMIS.T$PROJ_COST_IDU'
ORA-06512: at "GCMIS.T$PROJ_COST_IDU", line 58
ORA-04088: error during execution of trigger 'GCMIS.T$PROJ_COST_IDU'

Your INSERT statement is against the same table as that to which the trigger is attached.
If you think about it, what will happen if you put an INSERT inside a trigger that is fired during an INSERT on the same table?
INSERT->TRIGGER
|
V
INSERT->TRIGGER
|
V
INSERT->TRIGGER
and so on, until the end of time.
Oracle traps this circumstance with the error that you're getting.
null

Similar Messages

  • Can we use SNP PDS in Multi level ATP ?

    Hi All,
    We do CTM planning with existing SNP PDS In APO and now we want to explore to use the Multi level ATP functionality for GATP.  I know, MATP can create the ATP trees if the stock is not available and these can be converted into PPDS order.
    My question is, can we use SNP PDS for this purpose?
    Thanks,
    Abhilasha

    Hi Abhilasha,
    There is no such specific mention anywhere in the literature that you cannot use SNP PDS for MATP. The only downside to using SNP PDS is that SNP PDS are meant for mid to long term planning and the activities/operations in SNP PDS are usually not in detail i.e only important activities or bottle neck components are usually used which will not always facilitate detailed scheduling.
    On the other hand MATP creates ATP tree structures by plan exlosion(which can be SNP/PDS) and saves the requirements groups(component requirements of header level) with dates/qts and source of supply. It uses PPDS component to convert these ATP tree structures into PPDS planned orders depending on the conversion horizon/requirements dates. It does that by reading the source of supply, requirements dates and quantities from ATP tree structure and by plan explosion.
    When MATP planned orders are created you should no longer plan them with automatic planning run as that will cause re-explosion of the plan and might cause incorrect down stream requirements if you had had substitutions at component leve during MATP check. In planned orders, you have an option of changing the allowed sources of supply (in source of supply section). But for orders created by MATP, you will not be allowed to change the source of supply field from SNP PDS to PPDS PDS in the planned order because it will re-explode the plan. So you can decide for yourself if you can use SNP PDS as source of supply for PPDS planned orders.
    Hope that answers your question.
    Regards,
    Mohan

  • How to create a multi-level configuration sales order?

    Hi,
        My client use configurable material to sell computers. And the production mode is MTO. One sales order item correspond with a production order
        Now my client also sell array which consist of two computers, two storage, one UPS power etc. That means I must realize multi-level configuration. First, choose the computer type. Second, based on the choosed computer in first step, choose the cpu, disk and so on. And then based on the sales order item, there must be several production order related to the same sales order item.
        Now I have semi-finished product B1,B2--computer. Class type is 300. Many characteristics is allocated to the class. B type material has the BOM which consist of cpu,disk etc.
        Then I created the finished product A--array. Class type is 300. Allocated characteristics is the B1,B2. A has the BOM which consist of B1,B2 etc.
        When I create sales order, I can only config the first level,choose computers for A, can not choose cpu,disk for computers.
        So, how can I find a solution for this scenario?
        Thanks in advance.

    Thanks, Waza
    1.  Does the Sales order BOM explode in the sales order?
    No. Just one top item would be ok for my client.
    2. Why do thy want this in the sales order?  They can explode the BOM in the production order, do they then need pricing at the component level?
    They do not need pricing at the component level. Exploding the BOM in the production order is acceptable. But how can I config the configurable material in components of production order?
    I tried collective order, but the second level of configurable material can not generate production order. I just make use of special procurement 52 in MRP2 of top finished product. Is there something I missed?
    Thanks again.

  • Multi Level Phantoms

    Looking for guidance / lessons learned on phantoms. I have several assemblies that use multi level phantoms assemblies and the problem I am encountering is when the the BOMs all get pushed up to the top level, the shop order cannot be cut due to duplicates.
    A very basic example is I have screw that goes into a plate. The plate is a phantom and used on two different sub assemblies. These sub assemblies are phantoms and report to the same top level assembly that I am building. When I attempt to cut a shop order, the screw that was all the way at the bottom appears twice on the top level BOM when the two phantom BOMs are pushed up and causes an errorpreventing me from moving forward.
    I currently set my special procurement type 50 in MM03. I have heard that I could set it up on the individual BOMs, however I do not see this fixing the problem as the material and item number of the duplicate will remain the same regardless of how it was set up.
    Any advice or inputs? Please let me know if you need more detail.
    Thanks.

    Hello
    Can you please provide more details about the error? Is there an error message? Can you please provide the message ID, number and the description?
    BR
    Caetano

  • Multi level follow up material in BOM

    Dear All,
    Our client have a requirement for multi lvel follow up material in BOM.
    for example
    BOM for Finish Good made of A.
    if material A is depleted then used material B
    if material B is depleted then used material C
    if A and B have stock used A(higher priority)
    I tried to used follow up material in MRP4 and BOM but it can not be used for multi level like this case.
    Is there any solution for this?
    Best regards,
    Fred

    Hi anyway I tested the BOM master data like this
    F/G 1 Master Box
    |--- A 10 PCS  Alt Group Z1  Priority 1 Usage 100% Strategy 2 (100% Check)
    |--- B 10 PCS  Alt Group Z1  Priority 2 Usage 100% Strategy 2 (100% Check)
    |--- C 10 PCS  Alt Group Z1  Priority 3 Usage 100% Strategy 2 (100% Check)
    Stock A is depleted
    Stock B enough
    stock C enough
    Expected result F/G only used B 10 PCS
    Actual result is
    F/G 1 Master Box
    |-- A 10 PCS
    |-- B 10 PCS
    |-- C 10 PCS
    Do ou have ides how should the percentage in BOm is maintain?
    Best regards,
    Fred

  • Multi level attribute form LDAP

    multi level attribute form LDAP
    I am trying to write an custom mapping to use to retrieve a value from a multialued field in LDAP (nsRole). Has anyone done this before?
    Rigth now all my mappings are 1:1. However the goal is to get a 1 : M and parse thru it till i get the desied value (1:1)

    Darwin Hammons - Assurant 
    2:44pm, May 17 
    Great conversation. I have a very similar question about the use of the custom JAVA mappings with the LDAP Login process. I want to include an additional (event) step in the login process. Does anyone have an example or experience with a custom Java Class mapping that can use an LDAP attribute (location)  queriing the data to execute an event that populates an RequestCenter OU or Group if the person login location equal say " Argentina" ? Looking for a way to manage / build catalog entitlements during login. Suggestions ?
    Great conversation. I have a very similar question about the use of the custom JAVA mappings with the LDAP Login process. I want to include an additional (event) step in the login process. Does anyone have an example or experience with a custom Java Class mapping that can use an LDAP attribute (location)  queriing the data to execute an event that populates an RequestCenter OU or Group if the person login location equal say " Argentina" ? Looking for a way to manage / build catalog entitlements during login. Suggestions ?
    Anthony Erickson
    2:52pm, May 18  
    Hi Darwin,
    We're about to embark on a piece of work with newScale which would be similar to this to support our Multilingual catalogue.  I'll provide any updates I'm able. 
    Thanks,
    Ant 
    Darwin Hammons - Assurant 
    3:25pm, May 18 
    Great, Thanks Anthony ! I hope our bringing up this topic will spark a bit of interest. The Custom Java Mapping  / Directory integration is documented more with RC 9.1. It will be good to hear more about your project and use of Java mappings with LDAP Directories. 

  • How to create multi level reports?

    The report I have created contains 25 columns and is to wide. I would like to create a multi level report in the fashion of below:
    Col 1 Col 2 Col 3
    Row1 Row1 Row1
    Row2 Row2 Row2
    Col 5 Col 6 Col 7
    Row1 Row1 Row1
    Row2 Row2 Row2
    I am assuming this needs to be done by modifying html in a template.
    I have cut up a normal report to try and illistrate what I am thinking.
    http://i71.photobucket.com/albums/i124/breinhar/multirow.jpg
    I greatly appreciate the help. Thanks.

    Hi,
    OK - I've put together a horizontal scrolling report template for a Theme 12/Standard report: [http://apex.oracle.com/pls/otn/f?p=33642:198]
    To create this, you need to:
    1 - Through Shared Components, Templates - create a new Report Template based on a copy of the existing Standard report template.
    2 - When you have your new template, edit it.
    3 - In the template's "Before Rows" setting, replace what's there with the following:
    &lt;style type="text/css"&gt;
    #table1 th {white-space: nowrap}
    #table1 td {white-space: nowrap}
    #table2 th {white-space: nowrap}
    #table2 td {white-space: nowrap}
    &lt;/style&gt;
    &lt;table cellpadding="0" cellspacing="0" summary="" style="padding:0px; border-collapse:collapse;"&gt;#TOP_PAGINATION#
    &lt;tr&gt;&lt;td&gt;
      &lt;tr&gt;
        &lt;td style="vertical-align:top; background-color:#EFEFEF; padding:0px; border:1px solid darkgray;"&gt;
          &lt;div id="d1" style="background-color:white; margin:0px; border:0px; padding:0px;"&gt;
          &lt;/div&gt;
        &lt;/td&gt;
        &lt;td style="vertical-align:top; padding:0px; border:1px solid darkgray;"&gt;
          &lt;div id="d2" style="overflow-X:scroll; margin:0px; border:0px; padding:0px; border-right:1px solid darkgray;"&gt;
    &lt;table cellpadding="0" border="0" cellspacing="0" summary="" class="t12Standard" id="table2"&gt;4 - In the template's "After Rows" setting, replace what's there with the following:
          &lt;/div&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;&lt;div class="t12bottom"&gt;#EXTERNAL_LINK##CSV_LINK#&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;#PAGINATION#&lt;/table&gt;
    &lt;script type="text/javascript"&gt;
    var d1 = document.getElementById("d1");
    var t2 = document.getElementById("table2");
    var t1 = t2.cloneNode(false);
    t1.style.width = "100%";
    t1.id = "table1";
    d1.appendChild(t1);
    var t2Rows = t2.rows;
    var k;
    var r;
    var c;
    for (k = 0; k &lt; t2Rows.length; k++)
    r = document.createElement("TR");
    t1.appendChild(r);
    c = t2Rows[k].cells[0].cloneNode(true);
    r.appendChild(c);
    t2Rows[k].deleteCell(0);
    d1.innerHTML += "";
    &lt;/script&gt;5 - On your report's Report Attributes, change the template used for the report from "Standard" to your new one
    6 - Also on the report's Report Attributes, set "Enable Partial Page Refresh" to No - this is required as we need the javascript in the template to be run whenever pagination happens and Partial Page Refresh does not seem to allow us the means to trigger javascript
    7 - Finally, on the report region's Region Footer, add in:
    &lt;style type="text/css"&gt;
    #d1 {width:75px;}
    #d2 {width:500px;}
    &lt;/style&gt;#d1 refers to the width of the frozen column and #d2 is the width of the rest of the report - you can adjust these figures as required.
    The template contains two DIV tags - d1 and d2. Initially, d1 is empty and d2 contains the report. The javascript moves the first cell in each row from d2 to d1. The styles then add the scrolling functionality.
    Andy

  • How to create multi-level style pulling in a .jpg image as a bullet?

    From within RoboHelp 8 HTML, when creating/editing a 3-tier multi-level style, I want to use a .jpg image for the bullet(s).  I can not find a way to point to the image while in Edit mode.  My only choices are predefined bullets for the List Style.
    When searching for an answer within the forum, I noticed mention of a Baggage folder in RoboHelp.  I do not have a Baggage folder.  I do have links to websites accessible from within the web-based Help file I've created beneath the URLs folder in the Project Manager.
    Thank you for any help you can provide.

    Hi there
    I never really played much with adding images to the oddly formatted Multi-list styles.
    The Project Manager has two views. Sounds like you are using the new "global" view. In that view you don't see a special area labeled Baggage Files. In this view the files are simply listed among the other content. If you change the view to Classic (I think it's the first icon on the left of the pod toolbar) you will then see the Baggage Files folder.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • "Multi-level error propagation carried out" in SCM 5.0

    When I use the SNP PPM Generation With Lot Size Margin function in SCM 5.0, I got the following error:
    Multi-level error propagation carried out
    Message no. /SAPAPO/OM242
    Could you please give me this help?
    Thanks,
    Lian

    Hi,
    Thank you for the information, but the problem is still there though I de-activated all user-exits...
    I also saw the following error:
    Invalid planning version
    Message no. /SAPAPO/OM015
    Thanks,
    Lian

  • Multi-level error propagation carried out Error in APO

    Dear Experts,
    We had developed a custom program that is same as /sapapo/rrp3 report, but the issue is when we use planning version other then 000 the custom program is giving the error ""Multi-level error propagation carried out"" but the RRP3 report works fine with all the planning versions.
    Please help to find the cause and to solve the issue.
    Thanks.
    Regards
    Abhinav Nallani.

    Dear Arek,
          The problem is not yet resolved . we have raised an OSS note for the same.
    as the relevant notes are already implemented in our case.
    regards
    Kiran

  • Error "Multi-level error propagation carried out" when I run a report

    Hi All,
    When I run the report /SAPAPO/CDPS_REPT - Order and Resource Reporting with the below criteria I getting error "Multi-level error propagation carried out"
    Planning Version - Simulation Version XXX
    Evaluation Start - 05/03/2011
    Evaluation End - 12/31/2013
    Evaluation List - Extended Operation List
    I do not get error when I run the report with selection as Active version 000 and Evaluation List as Order List, Operation List.
    I have tried by ruuning Live cache consistancy check, but the issue is not fixed
    Please help me to resolve this issue
    Thanks & Regards,
    Rajkumar

    Hi Jack,
    Please do post the server log file here so that we can try and find a solution for the problem you are facing.
    I had a problem a while ago with the app server too. While trying to run an application, after a few times, it would give me an error message saying the Application Server cannot be started. I rebooted my machine and thankfully it worked again. Just try this too and see if it works.
    If it doesnt we can go through the server log and try to identify the cause of the problem.
    Cheers :-)

  • CIF error-Multi-level error propagation carried out

    Dear ALL,
        When i am trying activate the integration model for Material transfer it generates queue with status SYSFAIL with message "Multi-level error propagation carried out".
    and the integration model is not activated.
      please help
    regards
    Kiran

    Dear Arek,
          The problem is not yet resolved . we have raised an OSS note for the same.
    as the relevant notes are already implemented in our case.
    regards
    Kiran

  • Multi-level error propagation during the execution of CFM2 transaction

    Hi,
    We are implementing SAP SCM 5.0 integrated to SAP R/3 Mills IS.
    During the execution of CFM2  transaction, while  trying to activate the integration model for the object u201COrdersu201D for the very first time, the following error message appears:
    *"Multi-level error propagation carried out".*
    There are also messages related to inbound queues blocked. In the case of maintenance orders, CIF_MNT_INBOUND message shows up. While working with Production orders, CIF_ORDER_INBOUND message emerges.
    The items listed below should be taken into account:
    -The production orders that are meant to be transferred to APO are regular production orders corresponding to several products.
    -We are working with configurable materials.
    -We are working with the active model (000) and for each plant we are using 2 different planning versions.
    Regards,
    Analía Nahmías

    Dear Analía,
    The corresponding error messages issued when executing //CCR indiacted the peg-ids are missing in liveCache.
    Recommendations:                                                      
    -Run transaction /SAPAPO/OM17 to check the internal consistency between database and liveCache within SCM system. Correct the inconsistencies                                                       
    -Execute report /sapapo/cif_deltareport3 to correct the inconsistencies between ECC and SCM system                            
    Regards,
    Tibor

  • Multi level Group Above Report

    I have a multi level Group Above report like this.
    School name : xxxx
    Course1
    Student1
    Student2
    Course2
    Student1
    School name : yyyy
    etc...
    No students are enrolled in some of the courses. I used the Outer Query in SQL to include those courses. Everything looks okay, except the header for the students are still appearing. how do I supress the student heading if no drecords are present?
    Can somebody help me.
    Thank you
    David Smith

    hello,
    you will have to create a counter, that tells you the numbers of students (summary-column, function : count, reset on : course) and create a format-trigger on the heading that hides it when the number of students is 0.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Multi level mapping in PI. eg:  A = B= C w/o BPM

    Hi All,
    I want to do multi level mapping withou BPM i.e Structure A to structure B mapping and Structure B to Structure C i.e
    A=>B=> C. Let me know proc in PI 7.0/7.1 without BPM. Is this possible through Interface mapping or Interface determination ?
    Thanks,
    Jogula Ramesh

    Hi Ramesh,
    Finally you want Strcuture C as the out from PI System,?? if Yes then develop two mappings(A>B,B>C)and add it in Interface mapping,we can add any number of mappings in Interface mappings.
    The source message to Interface mapping is A and receiver would be C.
    This is will work.
    Regards,
    Raj

Maybe you are looking for

  • How to deploy ADF-BC (SDO) with ANT

    I have an ADF-BC exposed as an webserivce. I can deploy it via JDeveloper, but how do I deploy it with ANT. Does anyone has an ANT script example, based on ADF-BC Marc http://orasoa.blogspot.com

  • Use of Adaptive RFC and locking

    Hello, I am using an adaptive RFC model inside a Web Dynpro Application to maintain data residing on a SAP Enterprise system. This RFC also sets a lock in order to make sure nobody else tries to change the same data. I use pessimistic locking which m

  • OneDrive (SkyDrive) only sync's to the roaming profile of 1 pc?

    Hi, We got a problem with our Onedrive (we got the latest version), we make use of SharePoint 2013 and Office 2013 (we do not use Ofice 365). The SharePoint libraries we sync are stored in our local roaming file, but if i log on into another pc these

  • Method.invoke() thread save ?

    Hi to you all, Is the method invoke on the Object Method in the java.lang.reflect package threadsafe ? Greetz-tbone

  • Apache Tomcat Connector

    Hello, I have setup Solaris 10 OS on AMD64 and I am trying to build the JK connector for Apache2 with Tomcat5, but I am not having any success at all with neither the Solaris nor the GNU gcc compiler. Did anyone compiled the JK connector on a i86 64-