Procedures within facilities in waste management

Hi Friends,
To creat Facility procedures - path-Easy access -Utilities Insustry-waste managenent-waste disposal facilities-Procedures within facility-
Here I am trying to enter date and waste disposal facility,but not able to enter transaction category .
So anyone pls help to where we have to create this transaction category..whethe in spro or easy aceess or in any tables..
kindy help and guide me....
Eashwar..

Hi Eashwar,
The transactions within a waste disposal facility are associated with corresponding material postings. transaction categories are created for waste disposal facility types in order to map these transactions. They are grouped in transaction groups, such as mix, sort, convert, repost.
Follow below steps,
Waste Management  ->Waste Disposal Facilities  -> Settings
1. EWAEL05 - Transaction Groups, choose one of the disposal types and hit create button, on the next screen enter the key for Transact. Group, description.
then save.
2. Select the new Transaction group and create button to create transaction category, enter the required fields and also add the materials in the item view.
save and activate the transaction category.
Only after activation it is possible to see the transaction category when you are creating procedures/transactions within facility.
hope this helps you.
Kiran

Similar Messages

  • Calling a stored procedure within a package

    We have a number of packages containing stored procedures. In an existing production application, we used embedded SQL in C programs to call these stored procs
    e.g.
    EXEC SQL EXECUTE
    BEGIN owner.fees_calc.some_fee(:parm1,...);
    END;
    END-EXEC;
    Now, I am trying to use SQLJ to call this same stored proc in the package. However, I am getting a compilation error from sqlj saying that it cannot find a stored procedure or function of that name. It works fine if I use a stored proc that is not in a package.
    So how do I call a stored procedure within a package? Or is this not currently possible with sqlj?
    I am also getting a warning just before the error and I'm wondering if the error is being caused by this:
    Warning: You are using an Oracle JDBC driver, but connecting to a non-Oracle database. SQLJ will perform JDBC-generic SQL checking.
    I am connecting to an Oracle 7.3.3 database using an Oracle 7.3.4 JDBC driver. I also tried using the Oracle 8.0.5 JDBC driver for the same database but I get the same warning message.

    I used the following code to call a stored
    procedure via SQLJ:
    try {
    #sql [iCtx] {
    CALL ibs.cvs_validate.validate_port_id(:IN record_id ,:IN poe_pod_flag,:IN port_id,:OUT error_code,:OUT error_message) };
    where
    "ibs" is the schema
    "cvs_validate" is the package
    "validate_port_id" is the procedure
    The code runs fine, but to get it to compile
    in JDeveloper 2.0, I had to disable the "Check SQL semantics against database schema" option on the Project Properties (SQLJ) property sheet.
    null

  • Waste management - SD process

    Dear all.
    Reading SAP documentations about the "Waste Management" EHS module, and also checking documents from companies which have already implemented it, I don't see many explanations about how it's done the "Delivery" and "Transport" of the waste.
    I see that SAP describes the logistic part until the Clear (Post goods issue), then it stops and starts again only in the Payment of the waste.
    However, I've never seen how they propose a scenario using "Outbound Delivery" and "Transportation" (SD processes) for wastes.
    It seems that they ignore these parts...
    The company I work for wants to implement this module, however, would be essential to have a complete flow for the waste process, I mean:
    Entry the waste into the stock
    Purchase order
    Delivery outbound (using the purchase order) (*)
    Clear (Post goods issue) from stock.
    Shipment  (*)
    Freight/Shipment cost  (*)
    When the waste is totally processed and we receive the billilng:
    Payment of the bill
    (*) Our necessity is to be able to tracking the whole waste process, including the Delivery, Transport and Freight parts.
    Does anyone know how/what other companies, that implemented the "Waste Management", did to tracking this part?
    Which process did they use?
    Or did they decide not to use SAP for that?
    Thank you,
    Diana

    Dear Diana
    what do you look for if you refer to "However, I've never seen how they propose a scenario using "Outbound Delivery" and "Transportation" (SD processes) for wastes."?
    On high level some regulatory regulation can be linked to the topic of Waste.
    1.) you could ask your self if or if not you need to prepare a safety data sheet for a "waste" material?
    2.) in most cases you need to have EHS Dangerous Goods data available and you print documents with EHS DG data and you use DG checks in SD process
    3.) you might ask; is waste something which need to be considered in context of EHS SVT?
    4) you might ask: is waste something there you woulkd like to use EHS-HSM module?
    5.) you might ask: is a waste material to be considered in EHS-IH process?
    But coming back to the "waste" part in SAP SD process; here three of the mentioned scenarios are of interest; especially one is to my knowlegde a "regulatory must": the EHS DG process
    May  be SAP is assuming that you know about this "regulation" fact and therefore is assuming that you just use EHS DG process as part of the SAP SD process.
    Regarding your "demand" list:
    Entry the waste into the stock => if you use an own material type (best practise)  this is part of SAP ERP standard process and not EHS related
    Purchase order  => if you use an own material type  (best practise) this is part of SAP ERP standard process and not EHS related
    Delivery outbound (using the purchase order) (*)  => if you use an own material type  (best practise) this is part of SAP ERP standard process and not EHS related
    Clear (Post goods issue) from stock. =>i f you use an own material type  (best practise) this is part of SAP ERP standard process and not EHS related
    Shipment  (*)  => if you use an own material type  (best practise) this is part of SAP ERP standard process and not EHS related
    Freight/Shipment cost  (*) =>if you use an own material type  (best practise) this is part of SAP ERP standard process and not EHS related
    Payment of the bill => if you use an own material type  (best practise) this is part of SAP ERP standard process and not EHS related
    So most of the "Waste" process is outside of EHS but inside the SAP ERP standard processes as part of MM and SD module (and may be TM).
    To answer therefore your question:
    Which process did they use?
    Answer: in most cases standard ERP scenarios as mentioned above are used; only because of legal requirements you need in our day additional on top solutions (e.g. Elektronisches Abfallnachweisverfahren – Wikipedia (sorry I found only the german link;) as there is the need to do electronic communication with authorities
    Be aware of the fact there is an additional "add on" solution delivered by SAP: SAP WASTE & RECYCLING
    Hope this helps as a starting point
    C.B.
    PS: may be check: Disposal Processing (EHS-WA-PRO) - Waste Management (EHS-WA) - SAP Library
    and subnsequnet chapters

  • Function call in procedure within Package Body

    I am a novice in PL/SQL so that I can't find out where the problem is. I am testing a function call in procedure within a Package Body.
    But the PL/SQL Complier doesn't compile the package body but I don't know what I do wrong. Plz let me know how to call a function in procedure within a Package Body?
    Here are the Packaget test programs..
    CREATE OR REPLACE PACKAGE manage_students
    IS
    PROCEDURE find_sname;
    PROCEDURE find_test;
    PROCEDURE find_test_called;
    FUNCTION GET_LASTMT
    RETURN SEQUENCE_TEST.SEQ_NO%TYPE;
    END manage_students;
    CREATE OR REPLACE PACKAGE BODY manage_students AS
    v_max_nbr SEQUENCE_TEST.SEQ_NO%TYPE;
    PROCEDURE find_sname
    IS
    BEGIN
    BEGIN
    SELECT MAX(SEQ_NO)
    INTO v_max_nbr
    from SEQUENCE_TEST;
    DBMS_OUTPUT.PUT_LINE('MAX NUMBER is : '||v_max_nbr);
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('Error in finding student_id: ');
    RETURN;
    END;
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('Error in finding student_id: ');
    END find_sname;
    PROCEDURE find_test
    IS
    BEGIN
    BEGIN
    DBMS_OUTPUT.PUT_LINE('MAX NUMBER Called from another procedure : '||v_max_nbr);
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('Error in finding student_id: ');
    RETURN;
    END;
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('Error in finding student_id: ');
    END find_test;
    FUNCTION GET_LASTMT
    RETURN SEQUENCE_TEST.SEQ_NO%TYPE
    IS
    v_max_nbr SEQUENCE_TEST.SEQ_NO%TYPE;
    BEGIN
    SELECT MAX(SEQ_NO)
    INTO v_max_nbr
    from SEQUENCE_TEST;
    RETURN v_max_nbr;
    EXCEPTION
    WHEN OTHERS
    THEN
    DECLARE
    v_sqlerrm VARCHAR2(250) :=
    SUBSTR(SQLERRM,1,250);
    BEGIN
    RAISE_APPLICATION_ERROR(-20003,
    'Error in instructor_id: '||v_sqlerrm);
    END;
    END GET_LASTMT;
    PROCEDURE find_test_called
    IS
    BEGIN
    BEGIN
    V_max := Manage_students.GET_LASTMT;
    DBMS_OUTPUT.PUT_LINE('MAX_NUMBER :'|| V_max);
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('Error in finding student_id: ');
    RETURN NULL;
    END;
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('Error in finding student_id: ');
    END find_test_called;
    END manage_students;
    DECLARE
    v_max SEQUENCE_TEST.SEQ_NO%TYPE;
    BEGIN
    manage_students.find_sname;
    DBMS_OUTPUT.PUT_LINE ('Student ID: Execute.');
    manage_students.find_test;
    manage_students.find_test_called;
    END;
    -----------------------------------------------------------------------------------------------

    Hi,
    Welcome to the forum!
    You'll find that there are a lot of people willing to help you.
    Are you willing to help them? Whenever you have a problem, post enough for people to re-create the problem themselves. That includes CREATE TABLE and INSERT statements for all the tables you use.
    Error messages are very helpful. Post the complete error message you're getting, including line number. (It looks like your EXCEPTION sections aren't doing much, except hiding the real errors. That's a bad programming practice, but probably not causing your present problem - just a future one.)
    Never post unformatted code. Indent the code to show the extent of each procedure, and the blocks within each one.
    When posting formatted text on this site, type these 6 characters:
    \(all small letters, inside curly brackets) before and after each section of formatted test, to preserve the spacing.
    For example, the procedure find_test_called would be a lot easier to read like this:PROCEDURE find_test_called
    IS
    BEGIN
         BEGIN
              V_max := Manage_students.GET_LASTMT;
              DBMS_OUTPUT.PUT_LINE ('MAX_NUMBER :' || V_max);
         EXCEPTION
              WHEN OTHERS
              THEN
                   DBMS_OUTPUT.PUT_LINE ('Error in finding student_id: ');
                   RETURN      NULL;
         END;
         COMMIT;
    EXCEPTION
         WHEN OTHERS
         THEN
              DBMS_OUTPUT.PUT_LINE ('Error in finding student_id: ');
    END find_test_called;
    It's much easier to tell from the code above that you're trying to return NULL from a procedure.  Only functions can return anything (counting NULL); procedures can have RETURN statements, but that single word"RETURN;" is the entire statement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Using stored procedures within Crystal Reports

    Hello all,
    Background Information:
    I am trying to teach myself how to execute a stored procedure within Crystal Reports.  This is an aspect of Crystal that my work group has not utilized before and we're trying to gather information on the subject.  We use Oracle to create and execute functions and procedures all the time, but I've never tried this within Crystal.
    I use the "Add Command" functionality within Crystal on most of my reports so that I can taylor the sql to the report.  I find this easier to do versus using the ODBC connection to the tables and writing the code through the Crystal Reports wizard.  I also frequently use functions within these sql statements that are inserted in the Add Command.
    What I'm trying to achieve:
    I have a report that needs to run as a "trial", and then later as a committed "run".  This is for a monthly billing system.  Essentially, the user will run the report as the "trial", preview the data, make any necessay corrections, and then later, run the actual billing run.  Within my application, the bills are not actually marked as "billed" until they are actually "billed', if that makes sense.  As a result, the "trial" report will need to mark the bills as "billed", generate the report, and then rollback the data (so that the bills are not "billed".  Once the actual billing reports are ran, the same report will run, but with a "commit" at the end of the report so that the bills are now "billed".
    I'm trying simple tests and failing (i.e. taking baby steps to learn what capabilities Crystal has):
    I created as simple of a procedure as I can envision.  This procedure inserts the word "test" in one of my fields for a provided account number.  When I try to run this procedure via Crystal (via New Report ->History->My ODBC Database link->Stored Procedures), Crystal asks for the account number parameter, as it should.  But I then receive the error message:
    Database Connector Error: '42000:[Microsoft][ODBC driver for Oracle]Syntax error or access violation'
    The existing ODBC connection has work great for years and years to retrieve data from tables, but this is the first time I've tried to utilize procedures.  Can anybody help?  And can anybody explain what the Stored Procedures link is supposed to do?  Am I going down the right path?
    thanks,
    Noel

    Hello,
    Make sure the Oracle client install path is in the PATH statement. And also make sure you are using an IN/OUT cursor. CR only reads the last SELECT statement. Search the Documents area on how to create a Stored Procedure.
    Also, if you are using CR XI ( 11.0 ) then upgrade to CR XI R2 and apply all service packs ( SP 6 ). Go to this link: http://www.sdn.sap.com/irj/boc and download the trial version of CR XI R2 and use your XI keycode, then apply the patches which you can get to by clicking on the BusinessObjects tab above, then Downloads.
    Direct link to the Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
    It may fix your issue also.
    Thanks again
    Don

  • Call a procedure within a Procedure

    hi
    How can i call a procedure within a procedure
    Thanks in advance

    SQL> create procedure b as
      2  begin
      3  null;
      4  end;
      5  /
    Procedure created.
    SQL> create procedure a as
      2  begin
      3  b;
      4  end;
      5  /
    Procedure created.
    SQL>

  • Best practice in Waste management configuation

    Hello,
    I am looking for best practices in Waste management and configuration documents.
    Thanks

    Hi Paddy..,
    Please check in this URL it may help you.
    http://help.sap.com/bp_bblibrary/600/BBlibrary_start.htm
    regards.

  • EHS - Waste management - service PO related

    Hello All,
    I'm having a client requirement in Waste management  that instead of standard PO , is it possible to service PO to be created automatically which results service entry sheet and there by invoice and billing to vendor. I checked from the standard flow standard PO is possible. If I want to get services PO  from the entry documents screen in wae02  transaction. where I can enter the service details in entry document screen ? is it possible to get auto generation of service PO and what is relevant configuration to be done in Waste management ?
    Regards
    kiran.

    hi sashi,
    after creating p.o in wae02, create waste disposal document in wam02 and clear inventory in wae02.
    Then go back to wam02 and select the particular waste disp. document and set the appropriate dates details in different tabs and change the status to archive.
    Reward if it is useful ...
    Regards,
    Ram

  • Procedure within procedure problem

    Hi
    I have a table of 5 different magazines and a table of purchases of those magazines. I have written a procedure to take the details of a given magazine and place the sales for a given month into a sales table as follows:
    create or replace procedure monthly_sales(mag number, startdate date, enddate date) is
    magtotal number(7,0);
    magprice magazine.unitprice%type;
    magsales number(7,2);
    begin
    select count(p.magid), m.unitprice into magtotal, magprice from purchase p, magazine m where p.datepurchased between startdate and enddate and p.magid = mag and m.magid=p.magid
    group by m.unitprice;
    magsales := magtotal*magprice;
    insert into sales values(startdate, mag, magtotal, magsales);
    end;
    What I would like to do though is have a procedure that you just need to run once and it will enter the sales for a given month for all magazines into the sales table. My thought was to try to do this using procedures within a procedure as follows:
    create or replace procedure monthly_sales(startdate date, enddate date) is
    magtotal number(7,0);
    magprice magazine.unitprice%type;
    magsales number(7,2);
    procedure mag1 is
    begin
    select count(p.magid), m.unitprice into magtotal, magprice from purchase p, magazine m where p.datepurchased between startdate and enddate and p.magid = 1 and m.magid=p.magid
    group by m.unitprice;
    magsales := magtotal*magprice;
    insert into sales values(startdate, 1, magtotal, magsales);
    end mag1;
    procedure mag2 is
    begin
    select count(p.magid), m.unitprice into magtotal, magprice from purchase p, magazine m where p.datepurchased between startdate and enddate and p.magid = 2 and m.magid=p.magid
    group by m.unitprice;
    magsales := magtotal*magprice;
    insert into sales values(startdate, 2, magtotal, magsales);
    end mag2;
    procedure mag3 is
    begin
    select count(p.magid), m.unitprice into magtotal, magprice from purchase p, magazine m where p.datepurchased between startdate and enddate and p.magid = 3 and m.magid=p.magid
    group by m.unitprice;
    magsales := magtotal*magprice;
    insert into sales values(startdate, 3, magtotal, magsales);
    end mag3;
    procedure mag4 is
    begin
    select count(p.magid), m.unitprice into magtotal, magprice from purchase p, magazine m where p.datepurchased between startdate and enddate and p.magid = 4 and m.magid=p.magid
    group by m.unitprice;
    magsales := magtotal*magprice;
    insert into sales values(startdate, 4, magtotal, magsales);
    end mag4;
    begin
    select count(p.magid), m.unitprice into magtotal, magprice from purchase p, magazine m where p.datepurchased between startdate and enddate and p.magid = 5 and m.magid=p.magid
    group by m.unitprice;
    magsales := magtotal*magprice;
    insert into sales values(startdate, 5, magtotal, magsales);
    end;
    However, when I run this it is ignoring all the procedures within the main procedure and just entering the results for magazine 5. I'm at a loss as to why this isn't working, is this even the correct way to go about it? any help would be greatly appreciated
    thanks

    Why doing it the hard way?
    A single insert statement will do the trick.
    I made a bit of a guess as to the structure of your tables:
    create table magazine (magid number primary key, unitprice number);
    create table purchase (magid number references magazine(magid), datepurchased date);
    create table sales (startdate date, magid number references magazine(magid), magtotal number, magsales number);
    insert into magazine(magid, unitprice) values (1, 3.95);
    insert into magazine(magid, unitprice) values (2, 4.95);
    insert into magazine(magid, unitprice) values (3, 3.50);
    insert into magazine(magid, unitprice) values (4, 6.0);
    insert into magazine(magid, unitprice) values (5, 5.50);
    insert into purchase(magid, datepurchased) values (1, sysdate);
    insert into purchase(magid, datepurchased) values (1, sysdate);
    insert into purchase(magid, datepurchased) values (2, sysdate);
    insert into purchase(magid, datepurchased) values (2, sysdate);
    insert into purchase(magid, datepurchased) values (2, sysdate);
    insert into purchase(magid, datepurchased) values (4, sysdate);
    insert into purchase(magid, datepurchased) values (5, sysdate);
    insert into purchase(magid, datepurchased) values (5, sysdate);
    insert into purchase(magid, datepurchased) values (5, sysdate);
    insert into purchase(magid, datepurchased) values (5, sysdate);
    commit;
    create or replace procedure monthly_sales(p_startdate in date, p_enddate in date)
    is
    begin
      insert into sales (startdate, magid, magtotal, magsales)
        select p_startdate
        ,      p.magid
        ,      count(p.magid)
        ,      count(p.magid) * m.unitprice
        from   purchase p
          join magazine m on m.magid = p.magid
        where  p.datepurchased between p_startdate and p_enddate
        group by p.magid
        ,        m.unitprice;
    end;
    begin
      monthly_sales(trunc(sysdate,'MM'), last_day(trunc(sysdate,'MM')));
    end;
    select * from sales;
    STARTDATE      MAGID   MAGTOTAL   MAGSALES
    01-JAN-11          1          2        7.9
    01-JAN-11          2          3      14.85
    01-JAN-11          4          1          6
    01-JAN-11          5          4         22

  • Procedure within a cursor

    I have a procedure within a cursor.
    How do I assign the "termination_date" calculated in the cursor to the "v_end_date" and pass it into the procedure?
    declare
    cursor x is  select      a.store_no || '-' || b.store_name name,
                              a.store_no,
                           landlord_turnover_date execution_date,
                   open_date commencement_date,
                   decode(
                    decode(sign(round(months_between(nvl(option1_end_date,open_date), open_date)/12,0) - 10), 1, option1_end_date,
                    decode(sign(round(months_between(nvl(option2_end_date,open_date), open_date)/12,0) - 10), 1, option2_end_date,
                     decode(sign(round(months_between(nvl(option3_end_date,open_date), open_date)/12,0) - 10), 1, option3_end_date,
                      decode(sign(round(months_between(nvl(option4_end_date,open_date), open_date)/12,0) - 10), 1, option4_end_date,
                       decode(sign(round(months_between(nvl(option5_end_date,open_date), open_date)/12,0) - 10), 1, option5_end_date,
                         decode(sign(round(months_between(nvl(option6_end_date,open_date), open_date)/12,0) - 10), 1, option6_end_date)))))),null,
                           nvl(option6_end_date,nvl(option5_end_date,nvl(option5_end_date,nvl(option4_end_date,nvl(option3_end_date,nvl(option2_end_date,option1_end_date)))))),
                             decode(sign(round(months_between(nvl(option1_end_date,open_date), open_date)/12,0) - 10), 1, option1_end_date,
                              decode(sign(round(months_between(nvl(option2_end_date,open_date), open_date)/12,0) - 10), 1, option2_end_date,
                               decode(sign(round(months_between(nvl(option3_end_date,open_date), open_date)/12,0) - 10), 1, option3_end_date,
                                decode(sign(round(months_between(nvl(option4_end_date,open_date), open_date)/12,0) - 10), 1, option4_end_date,
                                 decode(sign(round(months_between(nvl(option5_end_date,open_date), open_date)/12,0) - 10), 1, option5_end_date,
                                   decode(sign(round(months_between(nvl(option6_end_date,open_date), open_date)/12,0) - 10), 1, option6_end_date))))))) termination_date,
                   option1_base_rent,
                   option1_end_date,
                   option2_base_rent,
                   option2_end_date,
                   option3_base_rent,
                   option3_end_date,
                   option4_base_rent,
                   option4_end_date,
                   option5_base_rent,
                   option5_end_date,
                   option6_base_rent,
                   option6_end_date,
                   c.vendor_number,
                   d.vendor_id,
                   e.vendor_site_id,
                            cost_center                                                                                                                        
                   from lease_terms a, store b, workrent c, po_vendors d, po_vendor_sites_all e
                  where flag = 'Y'
              and a.store_no = b.store
              and a.store_no = c.store_no
              and c.rent_amt_5301 > 0
              and c.vendor_number = d.segment1
              and d.vendor_id = e.vendor_id
              and c.pay_site_name = e.vendor_site_code;
       v_loc_id number;          
       v_norm   varchar2(1);
       v_term_id number;
       v_lease_id number;
       v_change_id number;
       v_div     varchar2(2);
       v_exp_id  number;
       v_acc_id  number;
       PROCEDURE insert_payment ( v_term_id        IN number,
                                  v_lease_id       IN number,
                            v_change_id      IN number,
                            v_start_date     IN date,
                            v_end_date       IN date,
                            v_vendor_id      IN number,
                            v_vendor_site_id IN number,
                            v_amt            IN number,
                         v_normalize      IN varchar2,
                                  v_expense_id     IN NUMBER,
                                  v_lia_id         IN NUMBER)
       IS
       BEGIN
           insert into pn_payment_terms_all (
                   payment_term_id,           
                   last_update_date,
                last_updated_by,
                creation_date,
                created_by,
                last_update_login,
                payment_purpose_code,
                payment_term_type_code,
                frequency_code,
                lease_id,
                lease_change_id,
                start_date,
                end_date,
                vendor_id     ,
                vendor_site_id,
                actual_amount,
                set_of_books_id,
                currency_code,
                rate,
                org_id,
                normalize,
                schedule_day,
                lease_status)
           values
             (     v_term_id,
                SYSDATE,
                -1,
                SYSDATE,
                -1,
                0,
                'RENT',
                'BASER',
                'MON',
                v_lease_id,
                v_change_id,
                v_start_date,
                v_end_date,
                v_vendor_id,
                v_vendor_site_id,
                v_amt,
                1,
                'USD',
                1,
                101,
                v_normalize,
                1,
                'ACT');

    btw the nested DECODEs could be simplified greatly using CASE, or if this is 8i you might still be able to unnest them with something like:
    decode(1,
           sign(round(months_between(nvl(option1_end_date,open_date), open_date)/12,0) - 10), option1_end_date,
           sign(round(months_between(nvl(option2_end_date,open_date), open_date)/12,0) - 10), option2_end_date,
           sign(round(months_between(nvl(option3_end_date,open_date), open_date)/12,0) - 10), option3_end_date,
           sign(round(months_between(nvl(option4_end_date,open_date), open_date)/12,0) - 10), option4_end_date,
           sign(round(months_between(nvl(option5_end_date,open_date), open_date)/12,0) - 10), option5_end_date,
           sign(round(months_between(nvl(option6_end_date,open_date), open_date)/12,0) - 10), option6_end_date,
           NVL(...) )Unfortunately I rather lost track of it after that. You may also be able to simplify the nested NVLs using COALESCE, e.g.
    coalesce
    ( option6_end_date,
      option5_end_date,
      option5_end_date,
      option4_end_date,
      option3_end_date,
      option2_end_date,
      option1_end_date ), ...although if this is 8i COALESCE may not be available.
    Why they couldn't just have added more optional arguments to NVL I will never understand.

  • EHS - Waste management - Disposal documents

    Hi C.B,
    I'm getting an issue when i'm creating diposal document in waste management. Purchase order is creating automatically from entry document. when i choose to create disposal document from wae02 ( entry doc), It is asking for waste approval details. when I press F4 to check details it is not showing from the list. output list is getting empty. please find the attached screen shot and let me know where i missed.
    Here While transaction I linked waste appr.type , waste approval, but when selecting here in the output from the list nothing is getting. please help me where i did missed.

    Got the solution for the above
    Thanks to all

  • Waste management -  Entry Document

    Hi to All,
    while trying to do a Purchase order with the Entry document i received this error :User status PAPI is active (WAQ DF7E0D489B08FCF1A81B001871E45E18)
    how can i solve this error message?
    thanks
    C.

    Hello,
    This is Status profile error.
    It says that your entry document is in Status PAPI (Document created) and your status profile is set such that it is not allowing you to create PO from this status.  Normally PAPI status is achieved only after creation of PO. May be you already would have created a PO, so system has taken that staus and now not allowing you to create PO, if not then you will require to modify Status profile EHS_WMM1, which is the standard status profile supplied with the system.
    Below is the example of Status profile for Entry document which can be accessed through IMG activity:
    Environmental, Health & Safety > Waste Management > Disposal Processing > Basic Settings for Disposal Processing > Status Management > Check, Extend, Set Status Profiles
    On the Change Status Profile: Overview screen double-click the Status profile EHS_WMM1 (Disposal Processing).
    On the Change Status Profile: User Status screen choose the Status ANGL and choose Details (F2).
    On the Change Status Profile: Transaction Control screen change the following Business Transaction 'WA-PRO: Order': In the gap 'influence' set Radio-Button from 'Forbidden' to 'Allowed'.
    Save your entries.
    Choose Back (F3).
    On the Change Status Profile: User Status screen select the status BEST and choose Details (F2).
    On the Change Status Profile: Transaction Control screen change the following Business Transaction 'WA-PRO: Create Document': In Influence change from Forbidden to Allowed.
    Choose Save.
    Please modify the Status profile as per your business rule. Please see the documentation of the mentioend IMG activity and also see SAP help for the topic : Entry Document Status under Waste management.
    Hope this information is helpful to you.
    Regards,
    Niraj

  • Waste Management Workbench Help

    Hi all,
    I wonder if any of you can help me with Waste Management Worbench.
    When accesing WACO02 and I select the Recipe Workbench (RMS), I can only work with spec categories Substances, Recipes and Formulas but not with Waste Codes.
    The problem then is that I can not work with Waste through the workbench. Any idea??
    I have seen that in the SPRO EHS/ Basic Data and Tools / Spec Management / Workbench / Set up Workbench you can specify the assigments for each service group but I can only assign Recipes, Substances and Formulas. Any idea on how can include WasteCodes?? and Dangerous Goods Classifications??
    Any help will be appreciated.
    PS: To avoid this problem i am actually managing Waste Codes through WACO02OLD but it in not the desired way
    Many thanks,
    Alberto

    Hi Alberto,
    please check the transaction CG02BD or change the IMG settings of the workbench as service group EHSALL.
    I hope it helps.
    Best regards,
    Roland

  • Waste management scenario

    Hi Team,
    Please write me steps involved in "Waste management scenario".
    What are the T-Codes.
    What master data is required.
    Thanks

    Hi
    Steps involved in Waste Management are :
    1)     Create and maintain Waste Management Business partners :  Waste generator u2013 WAA02, Waste transporter u2013 WAA20 and Waste disposer u2013 WAA11. 
    2)     Create entry document for waste disposal : WAE02
    3)     Inventory Posting of waste material: WAE02
    4)     Create purchase order for external disposal service : WAE02, ME23N
    5)     Create disposal documents : WAM02
    6)     Verify Invoice and release for payment: MIRO, MRBR.
    7)     Print Waste manifest: WAM02, CG54
    Entire waste mamagement process is done in following different ways and all the steps mentioend above are used, based on what process has been decided for waste disposal :
    a)     Legally compliant disposal processing
    b)     Lean waste management with entry of intenal quantities
    c)     Integrated commercial disposal processing
    d)     Integrated logistics disposal processing
    Other master data required (For IDES):
    Company code : 1000
    Production plant : 1100
    Material : P182_WST / P182WST_RQ / P182_WST_PP
    Specification waste code : EWC_060102 / EWC_200129
    Specification Substance : P182_WST / P182_WST_PP
    Waste generator : IDES_0001/ IDES_0011 /  IDES_0012 / IDES_0013 / IDES_0014
    Waste disposer : IDES_0015
    Waste transporter : IDES_0065 / IDES_0025 / IDES_0035
    Contract : 4600000042/54
    Vendor: 15 (Tiedemeier Entsorgung GmbH)
    G/L: 400000
    Some of the data like Contract, vendor and G/L may be different for different IDES server. Pls. check accordingly.
    Regards,
    Niraj

  • Call procedure within procedure

    Hai
    I have some question
    1)
    This below procedure create user at run time
    ============================================
    create or replace procedure new_u1( p_name in varchar2,
    p_pw in varchar2,
    p_def_tblspace in varchar2 default 'users' )
    as
    begin
    execute immediate 'create user ' || P_name || ' identified by ' ||
    p_pw || ' default tablespace ' || p_def_tblspace ||
    ' temporary tablespace temp';
    execute immediate 'grant create session to ' || p_name;
    end;
    This below procedure create tables at run time
    ==============================================
    create or replace procedure M2 (table_name varchar2) as
    cursor1 integer;
    begin
    cursor1 := dbms_sql.open_cursor;
    dbms_sql.parse(cursor1, 'DROP TABLE ' || table_name,
    dbms_sql.v7);
    dbms_sql.close_cursor(cursor1);
    end;
    I want ,when first procedure calls ,it calls second procedure and create tables in that schema (call procedure within procedure).How to do that?
    2)What is diffrenece between row and statement level trigger?how many types of triggers?
    3)what is mutating trigger or table?
    4)dbms_stats.gather_table_stats package it collects the statistics about the tables .I want statistics to be collected at every day 9am and 7pm how to do that?
    Thanks in advance
    Mohan

    You could use an expression like this, to generate the run times:
    SQL> create table times (dt date) ;
    Table created.
    SQL> BEGIN
      2      FOR idx IN 1 .. 24
      3      LOOP
      4          INSERT INTO times VALUES (trunc(SYSDATE) + (idx / 24));
      5          INSERT INTO times VALUES (trunc(SYSDATE) + (idx / 24) + (1 / (24 * 60)));
      6          INSERT INTO times VALUES (trunc(SYSDATE) + (idx / 24) + (59 / (24 * 60)));
      7      END LOOP;
      8  END;
      9  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SELECT to_char(dt,
      2                 'dd-mon-yyyy hh:mi:ss AM'),
      3         to_char(decode(sign(to_number(to_char(dt,
      4                                               'hh24MI')) - 900),
      5                        -1,
      6                        trunc(dt) + (9 / 24),
      7                        0,
      8                        trunc(dt) + (9 / 24),
      9                        decode(sign(to_number(to_char(dt,
    10                                                      'hh24MI')) - 1900),
    11                               -1,
    12                               trunc(dt) + (19 / 24),
    13                               0,
    14                               trunc(dt) + (19 / 24),
    15                               trunc(dt) + 1 + (9 / 24))),
    16                 'dd-mon-yyyy hh:mi:ss AM')
    17  FROM   times
    18  ORDER  BY dt
    19  /
    TO_CHAR(DT,'DD-MON-YYYY TO_CHAR(DECODE(SIGN(TO_
    01-jan-2004 01:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 01:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 01:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 02:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 02:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 02:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 03:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 03:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 03:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 04:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 04:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 04:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 05:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 05:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 05:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 06:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 06:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 06:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 07:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 07:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 07:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 08:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 08:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 08:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 09:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 09:01:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 09:59:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 10:00:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 10:01:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 10:59:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 11:00:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 11:01:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 11:59:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 12:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 12:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 12:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 01:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 01:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 01:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 02:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 02:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 02:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 03:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 03:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 03:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 04:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 04:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 04:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 05:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 05:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 05:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 06:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 06:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 06:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 07:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 07:01:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 07:59:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 08:00:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 08:01:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 08:59:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 09:00:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 09:01:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 09:59:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 10:00:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 10:01:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 10:59:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 11:00:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 11:01:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 11:59:00 PM 02-jan-2004 09:00:00 AM
    02-jan-2004 12:00:00 AM 02-jan-2004 09:00:00 AM
    02-jan-2004 12:01:00 AM 02-jan-2004 09:00:00 AM
    02-jan-2004 12:59:00 AM 02-jan-2004 09:00:00 AM
    72 rows selected.
    SQL>

Maybe you are looking for