Creating multple triggers

I have over 200 triggers declared in a .sql file, and When I attempt to run the entire file in sqldeveloper, instead of creating all the triggers, it only creates the first trigger, and uses the entire sql file as the body for the trigger. What am I doing wrong here.
Small Example
If I copy this into sqldeveloper and run it as a script, it will only create usrv.softwareid_trg, and uses the rest of the sql as the body.
create trigger USRV.SOFTWAREID_TRG
     before insert on USRV.SOFTWARE
for each row
begin
     select USRV.SOFTWAREID.NEXTVAL into :NEW.SOFTWAREID from dual;
end USRV.SOFTWAREID_TRG;
create trigger USRV.SUPPLY_ID_TRG
     before insert on USRV.SUPPLY_LIST
for each row
begin
     select USRV.SUPPLY_ID.NEXTVAL into :NEW.SUPPLY_ID from dual;
end USRV.SUPPLY_ID_TRG;
create trigger USRV.TESTID_TRG
     before insert on USRV.TRAINING_TEST
for each row
begin
     select USRV.TESTID.NEXTVAL into :NEW.TESTID from dual;
end USRV.TESTID_TRG;

it might be that the trigger is already existing and you attempt to create. it will be more safer if you have a REPLACE in your code. something like:
  CREATE OR REPLACE trigger ...also try to place a "/" after each trigger.
  create or replace trigger USRV.SOFTWAREID_TRG
    before insert on USRV.SOFTWARE
  for each row
  begin
    select USRV.SOFTWAREID.NEXTVAL into :NEW.SOFTWAREID from dual;
  end USRV.SOFTWAREID_TRG;
  create or replace trigger USRV.SUPPLY_ID_TRG
    before insert on USRV.SUPPLY_LIST
  for each row
  begin
    select USRV.SUPPLY_ID.NEXTVAL into :NEW.SUPPLY_ID from dual;
  end USRV.SUPPLY_ID_TRG;
  create or replace trigger USRV.TESTID_TRG
    before insert on USRV.TRAINING_TEST
  for each row
  begin
    select USRV.TESTID.NEXTVAL into :NEW.TESTID from dual;
  end USRV.TESTID_TRG;
  /

Similar Messages

  • How to create database triggers in ABAP Dictionary

    Hi,
    How can i create database triggers on tables, like the update, delete and insert triggers which we used to create in SQL sever and other databases, is there any transaction for doing the same from ABAP dictionary. or should it be done at the raw database level.
    Thanks
    Akila.R

    Hi,
    please check out the following link it might help you
    http://help.sap.com/saphelp_nw2004s/helpdata/en/71/a8a77955bc11d194aa0000e8353423/content.htm
    *************please reward points if the information is helpful to you******************

  • Error when creating journal triggers

    I have table with 138 columns. When i try to generate journal triggers, HSU utility fails with error 6502 - numeric or value error. I was able to create journal triggers after i've deleted 30 rows. Are there any restrictions in number of columns when creating journal triggers?

    Hi,
    I wonder if you have a solution to the problem other than manually correcting the generated code. We are experiencing the same problem and no good solution yet
    (see post Journalling BR, error in CAPI (HSU 6523)
    kind regards
    Geert Verschueren

  • How to create audit triggers and run it dynamically?

    DECLARE
    V_CRT VARCHAR2(4000);
    V_DRP VARCHAR2(200);
    BEGIN
    FOR tab_rec IN (SELECT TABLE_NAME FROM USER_tabLES WHERE TABLE_NAME NOT LIKE '%TMP' AND TABLE_NAME NOT LIKE '%BAK' AND TABLE_NAME NOT LIKE 'MV_%') loop
    v_DRP := 'DROP TABLE AUD_'||tab_rec.tABLE_name ||';' || CHR(13);
    v_crt := ' CREATE TABLE AUD_'||tab_rec.tABLE_name
    ||'( ACTION VARCHAR2(1) ,
    CONSTRAINT AUD_'||SUBSTR(TAB_REC.TABLE_NAME, 1,11)||substr(tab_rec.table_name,length(tab_rec.table_name)-4,5)||'_CHKACTION CHECK (ACTION IN (''I'',''U'',''D'')),
    ISSUE_TIMESTAMP TIMESTAMP DEFAULT SYSDATE,
    ISSUE_USER VARCHAR2(30),
    ISSUE_HOST VARCHAR2(40),
    FOR col_rec IN (SELECT column_name,data_type,data_length,data_precision,data_scale FROM user_tab_cols WHERE table_name = tab_rec.table_name ORDER BY column_id)
    loop
    IF col_rec.data_type = 'VARCHAR2' THEN
    v_crt := v_crt || col_rec.column_name || ' '|| col_rec.data_type||'('||col_rec.data_length||'),'||chr(13)||' ';
    ELSIF col_rec.data_type = 'NUMBER' THEN
    v_crt := v_crt || col_rec.column_name || ' '||col_rec.data_type;
    IF col_rec.data_precision IS NOT NULL THEN
    v_crt:= v_crt||'('||col_rec.data_precision||','||col_rec.data_scale||'),'||chr(13)||' ';
    ELSE
    v_crt:= v_crt||','||chr(13)||' ';
    END IF;
    ELSE
    v_crt := v_crt || col_rec.column_name || ' '||col_rec.data_type||','||chr(13)||' ';
    END IF;
    END loop;
    v_crt := rtrim(v_crt);
    v_crt := substr(v_crt,1,LENGTH(v_crt)-2)||');';
    DBMS_OUTPUT.PUT_LINE(v_crt);
    v_crt:= '';
    END LOOP;
    END;
    The audit tables are named same as the table prefixed with AUD_. The audit table has two columns ACTION and ISSUE_TIMESTAMP more than the main tables.
    This anonymous block creates the triggers in the table which has audit tables dynamically.
    The user data is not maintained here in this code.
    This code runs.
    DECLARE
    v_output1 VARCHAR2(5000);
    v_insert VARCHAR2(4000);
    v_delete VARCHAR2(4000);
    v_update VARCHAR2(4000);
    v_cols VARCHAR2(1000);
    v_columns VARCHAR2(2000)DEFAULT '';
    v_columns_new VARCHAR2(2000) DEFAULT '';
    v_columns_old VARCHAR2(2000) DEFAULT '';
    v_tab1 VARCHAR2(30) DEFAULT ' ';
    v_tab2 VARCHAR2(30) DEFAULT ' ';
    v_tab3 VARCHAR2(30) DEFAULT ' ';
    v_schema varchar2(30) default 'schema'; --
    v_user_id VARCHAR2(30); -- not used in this program
    v_host VARCHAR2(30);
    BEGIN
    /* The audit tables are created with table name prefixed with AUD and columns ACTION AND ISSUE DATE, ISSUE_USER,ISSUE_HOST added.*/
    FOR rec IN
    (SELECT tname FROM tab WHERE tname LIKE 'AUD%'
    LOOP
    v_columns := '';
    v_columns_new := '';
    v_columns_old := '';
    v_output1 := 'CREATE OR REPLACE TRIGGER '
    ||v_schema||'.' ||rec.tname ||'_TRIG ' || chr(13)
    ||' AFTER ' || chr(13)
    ||' INSERT OR '|| chr(13)
    ||' UPDATE OR '|| chr(13)
    ||' DELETE ON '|| chr(13)
    ||v_schema||'.'
    || substr(rec.tname,5)
    || chr(13)
    ||' FOR EACH ROW '
    ||chr(13)
    ||' BEGIN ' || chr(13);
    FOR colrec IN
    (SELECT column_name
    FROM user_tab_cols
    WHERE table_name = rec.tname
    AND column_name NOT IN ('ACTION','ISSUE_TIMESTAMP','ISSUE_USER','ISSUE_HOST')
    LOOP
    v_columns := v_columns||v_tab3||colrec.column_name ||','||chr(13);
    v_columns_new := v_columns_new ||v_tab3||':new.'||colrec.column_name ||','||chr(13) ;
    v_columns_old := v_columns_old ||v_tab3||':old.'||colrec.column_name ||','||chr(13) ;
    END LOOP;
    v_columns := SUBSTR(v_columns ,1,LENGTH(v_columns ) -2);
    v_columns_new := SUBSTR(v_columns_new,1,LENGTH(v_columns_new)-2);
    v_columns_old := SUBSTR(v_columns_old,1,LENGTH(v_columns_old)-2);
    v_insert := v_tab1||'IF INSERTING THEN ' || chr(13)
    ||v_tab2||'INSERT INTO '||v_schema||'.' ||rec.tname|| chr(13)
    || v_tab2||' ( '||chr(13)
    || v_tab3||'ACTION,'||chr(13)
    || v_tab3||'ISSUE_TIMESTAMP,' ||chr(13)
    || v_tab3||'ISSUE_USER,'||chr(13)
    || v_tab3||'ISSUE_HOST,'||chr(13)
    ||v_columns ||chr(13) ||v_tab2||')' || chr(13)
    ||v_tab2||' VALUES ' ||chr(13)
    ||v_tab2||' (' ||chr(13)
    ||v_tab3||'''I'''||','||chr(13)
    ||v_tab3||'SYSTIMESTAMP'||','||chr(13)
    ||v_tab3||'USER'||','||chr(13)
    ||v_tab3||'sys_context('||'''USERENV'''||','||'''HOST'''||'),'||chr(13)
    ||v_columns_new ||v_tab2||');' ||chr(13)
    ||v_tab1||'END IF;'
    || CHR(13);
    v_delete := v_tab1||'IF DELETING THEN ' || chr(13)
    ||v_tab2||'INSERT INTO '||v_schema||'.' ||rec.tname|| chr(13)
    ||v_tab2|| '( '||chr(13)
    || v_tab3||'ACTION,'||chr(13)
    || v_tab3||'ISSUE_TIMESTAMP,' ||chr(13)
    || v_tab3||'ISSUE_USER,'||chr(13)
    || v_tab3||'ISSUE_HOST,'||chr(13)
    ||v_columns ||chr(13)
    ||v_tab2||')' || chr(13)
    ||v_tab2||' VALUES ' ||chr(13)
    ||v_tab2||' (' ||chr(13)
    ||v_tab3||'''D'''||','||chr(13)
    ||v_tab3||'SYSTIMESTAMP'||','||chr(13)
    ||v_tab3||'USER'||','||chr(13)
    ||v_tab3||'sys_context('||'''USERENV'''||','||'''HOST'''||'),'||chr(13)
    ||v_columns_old
    ||v_tab2||');' ||chr(13)
    ||v_tab1
    ||'END IF;' ||CHR(13);
    v_update := v_tab1||'IF UPDATING THEN ' || chr(13)
    ||v_tab2||'INSERT INTO '||v_schema||'.' ||rec.tname|| chr(13)
    ||v_tab2|| '( '||chr(13)
    ||v_tab3|| 'ACTION,'||chr(13)
    ||v_tab3|| 'ISSUE_TIMESTAMP,' ||chr(13)
    ||v_tab3||'ISSUE_USER,'||chr(13)
    ||v_tab3||'ISSUE_HOST,'||chr(13)
    ||v_columns ||chr(13)
    ||v_tab2||')' || chr(13)
    ||v_tab2||' VALUES ' ||chr(13)
    ||v_tab2||' (' ||chr(13)
    ||v_tab3||'''U'''||','||chr(13)
    ||v_tab3||'SYSTIMESTAMP'||','||chr(13)
    ||v_tab3||'USER'||','||chr(13)
    ||v_tab3||'sys_context('||'''USERENV'''||','||'''HOST'''||'),'||chr(13)
    ||v_columns_new
    ||v_tab2||');' ||chr(13)
    ||v_tab1||'END IF;'|| chr(13) ;
    -- v_output1 := v_output1 || v_insert || v_update|| v_delete ||CHR(13)||'END;';
    --EXECUTE IMMEDIATE v_output1;
    -- v_output1 := v_output1 || chr(13)||'/';
    dbms_output.put_line(v_output1); generate script
    dbms_output.put_line(v_output1);
    dbms_output.put_line(v_insert);
    dbms_output.put_line(v_update);
    dbms_output.put_line(v_delete);
    dbms_output.put_line('END;');
    dbms_output.put_line('/');
    END LOOP;
    END;
    show errors;
    Edited by: ranjus on Oct 17, 2012 3:33 PM

    Thank you so much for your suggestions.
    I went through the link you suggested.
    I wondered why DBA requested me to create triggers when such easy option was available to them. And I found the reason why triggers for audit.
    When Triggers Are Necessary
    Avoiding False Positives. Audit trails are generated through autonomous transactions from the original transactions. Hence they are committed even if the original transactions are rolled back.
    Here is a simple example to illustrate the point. Assume that we have set up auditing for UPDATEs on table CLASS. A user issues a statement to update a data value from 20 to 10 and then rolls it back as shown below.
    update class set size = 10 where class_id = 123;
    rollback
    Now the value of the column SIZE will be 20, not 10, as if the user never did anything. However, the audit trail will capture the change, even if it's rolled back. This may be undesirable in some cases, especially if there are lots of rollbacks by users. In such a case, you may have to use the trigger to capture only committed changes. If there were a trigger on the table CLASS to insert records into the user defined audit trail, upon rollback the audit trails would have been rolled back too
    Capturing Before-change Values. Oracle-provided audit trails do not show the values before and after the change. For instance, the above change will create an audit record that shows the statement and the SCN number at the change, but not the value before the change (20). The value can be obtained from the SCN number using flashback query, but it depends on the information being available in the undo segments. If the information is not captured within the limit specified by the undo_retention period, the prior values can never be retrieved. Using a trigger guarantees that the values are captured without dependence on the undo_retention period, and may prove useful at times. Under these two circumstances you may decide to continue using triggers to record the audit trails at a granular detail.

  • Delivery Output type newly created not triggering

    Hi,
    I have created 2 new output types i;e 1 for returns Order and one when we save the Delivery order. This i have copied the standard output type (BA00 & LD00).
    so now in returns order the output type i want to trigger automatically and print. But it is not happening. In VV11 i have defined for this condition as Print immediately and in customizing also i have maintained for sales organisation. But it is NOT triggering automatically when i save the return order. If i manually go and add this output then its working. So can you please tell me what needs to be done to trigger automatically.
    Secondly for Delivery i have 2 output i;e when i save the delivery without picking and all in VL01N, it should trigger 1 output and second is when i do the picking and PGI in VL02N. Both should trigger automatically.Now both my output is triggered only when i do PGI in VL02n i;e VL01N output is not triggered.
    Please help how can i do that.

    Hi,
    Go to T-code NACE
    Application area : V2-Shipping
    Now select the condition records and select your new output types.
    Take the key combination defined by you Viz. Sales org/Delivery Type (for example
    Enter Medium as '1'
            Date/Time as '4'
    Press the communication Tab and Tick Print immediatley and release after output Check Box.
    Also maintain the output device as LOCL
    I hope this will help you
    Br,
    Tushar

  • WHy can't you create several triggers in one single script ?

    Hi i did a lot of sql requests to create triggers and now i want them to be executed all one after one, so i made a script with all the requests in it, problem is that only the first one executes, why ?
    here are the first two requests from the code:
    create or replace trigger TRBI_schema_bd_l before insert
    on t_schema_bd_l for each row
    begin
    select SQ_GDI.nextval
    into :new.ID_SBL
    from dual;
    sp_info_element_ctrl(:new.date_dern_maj_ctrl,:new.code_usager_ctrl);
    end;
    create or replace trigger TRBI_souscriptions before insert
    on T_souscription for each row
    begin
    select SQ_GDI.nextval
    into :new.ID_SOUS
    from dual;
    sp_info_element_ctrl(:new.date_dern_maj_ctrl,:new.code_usager_ctrl);
    end;

    Hi,
    932262 wrote:
    My oracle version is 11g, Starting in Oracle 11.1, you can use sequences directly in an assignment statement. For example:
    :NEW.id.sbl := sq.gdi.NEXTVAL;You don't have to SELECT it from dual any more.
    and i am not reading it because i don't know where to read. Oracle documentation is available on line. For version 11.1:
    http://www.oracle.com/pls/db111/portal.all_books
    I am trying to use simple sql and not PL/SQL as much as possible.That's great! Your code will be more efficient and easier to maintain.
    As mentioned earlier, you can create as many triggers in the same script as you want to. Whether you use 5 scripts, or 1, or none at all, you have to put a / after the final END; statement in each one. Follow that by SHOW ERRORS to get complete error messages.
    END;
    SHOW ERRORSPersonally, I prefer having a separate script to create each object. If you want to have one script that calls 5 other scripts, use the SQL*Plus START (or @) command. If the 5 child scripts are on the same directory as the parent script, then you can call them like this:
    @@child_script_1
    @@child_script_2
    @@child_script_3
    @@child_script_4
    @@child_script_5

  • CLBUS1007.created event triggered by an ABAP OO event?

    Hello gurus,
    I have noticed, that when the customer master is created in ECC 5.0, the CLBUS1007.created event is triggered (SWEL). However; CLBUS1007 object does not exist in the BOR directory. It must be ABAP OO event than, right? If so, how can I find out the corresponding class? I wonder how I can make a binding, check object attributes etc.
    By the way, BUS1007 is obsolete in BOR. Do you know if I should use some other BOR object for a Customer or create a sub-class of this ABAP class that I don't know yet?
    Regards,
    Michal
    PS. I know there is very good blog by Jocelyn Dart about this topic (/people/jocelyn.dart/blog/2006/07/27/raising-abap-oo-events-for-workflow), but it does not solve my problem of relation between SWEL object type and ABAP class.

    Hi Michael,
    If you look at the header of BOR object BUS1007 you'll notice the last time this was changed was back in 1999 - i.e. 4.6a. So that object has been dead for quite some time.
    It's almost certainly just an obsolete piece of code that hasn't been cleaned up properly.  I suspect what is happening is that it is mix and matching the object category CL with the business object BUS1007 (which of course is category BO).
    Either that or its an obsolete configuration entry that's getting picked up.
    If it's annoying you, you could try putting a session breakpoint on function module SWE_EVENT_CREATE to see if you can track the call that causing the problem, and then of course report it in (Low priority) to get it cleaned up.
    If you are just looking for the correct object to use, suggest you report it in anyway as a query... I notice they haven't bothered to specify the new object type in the documentation  but if you look at SAP note 719936 it mentions that the new object type is KNA1 - which definitely is in the BOR directory.
    I haven't seen an ABAP OO version of KNA1 yet in any of the systems... HR seems to be doing a fair bit in ABAP OO though.
    Hope that helps.
    Regards,
    Jocelyn

  • WLAI doesn't create appropriate triggers when I create an event

    When I create an event for an application view in WLAI, the appropriate database
    triggers for that table are not being created properly. I am trying to create
    an event that listens on the CUSTOMER_TABLE table for an insert. When I run the
    test, put an ample amount of time, and perform an insert/commit manually, the
    system doesn't recognize the insert.
    The problem is that there is no trigger created on the CUSTOMER_TABLE that would
    write data to the EVENT table. I have investigated the DbmsEventRouter settings,
    web.xml, and other connection settings and can't find anything wrong with them.
    My user on the database has the ability to create triggers as well. The server
    console also does not report any errors (other than the timeout).
    Is there something I am missing that would cause an event creation to NOT write
    the appropriate trigger with it? Thanks in advance.
    Dan

    Dan,
    Please verify the following:
    1) that an insert trigger exists on the table in question. If there is no trigger,
    then the EVENT table will not get populated.
    2) that the data source you've specified when connecting to the EIS is the same as
    what the event generator/router has in the web.xml
    3) that there are no other instances of the event generator/router listening on the
    same EVENT table. If so, it could be that the other instance of the event
    generator/router gets the events and deletes them from the EVENT table. This would
    give the other event generator/router the impression that no events have happened.
    Cheers,
    Chris
    Dan Kim wrote:
    When I create an event for an application view in WLAI, the appropriate database
    triggers for that table are not being created properly. I am trying to create
    an event that listens on the CUSTOMER_TABLE table for an insert. When I run the
    test, put an ample amount of time, and perform an insert/commit manually, the
    system doesn't recognize the insert.
    The problem is that there is no trigger created on the CUSTOMER_TABLE that would
    write data to the EVENT table. I have investigated the DbmsEventRouter settings,
    web.xml, and other connection settings and can't find anything wrong with them.
    My user on the database has the ability to create triggers as well. The server
    console also does not report any errors (other than the timeout).
    Is there something I am missing that would cause an event creation to NOT write
    the appropriate trigger with it? Thanks in advance.
    Dan

  • Cannot create new triggers in 6i Form Builder

    We are trying to move from Forms 5 to 6i. We have successfully installed 6i and have converted our forms.
    But when we try to create a new form-level trigger, the window never appears where you can select the appropriate trigger.
    Also, if you go into a record group and try to select the record group query text, the edit window never appears.
    So, in effect, we can't edit any of these forms if we need to make changes to the triggers or record groups.
    Has anyone come across these problems? We are running WinNT 4.0, Forms 6.0.8.13.0, and Oracle 8.1.6.
    Thanks in advance.
    -John

    Mr.John,
    you better to migrate on that older version forms to later version forms (like:- 5 to 6i/9i or 10g . )
    i thing Mr.victor has much more better knowledge for migration .
    his address:-
    [email protected]
    regards,
    leo

  • Do workflows affect eachothers change / create items triggers ?. if so can it be disabled

    I have a SharePoint 365 environment with some workflows, and various lists all in a single site.
    Workflows (triggered by their individual list "Add item" ) perform actions also in other lists.
    One of the lists is mainly was updated by external workflows, it had no workflows assigned itself yet.
    But that is going to change, manual updates to this list of the type "Add item", and "change item" need to be made.
    However the current existing workflows should not trigger them (as they add and change items too...), is that possible ?. 

    HI
    Can you be more clear with your question.. You don't want external workflows to trigger item change in current list..etal?.  Only new workflow created specific to this list have to do item change?..
    You can use pausing functionality in workflow to stop external workflows from executing until a specific date and only newly created workflows can run during that time.. I just wanted to confirm your question before answering..
    Thank you

  • CRM BUS20900-CREATED not triggered

    Hello every one.
    Our system is CRM with Case Management.
    My problem is that I need an event triggered when a case is created, Iu2019m creating a case since home page from CRM Web UI, but no event is triggered, I check SWEL but not new events for that activity.
    The event I should have is BUS20900-CREATED, but nothing happened, I went for SWEC but no modification object for this BUS20900.
    Any other idea?
    Tanks a lot
    Felipe Uribe

    Hi Viji,
    I did what you said before posting this issue, the event BUS20900-CREATED is not in TCode SWEL after a "case" have been created, it means that any Workflow are able to start via triggering event, so is not necessary to check the event linkage because I just need an event to activate a Workflow, in addition to that no event is triggered after creating a "case" in Case Management.
    Just for the record, I'm using SAP-CRM 7 with Case Management, and not R/3 standard.
    Any way I did create a Workflow with this event as a triggering event and created the event manually, and the Workflow started and works perfectly so the issue is not with the Workflow and it start conditions, is just to have this event published by SRM after a Case creation.
    Thanks a lot.
    Felipe Uribe

  • How do i create multiple triggers in one image?

    Hi there,
    I have an image which consists of multiple sections. (It's a circle with pie-pieces: see attachment)
    I want every segment of the image to be a seperate trigger: when you hover or click other segments will turn gray and a text will appear.
    At first i thought that it wouldn't be possible, but then i saw this website http://pmkwilliams.com/# (i know it's made with edge, i saw it in a presentation on youtube)
    Can anyone help me? All the help is welcome! And a link to a tutorial would be grant.
    And i want to appologise if this is asked before: i didn't know how you would call such a feature. English is not my motherlanguage...
    Thanks sooo much in advance!!!
    bart

    Hi ResDesign, thanks again for your reply.
    I just inserted a part of the code, but because i can't seem to find the way the "american map animateproject" works i find it hard to see what it is i have to do.
    1: I understand that i need to create rectangles at the place i want the trigger to be: coords="217,9, 222,9,226,9,230,9"/>'+
                 // for a rectangle shape use shape="rect"
    2: I changed every "usmap" to my own image name.
    3: But it also says '<area id="California" shape="poly" title="California region:West" Does this mean that when you hover, you'll see this text? i could delete this then?
    4: I don't know what to do with the timeline. What do i set up and what keyframes do i use?
    The idea was that when you click on one segment of the circle the others would go gray and a text will appear on the right.
    I realise that maybe this is to difficult for me: i've never done javascript, so if you think this is too much...
    Thanks in advance.
    bart

  • Anybody ever created multple PO doc type/number ranges in extended classic?

    I have searched this forum, and found plenty of useful threads which would help me determine different document types/number ranges for back-end purchase orders in a classic scenario. (And I have done something similar many years ago on a classic EBP 3.0 implementation)
    However, I have a customer who has an SRM 5 extended classic implementation, and who (Based on certain simple criteria) requires a different PO number range to identify certain types of indirect orders. (They also have direct materials procured using doc type ECDP, but that's not relevant to this requirement)
    This would obviously have to apply to the local PO in SRM, as well as the backend ECC PO.
    It would also need to be derived for orders created automatically via approved shopping carts, as well as those orders that are created via sourcing.
    I've copied ECPO via define transaction types IMG step, as well as assigned a new number range.
    Just to test, I've also added the second doc type in the BSA attribute for a particular test user - just initially see if it was possible to manually choose when creating a PO in sourcing. However, I could only get ECDP and ECPO.
    I have looked at various BADIs to see if I can determine doc type or number range somewhere in the PO creation, but as far as I can see, they either:
    - Seem to apply only to the object type (PO, requisition, reservation etc) rather than the transaction type within that object.
    - Or look like they are too late in the process to influence the doc type and number range (BBP_DOC_CHANGE_BADI?) ... which doesn't seem to have those doc type or PO number fields available anyway
    - Or I doesn't seem to be trigerred at all when turning requirement into Po and ordering via sourcing. (tried break-point & endless loop in implemnetation of BBP_CREATE_BE_PO_NEW, but nothing happened. In any case the PO number was alreadya ssigned)
    If anybody has ever managed this before, or can tell me that I am definitely barking up the wrong tree, it would be gratefully appreciated. The document type is actually lesss important than the different number range... and was really just an attempt to trigger a different number. I'm starting to think that this sort of thing may only be possible in a classic implemntation.
    What I need ideally, would have been some kind of 'local PO' equivelent of the BADI that enables you to determine transaction type for a bid. 
    Regards,
    Vince
    Edited by: Vincent White on Dec 6, 2010 5:13 PM

    Hi. Not sure on this, but I can tell you that with extended classic it is BADI BBP_ECS_PO_OUT_BADI that is called for the backend PO instead of the CREATEPO_BACK BADI.
    You can have a look in BBP_ECS_PO_OUT_BADI and see if that helps?
    Don't think it will influence the PO in SRM at all though.
    Have you tried the number range / grouping BADIs? They definitly work for changing the number range for classic POs.
    Regards,
    Dave.

  • Create multple inspection lots at customer returns

    Hi all,
    at my comany we've the following problem. Customer returns should be posted to insp stock and an inspection lot must be created. When a customer has multiple return from the same batch it should create multiple inspection lots. We use insp 05 for this. But we also use 05 for the receipt of externally produced materials. This should only create one inspection lot. Therefor it's not possible to set the indicator in the inspection setup in the maerial master.
    We had a look at inspection type 06, but this is not stock relevant. What is the best way to set this up?
    thank for your help.

    Its not the delivery I'm concerned about.  Its the other 05 lots that he creates via material movements.
    If the Z inspection type is assigned to the delivery type as proposed, the Z inspection type still has an 05 inspection origin.  It is the origin that SAP links to material movements not the inspection type.  As delivered most inspection types match one to one the origin, i.e. an 05 inspection type to an 05 origin.  An 04 inspection type to an 04 origin, etc..
    When a movement is used that is linked to the 05 inspection orgin and an inspection is called for, the system looks at the material master and attempts to assign an inspection type with an 05 orign. In this case, they'll be two inspection types active with an 05 oriign.  The standard 05 and the Z05. 
    Now it might work if the Z05 is assigned to the delivery type for returns and the 05 inspection type is marked as preferred.  Hopefully the Z05 will get used for the deliveries and the 05 for all others  But I'm not 100% sure the system will behave exactly that way.  I 've never tested that scenario specifically.
    FF

  • Creating database triggers  from forms

    what we can create a data base trigger from from .if yes plzzz tell me its procedure.

    Yes, and have a look here, It show how is possible
    [url http://www.oracle.com/webapps/online-help/forms/10g/state/content/navId.3/navSetId._/vtTopicFile.designing_forms%7Cstoredpr%7Cf50crdbtr%7Ehtml/]Creating a Database Trigger

Maybe you are looking for

  • Extending a nested class and parent access

    I want the child of the abstract inner class to have access to the inner classes parent's variables. I know that an inner class can access it's parent's variables and methods with the "[ParentClass].this.[var/method]" syntax. What's the appropriate s

  • Character count function

    can anyone help me find how many "|" in the string? does coldfusion has the function for it? <cfset variables.teststring = "343|4w3|||jenny||sfsdfsd"> thank you!

  • Using proper hint..

    Good day everyone. I have just found that we can set the optimizer hint on Block level by using SET_BLOCK_PROPERTY('BLOCKNAME', OPTIMIZER_HINT,'Hint_Name'); well, how we determine a proper 'Hint_Name' to set OPTIMIZER_HINT property? Can we use optimi

  • HT2305 how do I download apple software update for windows 7?

    I somehow lost the Apple Software Update program on my Windows 7 laptop. Is it needed? if so, where do I find it to download it?

  • ITunes won't run after downloading the exe

    I downloaded the iTunes exe and tried to run it but it gives me Visual C++ buffer error. I have also tried to uninstall quicktime and install it again but it gives me a fatal error during the uninstallation process from "Add/Remove programs" option.