How to migrate sqlserver procedure to oracle8i procedure?

In my pb7 & sqlserver application , I hava a procedure result set as datawindow source:
create procedure proc_rpt()
as
begin
create table #temp_rpt(
col1 char(10) null,
col2 char(10) null)
insert into #temp_rpt
select * from fact_table1
insert into #temp_rpt
select * from fact_table2
select * from #temp_rpt
end ;
It is to say : I want to create a temporary table in procedure and insert rows from other table or update the temp table rows. at last, I will return the result set, so I can use it to create a powerbuilder datawindow . How to do it with oracle8i pl/sql and procedure ?

Now I have a sqlserver sql script, it is too long ,but it is very easy :
create procedure proc_rpt_year_fee_plan_sum(
@ai_year integer, /*year*/
@as_fee_unit char(10)) /**/
as
begin
declare @ldec_fee_unit decimal(8,2)
if @as_fee_unit = "10000"
select @ldec_fee_unit = 10000.00
else
select @ldec_fee_unit = 1.00
create table #rpt_sum(
unit_no varchar(20) null,
unit_name varchar(40) null,
fee_all decimal(12,2) null,
hys_milesum decimal(10,2) null,
hys_mile1 decimal(10,2) null,
hys_mile2 decimal(10,2) null,
hys_srfee decimal(12,2) null,
hym_markqtysum integer null,
hym_markqty2 integer null,
hym_markqty1 integer null,
hym_markfee decimal(12,2) null,
hyb_sbqty integer null,
hyb_sbfee decimal(12,2) null,
hyt_btqty integer null,
hyt_btfee decimal(12,2) null,
fee_unit char(10) null)
/*1.select unit rows*/
insert #rpt_sum(unit_no)
select hys_no_hut from hys_srfeeplan where hys_year = @ai_year
union
select hym_no_hut from hym_markfeeplan where hym_year = @ai_year
union
select distinct(hyb_no_hut) from hyb_strobefeeplan where hyb_year = @ai_year
union
select hyb_no_hut from hyb_boatfeeplan where hyb_year = @ai_year
update #rpt_sum
set #rpt_sum.unit_name = b.hut_name
from #rpt_sum a, hut_unit b
where a.unit_no = b.hut_no
/*1.select unit rows*/
/*2.begin*/
update #rpt_sum
set #rpt_sum.hys_mile1 = hys_srfeeplan.hys_mile1,
#rpt_sum.hys_mile2 = hys_srfeeplan.hys_mile2,
#rpt_sum.hys_srfee = hys_srfeeplan.hys_feesum
from #rpt_sum,hys_srfeeplan
where #rpt_sum.unit_no = hys_srfeeplan.hys_no_hut and
hys_srfeeplan.hys_year = @ai_year
/*2.end*/
/*3.begin*/
update #rpt_sum
set #rpt_sum.hym_markqty2 = hym_markfeeplan.hym_maintmark2,
#rpt_sum.hym_markqty1 = hym_markfeeplan.hym_maintmark1,
#rpt_sum.hym_markfee = hym_markfeeplan.hym_feesum
from #rpt_sum,hym_markfeeplan
where #rpt_sum.unit_no = hym_markfeeplan.hym_no_hut and
hym_markfeeplan.hym_year = @ai_year
/*3.end*/
/*4.begin*/
update #rpt_sum
set #rpt_sum.hyb_sbqty = (select sum(isnull(b.hyb_strobeqty,0)) from hyb_strobefeeplan b where a.unit_no = b.hyb_no_hut and b.hyb_year = @ai_year),
#rpt_sum.hyb_sbfee = (select sum(isnull(b.hyb_feesum,0)) from hyb_strobefeeplan b where a.unit_no = b.hyb_no_hut and b.hyb_year = @ai_year)
from #rpt_sum a, hyb_strobefeeplan b
where a.unit_no = b.hyb_no_hut and
b.hyb_year = @ai_year
/*4.end*/
/*5.begin*/
update #rpt_sum
set #rpt_sum.hyt_btqty = b.hyb_boatqty,
#rpt_sum.hyt_btfee = b.hyb_feesum
from #rpt_sum a, hyb_boatfeeplan b
where a.unit_no = b.hyb_no_hut and
b.hyb_year = @ai_year
/*5.end*/
update #rpt_sum
set fee_all = isnull(hys_srfee,0) + isnull(hym_markfee,0) + isnull(hyb_sbfee,0) + isnull(hyt_btfee,0),
hys_milesum = isnull(hys_mile1,0) + isnull(hys_mile2,0),
hym_markqtysum = isnull(hym_markqty1,0) + isnull(hym_markqty2,0)
update #rpt_sum
set fee_all = round(fee_all/@ldec_fee_unit,2),
hys_srfee = round(hys_srfee/@ldec_fee_unit,2),
hym_markfee = round(hym_markfee/@ldec_fee_unit,2),
hyb_sbfee = round(hyb_sbfee/@ldec_fee_unit,2),
hyt_btfee = round(hyt_btfee/@ldec_fee_unit,2),
fee_unit = @as_fee_unit
select * from #rpt_sum order by unit_no asc
end;
I hve more scripts .but I had to change my dbms to oracle8i , the proplem .......

Similar Messages

  • How to Migrate Stored procedure on Sql server 2008 to Oracle Database

    Guys, I need help vey badly as I am new in this field.
    Problem is that, I have to migrate stored procedure on Sql server 2008 to oracle Oracle database:
    Whole scenario--
    1. Sql Server 2008 application on Windows server (source machine)
    2. I have to migrate 70 Stored Procedure
    3. To Oracle Database on Linux machine (Target machine)
    Any method (no problem)
    Please, help me or give me any reference as I don't know which keyword is differ in both database.
    Thanks in advance

    Hi,
      You could the free Oracle SQL*Developer to do this.
    There is information and a download link here -
    Oracle SQL Developer</title><meta name="Title" content="Oracle SQL Developer"><meta n…
    and information on using it for migrations here -
    http://www.oracle.com/technetwork/database/migration/index-084442.html
    You could use it in 2 ways -
    1. Go through a migration but just pull the stored procedure code from the file created after you generate the SQL from the SQL*Server database
    2. Use the scratch editor accessed from -
    - Tools - Migration - Scratch Editor
    and paste the SQL*Server stored procedure code into the window and it will convert it to Oracle code. The tool is very good but may have problems if you have very complicated procedures that use SQL*Server specific utilities.
    Regards,
    Mike

  • How to get the debug sqlserver procedure calling from powerbuilder

    How to get sqlserver debug while calling   the procedure from PowerBuilder. Please can you help
    Many Thanks
    Pol

    You are better off doing this through the native SQL server tools.  You can debug your PB code to find the variables being sent to the stored proc (if any) from PB and then use them in SQL Server Management Studio or similar.

  • We're running Windows server 2003 32bit and want to migrate to Windows server 2012R2 64bit, can someone provide a step by step procedure on how to migrate instances on ADAM to AD LDS?

    I have no experience in dealing with servers, but my senior has asked me to investigate on how to migrate instances on ADAM (windows server 2003 32bit) to AD LDS (Windows server 2012R2 64 bit) as in place upgrade is not an option as we're running a 32bit
    Server and want to migrate to a 64bit Server. can someone please give me a Walkthrough on how to do this.
    Thanks in advance.

    Hi,
    it'd be of great help if you could give me a step by step process of replication.
    There is no step-by-step article/guide of replication process, replication between AD LDS instances of the same configuration set is an automatic process.
    All we need to make sure is to create a replica of the existing instance, and there is no network/security obstacle preventing the replication.
    Please note that we need to install AD LDS from Server manager on Windows Server 2012 and 2012 R2.
    More information for you:
    Understanding AD LDS Replication and Configuration Sets
    http://technet.microsoft.com/en-us/library/cc770465.aspx
    Best Regards,
    Amy

  • How to debug Oracle Procedure

    Hi friends,
    I migrated oracle procedure from Oracle 8.0.4 DB froM NT to Oracle 9.2.0 DB on IBM AIX.
    When I test/run the procedure on the 9.2.0 Db, it is running forever and would not end complete.
    How do you debug an Oracle Procedure to check if it is looping on same block foever, and what "current" values does it hold, and the what tables it is reading at, or does procedure ever loops as if it does not safisfy any of the conditions?
    Thanks a lot

    thanks Just,
    This is the procedure that is looping :
    Create or replace procedure glccshdb (v_period_name IN VARCHAR2) AS
    -- DECLARE
    ----------------------- FLAG VARIABLES ---------------------------
      f_eof_sundry_cr_flag     VARCHAR2(1) := 'N';
      f_eof_sundry_dr_flag     VARCHAR2(1) := 'N';
      f_same_check_flag     VARCHAR2(1)     := 'N';
      f_1st_loop_flag     VARCHAR2(1) := 'Y';
    ----------------------- INPUT VARIABLES ---------------------------
      v_startdate     DATE;
      v_enddate     DATE;
    --  v_period_name     VARCHAR2(15);
    ---------------- MAIN CURSOR ------------------
    CURSOR cur_main IS
    SELECT
         SUBSTR(     p.accounting_date,1,9) CHECKDATE,
         SUBSTR(     c.vendor_name,1,39) PAYEE,
         SUBSTR(     i.description,1,39) PARTICULARS,
         SUBSTR(     i.doc_sequence_value,1,15) DV_NUMBER,
         SUBSTR(     c.check_number,1,15) CHECK_NUMBER,
         SUBSTR(     d.amount,1,15) DISTRIBAMT,
         SUBSTR(     d.dist_code_combination_id,1,15) CODE,
         SUBSTR(     cc.segment5,1,16) ACCOUNT,
         SUBSTR(     c.amount, 1, 15) CHECKAMT,
         SUBSTR(     c.bank_account_id, 1, 15) BANKACCTID,
         SUBSTR(     c.check_id, 1, 15) CHECKID
    FROM
         ap_invoices               i,
            ap_checks               c,
            ap_invoice_payments           p,
         ap_invoice_distributions      d,
         gl_code_combinations           cc,
         gl_sets_of_books           s
    WHERE
            p.invoice_id = i.invoice_id
    AND     p.check_id = c.check_id
    AND     i.payment_status_flag = 'Y'
    AND NOT p.amount < 0
    AND     i.invoice_id = d.invoice_id
    AND     d.dist_code_combination_id = cc.code_combination_id
    AND     cc.chart_of_accounts_id = s.chart_of_accounts_id
    AND     s.set_of_books_id = '1'
    AND   p.accounting_date BETWEEN v_startdate AND v_enddate
    ORDER BY p.accounting_date,c.check_number,c.vendor_id, c.amount;
    ---------------- SUNDRY DEBIT CURSOR ------------------
    CURSOR cur_sundry_dr IS
    SELECT
         SUBSTR(     cc.segment5,1,16) ACCOUNT,
         SUBSTR(     d.amount,1,15) AMOUNT
    FROM
         ap_invoices               i,
            ap_checks               c,
            ap_invoice_payments           p,
         ap_invoice_distributions      d,
         gl_code_combinations           cc,
         gl_sets_of_books           s
    WHERE
            p.invoice_id = i.invoice_id
    AND   p.check_id = c.check_id
    AND   i.payment_status_flag = 'Y'
    AND NOT p.amount < 0
    AND     i.invoice_id = d.invoice_id
    AND     d.dist_code_combination_id = cc.code_combination_id
    AND     cc.chart_of_accounts_id = s.chart_of_accounts_id
    AND     s.set_of_books_id = '1'
    AND     p.accounting_date = v_cur_date_ref
    AND NOT
         (     cc.segment5 = '008-070-351-0000'
         AND      d.amount < 0 )
         OR
         (     cc.segment5 = '008-070-352-0000'
         AND      d.amount < 0 )
         OR
         (     cc.segment5 = '008-070-353-0000'
         AND      d.amount < 0 )
         OR
         (     cc.segment5 = '008-070-354-0000'
         AND      d.amount < 0 )
         OR
         (     cc.segment5 = '008-084-100-0000'
         AND      d.amount < 0 )
    ---------------------------- DEBIT SPECIFIED ACCOUNTS QUALIFIER
         OR
         (     cc.segment5 = '008-071-903-0000'
         AND NOT     d.amount < 0 )
         OR
         (     cc.segment5 = '008-071-862-0000'
         AND NOT     d.amount < 0 )
         OR
         (     cc.segment5 = '008-084-906-0000'
         AND NOT     d.amount < 0 )
         OR
         (     cc.segment5 = '008-086-202-0000'
         AND NOT     d.amount < 0 )
         OR
         (     cc.segment5 = '003-001-110-0000'
         AND NOT     d.amount < 0 )
         OR
         (     cc.segment5 = '003-001-120-0000'
         AND NOT     d.amount < 0 )
         OR
         (     cc.segment5 = '008-092-420-0000'
         AND NOT     d.amount < 0 )
         OR
         (     cc.segment5 = '003-002-200-0000'
         AND NOT     d.amount < 0 )
         OR
         (     cc.segment5 = '003-019-000-0000'
         AND NOT     d.amount < 0 )
         OR
         (     cc.segment5 = '001-057-903-0000'
         AND NOT     d.amount < 0 )
         OR
         (     cc.segment5 = '008-070-501-0000'
         AND NOT     d.amount < 0 )
         OR
         (     cc.segment5 = '008-086-201-0000'
         AND NOT     d.amount < 0 ))
    ----------------------------------SUNDRY CREDIT QUALIFIER
    AND NOT     d.amount < 0
    ORDER BY      cc.segment5 ;
    PROCEDURE insert_sundry IS
    BEGIN
         INSERT INTO glcdbsnd
         COL     (
              col_account,
              col_amount,
              col_date
         VALUES(
              s_account,
              s_amount,
              h_checkdate
    END;
    ---------------- FORMAT SUNDRY PROCEDURE ------------------
    PROCEDURE format_sundry IS
    BEGIN
         s_account     :=     h_account;
         s_amount     :=     h_amount;
    END;
    --------------------- PROCEDURE DIVISION -----------------
    BEGIN
    DELETE glcdbrpt;
    DELETE glcdbsnd;
    --DELETE cdbsunmo;
    -------------------------------------- INPUT PARAMETERS
    SELECT      start_date, end_date
    INTO     v_startdate, v_enddate
    FROM     gl_periods
    WHERE     UPPER(period_name) = UPPER(v_period_name);
    --WHERE     period_name = 'Sep-00';
    ----------------------------------------------------------TITLE
    format_colheading0;
    insert_line;
    COMMIT;
    initialize_vars;
    insert_line;
    insert_line;
    COMMIT;
    initialize_vars;
    format_title1;
    insert_line;
    COMMIT;
    format_title2;
    insert_line;
    COMMIT;
    initialize_vars;
    insert_line;
    insert_line;
    COMMIT;
    ------------------------------------------------ MONTHLY SUNDRY SUMMARY
    initialize_vars;
    s_account := '                ';
    s_amount  := 0;
    h_account_sdr := '                ';
    h_amount_sdr  := 0;
    OPEN cur_sundry_cr_mo;
    OPEN cur_sundry_dr_mo;
    FETCH cur_sundry_cr_mo INTO h_account_scr, h_amount_scr;
    FETCH cur_sundry_dr_mo INTO h_account_sdr, h_amount_sdr;
    v_cur_acct_scr_ref := h_account_scr;
    v_cur_acct_sdr_ref := h_account_sdr;
    WHILE cur_sundry_cr_mo%FOUND
    OR      cur_sundry_dr_Mo%FOUND
    LOOP
    -------------------------------------------- TOTAL SUNDRY CREDIT PER ACCOUNT
         WHILE cur_sundry_cr_mo%FOUND
         AND h_account_scr = v_cur_acct_scr_ref
         LOOP
              v_sundry_credit_account := h_account_scr;
              v_sundry_cr_acct_total := v_sundry_cr_acct_total + h_amount_scr;
              v_sundry_credit_amount  := LPAD( v_sundry_cr_acct_total, 15, ' ');
              v_sundry_cr := v_sundry_credit_account || ' ' || v_sundry_credit_amount;
              h_account_scr := '                ';
              h_amount_scr  := '               ';
              FETCH cur_sundry_cr_mo INTO h_account_scr, h_amount_scr;
         END LOOP;
         v_cur_acct_scr_ref := h_account_scr;
    -------------------------------------------- SUNDRY DEBIT PER INSTANCE
         WHILE cur_sundry_dr_mo%FOUND
         AND h_account_sdr = v_cur_acct_sdr_ref
         LOOP
    -------------------------------------------- TOTAL SUNDRY DEBIT PER ACCOUNT
              v_sundry_debit_account := h_account_sdr;
              v_sundry_dr_acct_total := v_sundry_dr_acct_total + h_amount_sdr;
              v_sundry_debit_amount  := LPAD( v_sundry_dr_acct_total, 15, ' ');
              v_sundry_dr := v_sundry_debit_account || ' ' || v_sundry_debit_amount;
              FETCH cur_sundry_dr_mo INTO h_account_sdr, h_amount_sdr;
         END LOOP;
         v_cur_acct_sdr_ref := h_account_sdr;
    -------------------------------------------- WRITE LINE
         insert_line;
         initialize_vars;
         v_sundry_cr_acct_total := 0;
         v_sundry_dr_acct_total := 0;
    END LOOP;
    CLOSE cur_sundry_cr_mo;
    CLOSE cur_sundry_dr_mo;
    format_sundry_colhead3;
    insert_line;
    END glccshdb;Can you give me sample on how to put debugging lines using dbms_output here?
    I do not use TOAD or SqlDev to this the procudure....I only use SQL*Plus.
    Thanks a lot

  • How to use the procedure column in reports

    Hi all
    How to call the procedure in reports as source.. If possible how to use columns of procedure in the layout column of report????

    Hi,
    Your query is not clear.
    1. In subject are you asking total column.
    A. Edit pivot view and go to Rows and click Total BY option here you can find option like (none,before,after) the you can select after it will display total all culms.
    2. I want use the columnC in columnD ? -- Am not understand.
    A. What my understand is you want to see the report only C and D values only.
    If it is correct we can apply filter in report level click column filed and apply not equal to A then it will show only C and D only.
    If it is wrong pleas post me correct one with example. Will try to help out this.
    I am not sure this is what your looking so far.
    Award points it is useful.
    Thanks,
    Satya

  • How to call one procedure from another procedure

    Hi all,
    Could anyone give me clue how to call a procedure contains out parameters
    from another procedure.
    I had following procedures.
    1)
    create or replace procedure INS_PUR_ORDER
    p_poamt in number,
    p_podate in date,
    p_poid out number
    is
    begin
    select pkseq.nextval into p_poid from dual;
    insert into pur_order(poamt,podate,poid)
    values (p_poamt,p_podate,p_poid);
    end;
    2)
    create or replace procedure INS_PUR_ORDER_DETAIL
    p_pounits in number,
    p_poddate in date,
    p_poid in number)
    is
    begin
    Insert into pur_order_detail(podid,pounits,poddate,poid)
    values(pdseq.nextval,p_pounits,p_poddate,p_poid);
    end;
    I need to write a 3rd procedure which calls above two procedures.
    like
    call first procedure ,basing on the return value
    i.e if p_poid != 0 then
    we need to call second procedure
    in the loop.
    thanks in advance.
    rampa.

    Not sure what are you doing, you can not assign cursor to another cursor, may be you are looking for this?
    SQL> create or replace procedure proc1 ( result out sys_refcursor)
      2  is
      3  
      4  begin
      5     open result for
      6       select 'HELLO WORLD' from dual ;
      7  end proc1 ;
      8  /
    Procedure created.
    Elapsed: 00:00:00.01
    SQL> create or replace procedure proc2
      2  is
      3     l_cursor sys_refcursor ;
      4  begin
      5     l_cursor := proc1 ;
      6   
      7  
      8     open l_cursor;
      9     fetch l_cursor into l_text;
    10     dbms_output.put_line(l_text);
    11     close l_cursor;
    12  
    13  
    14  end proc2 ;
    15  /
    Warning: Procedure created with compilation errors.
    Elapsed: 00:00:00.01
    SQL> show error;
    Errors for PROCEDURE PROC2:
    LINE/COL ERROR
    5/4      PL/SQL: Statement ignored
    5/16     PLS-00306: wrong number or types of arguments
             in call to 'PROC1'
    6/4      PLS-00201: identifier 'L_TEXT' must be
             declared
    6/4      PL/SQL: Statement ignored
    8/4      PLS-00382: expression is of wrong type
    8/4      PL/SQL: SQL Statement ignored
    9/4      PL/SQL: SQL Statement ignored
    9/24     PLS-00201: identifier 'L_TEXT' must be
             declared
    10/4     PL/SQL: Statement ignored
    10/25    PLS-00201: identifier 'L_TEXT' must be
             declared
    ---- this is the correct waySQL>ed
      1  create or replace procedure proc2
      2  is
      3     l_cursor sys_refcursor ;
      4     l_text varchar2(100);
      5  begin
    ---- procedure call
      6     proc1(l_cursor); 
    7    -- open l_cursor;
      8     fetch l_cursor into l_text;
      9     dbms_output.put_line(l_text);
    10     close l_cursor;
    11* end proc2 ;
    SQL> /
    Procedure created.
    Elapsed: 00:00:00.01
    SQL> set serveroutput on
    SQL> execute proc2;
    HELLO WORLD
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL>

  • How to create a procedure in oracle to write the data into file

    Hi All,
    I am just wondered on how to create a procedure which will do following tasks:
    1. Concat the field names
    2. Union all the particular fields
    3. Convert the date field into IST
    4. Prepare the statement
    5. write the data into a file
    Basically what I am trying to achieve is to convert one mysql proc to oracle. MySQL Proc is as follows:
    DELIMITER $$
    USE `jioworld`$$
    DROP PROCEDURE IF EXISTS `usersReport`$$
    CREATE DEFINER=`root`@`%` PROCEDURE `usersReport`(IN pathFile VARCHAR(255),IN startDate TIMESTAMP,IN endDate TIMESTAMP )
    BEGIN
    SET @a= CONCAT("(SELECT 'User ID','Account ID','Gender','Birthdate','Account Registered On') UNION ALL (SELECT IFNULL(a.riluid,''),IFNULL(a.rilaccountid,''),IFNULL(a.gender,''),IFNULL(a.birthdate,''),IFNULL(CONVERT_TZ(a.creationDate,'+0:00','+5:30'),'') INTO OUTFILE '",pathFile,"' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\n' FROM account_ a where a.creationDate>='",startDate,"' and a.creationdate <='",endDate,"')");
    PREPARE stmt FROM @a;
    EXECUTE stmt;
    DEALLOCATE PREPARE stmt ;
    END$$
    DELIMITER ;
    Regards,
    Vishal G

    1. Concat the field names
    Double Pipe (||) is the concatenation operator in Oracle. There is also a function CONCAT for this purpose
    2. Union all the particular fields
    Not sure what do you mean by UNION ALL particular fields? UNION ALL is a set operation applied on two different result sets that have the same projection.
    3. Convert the date field into IST
    SQL> select systimestamp "Default Time"
      2       , systimestamp at time zone 'Asia/Calcutta' "IST Time"
      3    from dual;
    Default Time                                       IST Time
    05-05-15 03:14:52.346099 AM -04:00                 05-05-15 12:44:52.346099 PM ASIA/CALCUTTA
    4. Prepare the statement
    What do you mean by prepare the statement?
    5. write the data into a file
    You can use the API UTL_FILE to write to a file.

  • How to configure release procedure for rate contracts release

    Dear all,
    How to configure release procedure for rate  contract following are the requirements
    they are two release codes c1 & c2 <=100000,>=100000
                    if  c1 is not there c2 has to be approved
         Change in the value of the rate contract contract
         Change in the validity of the rate contract
         Addition of deletion of line items
    While using a non u2013 released rate contract in the PO an error message should shoot out.
    Also the logic should be changed while using the rate contract in the PO.
    The usage of the rate contract should be till the validity of the rate contract. i.e. the measurement should be end date of the rate contract and the PO creation date and not the delivery date of the PO. &
    It should be possible to refer existing valid rate contracts in purchase orders.
    Regards,
    bhaskar

    Hi,
    In SAP rate contract is known as value contract denoted with wk. The release procedure for rate contract is same as that of other contracts and scheduling agreements. The tables  for contracts will vary with SA (Scheduling agreement) .You may try and maintain condition records based on the customer combination and maintian the validity date of condition records as per your requirement.For contract and PO will have the same header/item table as EKKO/EKPO, and the release
    class in standard is the same FRG_EKKO, you can use the same for contract.
    To distinguish if it's a contract or PO, EKKO-BSART can be used.
    For contract EKKO-BSART will be MK or WK, while PO will have NB/UB etc..
    You can restrict the document type to set up the release strategy for only contract.
    Of cause, you can also create your own release class Z* for contract copying standard
    one FRG_EKKO via CL01/Class type 032, and then assign the class Z* to customizing:
    OLME:
    -> contract
    ->Release Procedure for Contracts
    ->Define Release Procedure for Contracts
    ->Release Groups
    If you have already created the PO release class.
    Assign a new chracteristic of Document Category -BSTYP
    Please check below link for detailed release procedure. I hope this wil help you out .Thanking you.
    http://wiki.sdn.sap.com/wiki/display/ERPSCM/RELEASE+PROCEDURE#RELEASEPROCEDURE-TABLESUSEDFORRELEASEPROCEDURES

  • How to create  a procedure to send a mail if the Database is down?

    Hi,
    I have created the below procedure to send a mail if the count is less than 1300. It scheduled daily @ 15 30 hrs. Its fine.
    CREATE OR REPLACE procedure SCOTT.hrsmail
    is
    v_count number;
    begin
    Select count(*) into v_count from emp;
    if v_count < 1300
    then
    UTL_MAIL.send(sender => '[email protected]',
    recipients => '[email protected]',
    cc => '[email protected]',
    bcc => '[email protected]',
    subject => 'Testing the UTL_MAIL Package',
    message => 'If you get this, UTL_MAIL package
    else
    null; --what you want to do here
    end if ;
    end;
    Sometime the Database is down, so the job is not running.
    How to create a procedure to send a mail if the database is down?
    Pls help me. Its highly appreciated.
    Thanks
    Nihar

    nihar wrote:
    How to create a procedure to send a mail if the database is down?And what if the database is up, but the network down? Or the database up and mail server down? Or mail server undergoing maintenance?
    There are loads of "+What if's+" - and in that respect, playing "+What if database is down..+" in this case does not make any sense. You do not use the database to monitor its own up/down status. You do not rely just on SMTP as notification protocol that the database is down.
    The correct approach would be using something like SNMP as the monitoring protocol. A monitoring system that can process SNMP and perform some basic root cause analysis (e.g. network to the database server down, database server status unknown). And this system supporting notification methods like SMTP, SMS and so on.

  • How to assign sampling procedure at plant level.

    Hi Team,
    Pls suggest me "How to assign sampling procedure at plant level."
    Error message is  -  You can not use sampling procedure here.
    Not all sampling procedures can be used in this context.
    Example:
    Only the sampling procedures for an attributive inspection based on the
    number of nonconforming units are allowed.
    However I have assigned 0.05% sampling procedure in IDES system plant, which is accepted. However I am not allowed to assign this in client system..
    Pls suggest me solution.
    Thanks

    Hi,
       During creation of inspection plan you can assign SP at plant level, IP always at plant level
    Q.Error message is - You can not use sampling procedure here.
    ---> pl check the MIC where Sampling procedure in clicked or not
           pl revert
    Cheers,

  • How to execute the procedure in sap b1

    Hai to all,
                 I done a procedure in sql server .but i don't know how to execute that  procedure in sap b1?
    can anyone help me immediately.
    Regards,
    Ramya.S

    Dear Ramya.S,
    You could execute the store procedure by using Recordset object in SDK DI code. It is like:
    Dim myRecordSet As SAPbobsCOM.Recordset
    myRecordSet =                                   
    SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecord
    set)
    myRecordSet.Command.Name = "TestStoredProcedure"
    myRecordSet.Command.Parameters.Item("@ItemLike").Value = "IT%"
    myRecordSet.Command.Parameters.Item(2).Value = "C0001"
    myRecordSet.Command.Execute()

  • How to retrieve the procedure value and pass the value to a form field

    How to retrieve the procedure value and pass the value to a form field?

    Set property for the field and the value is the actual procedure/function.
    Cheers

  • How to use Stored Procedure Call in Sender JDBC adapter

    Hi All,
             Could someone send me a blog on how to use Stored Procedure call in Sender JDBC adapter?
    Xier

    Hi Xler
    refer these links
    /people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Also, you can check Sriram's blog for executing Stored Procedures,
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    /people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter
    This blog might be helpfull on stored procedures for JDBC
    JDBC Stored Procedures
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    Please go through these threads and see if it helps...
    Re: How to execute Stored Procedure?
    Re: Problem with JDBC stored procedure
    Thnaks !!

  • How to modify stored procedures in SQL Azure database in SQL server express 2012

    Hi,
    I want to modify stored procedures in SQL Azure database in SQL Server Express 2012. But when right click on the stored procedure in Object Explorer, there is no option "Modify" as for SQL Server database. I wonder how to modify stored procedures in SQL
    Azure database in SQL Server Express 2012. Thanks.
    York

    Hi,
    Not sure whay there is no modify..
    As a workaround can you try this and see if you can modify proc..
    Script Procedure As-> Alter To->New query window..
    - Chintak (My Blog)

Maybe you are looking for

  • Is it possible to merge duplicate email addresses in the same address book?

    Instead of multiple address books have combined them all into one by dragging and dropping into main address book. Is there a method to merge duplicate address such that no data is lost? I.E. if one entry had different data from another duplicate can

  • Personalized emails in Mail???

    Is there a relatively simple way of sending emails in a 'house' style ie with my logo? In its simplest form I would like to include a banner along the bottom of each email which will appear in as many other mail clients as possible. and the most comp

  • New document type--printing PO

    Hi, I created new doc types and I noticed that the POs created under the new doc types did not displayed anything in the Messages (printing).  Do I have to configure the output control? if yes, how? thanks so much!

  • Regarding standard menu in module pool... have ur point.s

    Hi all, I wanna copy stanadard status to my module pool program. Could u pleas help me for that... <b>have ur points..</b> Regards, [email protected]

  • LMS 4.2 virtual appliance: How to export archive devices configs on a network drive

    Hello, I will install a new LMS 4.2 based on a virtual Linux Red Hat appliance. I would like to export archive devices configurations based on /var/adm/CSCOpx/files/rme/dcma/shadow on an external drive. Do we have embedded tools on LMS 4.2 Linux to s