How to debug a procedure in an attached library?

Hi everybody,
I am working with Developer Suite 10g on a 9iR2 database.I am 'playing' with F90UTIL pl/sql library which comes with the Forms Demos (downloaded from otn).
I created a form to which I attached the F90UTIL library. On a WHEN-BUTTON-PRESSED trigger I call the function f90write.write_html (package f90write belongs to F90UTIL library). At run-time something is not working properly, the execution hangs in the write_html function....
I want to execute write_html function step by step in order to see what happens by placing a breakpoint in it. How can I debug this function?. In Object Navigator, under node Attached Libraries I select the function write_html of the F90UTIL library, mouse right click ,choose PL/SQL Editor but nothing happens.
So, how can I debug this functions?Why can't I see it's PL/SQL code in object navigator (under Attached Libraries Node) in order to put a breakpoint?
Any help will be appreciated.
thank you
daniela

Hi Gerd,
That's exctly how I did it. I have a breakpoint in the WHEN-BUTTON-PRESSED trigger whose code looks like this:
declare
v_dummy number;
some_other_declarations;
begin
some_code_1;
v_dummy := f90write.write_html(some_parameters);
some_code_2;
end;
I go through the code with F7. But when I get to the line v_dummy := f90write.write_html(some_parameters); everything hungs, it won't go further, it won't step into the write_html function. That's why I thought to put a breakpoint inside write_html function in order to see what happens ...

Similar Messages

  • How to debug a procedure in SQL Developer

    i am a plsql writer .... i use SQL Developer to connect to oracle on windows platform ... iam using oracle
    version 10g some time i need to debug a procedure or i want to run a procedure in debug mode
    please tell me how to do this SQL Developer

    There's great help inside sqldev, just follow the Help Contents - Concepts and usage - Running and debugging...
    Have fun,
    K.

  • How to debugging a procedure

    Hi,
    I have some 1000 lines of code in a procedure
    now i want to debug this procedure to find out where the error getting
    could any one help me how to debug the huge lines of procedure

    Hi,
    I usually opt for PL/SQL developer tool for debugging millions of line of code. Try to grant the privilege to user 'debug connect session'.
    Try to execute the procedure in step by step execution. Pass the run time variable input value to procedure and go on with debug procedure then you can watch how code is carrying out the changes.
    HTH
    - Pavan Kumar N

  • How to debug Stored Procedures on Runtime?

    Is there any way or any tool available using which I could debug stored procedures on runtime ? Please also pass the links if you know any.

    Check out the PL/SQL Developer tool:
    http://www.allroundautomations.nl/plsqldev.html
    You can download a fully functional version for a 30 day trial. Much less expensive than TOAD, and better yet, it actually works (the TOAD PL/SQL debugger in version 8 is so buggy as to render it useless)

  • 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 can we debug a procedure?

    we need to debug a procedure but we lost the way after oracle moved the procedure builder to enterprise manager. we can execute it via em but we need a tool for writing,debugging and executing new ones.

    An SQLPlus window and either dbms_output or an anonymous log writing procedure is all you need to develop and debug home grown code.
    Most routines can be written as anonymous pl/sql code and tested then collected together into stored procedures or packages.
    You do not need a GUI tool, but if you must use one there is a product called PL/SQL Developer that some of our developers use. The developers seem to like it a lot.
    HTH -- Mark D Powell --

  • How to debugg Stored Procedure?

    Hi ,
    Greetings of the day,
    How to debug the stored procedure in sql.(how to enable debugging.)
    Thanks and Regards
    Shivanand.
    Yours Shivu([email protected])

    Hi shivanand
    you can attach the debugger to the stored procedure, here is steps for the same => http://msdn.microsoft.com/en-us/library/ms241871(v=vs.90).aspx .
    Other way i have seen by developers is adding print statement in between of the stored procedure, that the dirty way of debugging.
    Regards Harsh

  • How to debug and find the exact constraint violation error

    {122712 14:22:36:ErrorCode -1 with ErrorMessage as ORA-00001: unique constraint (OPS$CMS.PK_TB_ML_EXER_UPLOAD) violated has occured for [SSO16063259009], [CMSCOST_USER] pk_xop_subsales.pr_process_exer }
    {PROCEDURE pr_process_exer(
    p_voucher_num           tb_xop_order_manager_t.voucher_num%TYPE,
    p_status_type           tb_xop_order_manager_t.status_type%type,
    p_dest                    tb_xop_order_manager_t.dest%type,
    p_reference_key            tb_xop_order_manager_t.reference_key%type,
    p_seq_num                tb_xop_order_manager_t.seq_num%type,
    p_return_code            tb_xop_order_manager_t.return_code%type,
    p_reason_desc           tb_xop_order_manager_t.reason_desc%type,
    p_activity_qty            tb_xop_order_manager_t.activity_qty%type,
    p_leaves_qty            tb_xop_order_manager_t.leaves_qty%type,
    p_exec_price            tb_xop_order_manager_t.exec_price%type,
    p_current_status        tb_xop_order_manager_t.current_status%type,
    p_err_cur          OUT  ref_cursor)
    IS
    CURSOR get_order_dtls(v_voucher_num tb_xop_order_manager_t.voucher_num%type)
    IS
    SELECT *
    FROM   tb_xop_order_manager_t
    WHERE  voucher_num = v_voucher_num;
    CURSOR get_mail_cd(v_opt_num OPTIONEE.opt_num%TYPE) IS
          SELECT mail_cd, sp_mail_cd
          FROM XOP_OPTIONEE
          WHERE opt_num = v_opt_num;
    cursor get_opt_dtls(v_opt_num OPTIONEE.opt_num%TYPE) IS
    select
    SUBSTR(trim(O.name_first) || ' ' || trim(O.name_mi) || ' ' ||
              trim(O.name_last), 1, 35) p_name,
            SUBSTR(O.address1, 1, 35) opt_addr1,
              SUBSTR(O.address2, 1, 35) opt_addr2,
              SUBSTR(O.address3, 1, 35) opt_addr3,
              SUBSTR(O.address4, 1, 35) opt_addr4,
              SUBSTR(O.address5, 1, 35) opt_addr5,
              SUBSTR(O.address6, 1, 35) opt_addr6,
            SUBSTR(trim(O.city) || ' ' || trim(O.state) || ' ' ||
            trim(O.zip) || ' ' || trim(O.country), 1, 35) city_state_zip_country,
            trim(O.city) city,
            trim(O.state) state,
            trim(O.zip) zip,
            trim(O.country) country
    from  optionee o
    where o.opt_num = v_opt_num;
    --CQ:PCTUP00210726- Added wire instructions audit for deleted wire info.
    CURSOR c_wire_instruction (
          in_wire_seq_no           TB_XOP_WIRE_INSTRUCTIONS.wire_seq_no%TYPE ) IS
          SELECT ml_brok_acct_num,
                 ssn,
                 plan_num,
                 instr_type,
                 aba_routing_num,
                 swift_routing_code,
                 bank_name,
                 bank_acct_num,
                 name_on_account,
                 bank_addr_1,
                 bank_addr_2,
                 bank_addr_3,
                 city,
                 state,
                 country,
                 zip,
                 bank_ident_num,
                 addtl_info
            FROM TB_XOP_WIRE_INSTRUCTIONS
           WHERE wire_seq_no = in_wire_seq_no
           UNION
           SELECT ml_brok_acct_num,
                 ssn,
                 plan_num,
                 instr_type,
                 aba_routing_num,
                 swift_routing_code,
                 bank_name,
                 bank_acct_num,
                 name_on_account,
                 bank_addr_1,
                 bank_addr_2,
                 bank_addr_3,
                 city,
                 state,
                 country,
                 zip,
                 bank_ident_num,
                 addtl_info
            FROM TB_XOP_WIRE_INSTRUCTIONS_AUDIT
           WHERE wire_seq_no = in_wire_seq_no;
    CURSOR c_order_qty IS
    SELECT order_qty
    FROM tb_xop_order_manager
    WHERE voucher_num = p_voucher_num;
    v_order_qty     tb_xop_order_manager.order_qty%TYPE;
    v_wire_instruction             c_wire_instruction%ROWTYPE;
    v_order_dtls      get_order_dtls%rowtype;
    v_opt_dtls        get_opt_dtls%rowtype;
    v_settle_dt       tb_ml_exer_upload.settle_dt%type;
    v_cusip_num       corp.cusip_num%type;
    v_err_cd          number(12):=0;
    v_err_msg         varchar2(4000);
    v_compy_nme       tb_fc_Compy.compy_nme%type;
    v_ml_sec_num      tb_fc_compy.ml_sec_num%type;
    v_mail_cd         xop_optionee.mail_cd%type;
    v_count1            PLS_INTEGER := 0;
    v_sum_activity_qty  tb_xop_order_manager_t.activity_qty%TYPE;
    v_transact_no       PLS_INTEGER;
    v_ivr_plan_num      tb_fc_compy.ivr_plan_num%TYPE;
    wait_for_more       EXCEPTION;
    exceeds_order_qty   EXCEPTION;
    --Added for CQ# PCTUP00481233
    v_sub_totfee number;
    v_sub_fixedfee1 number;
    v_sub_fixedfee2 number;
    v_sub_fixedfee3 number;
    v_sub_secfee number;
    v_sub_feenum number;
    --Added for CQ# PCTUP00481233
    v_fixedfee1 tb_xop_order_manager_t.fixed_fee1%TYPE; --SPIF# 43161- variable to hold fixed fee1
    BEGIN
        OPEN c_order_qty;
        FETCH c_order_qty INTO v_order_qty;
        CLOSE c_order_qty;
        dbms.output.put_line('completed1');
        IF v_order_qty <> p_activity_qty THEN
          dbms.output.put_line('completed2');
            IF p_status_type = 'EO' AND v_order_qty < p_activity_qty THEN
                RAISE exceeds_order_qty;
                  dbms.output.put_line('completed3');
            ELSIF p_status_type = 'EO' AND v_order_qty > p_activity_qty THEN
                -- Partial Execution
                INSERT INTO tb_xop_hold_multi_orders
                    ( voucher_num
                    , reference_key
                    , seq_num
                    , return_code
                    , reason_desc
                    , status_type
                    , activity_qty
                    , leaves_qty
                    , exec_price
                    , current_status
                    , waiting
                    ,activ_dt )
                VALUES
                    ( p_voucher_num
                    , p_reference_key
                    , p_seq_num
                    , p_return_code
                    , p_reason_desc
                    , p_status_type
                    , p_activity_qty
                    , p_leaves_qty
                    , p_exec_price
                    , p_current_status
                    , 'Y'
                    ,SYSTIMESTAMP );
                      dbms.output.put_line('completed4');
            ELSE
                IF p_status_type = 'BE' THEN
                    SELECT COUNT(1) INTO v_count1
                    FROM tb_xop_hold_multi_orders
                    WHERE voucher_num = p_voucher_num;
                      dbms.output.put_line('completed5');
                    IF v_count1 > 0 THEN
                        INSERT INTO tb_xop_hold_multi_orders
                            ( voucher_num
                            , reference_key
                            , seq_num
                            , return_code
                            , reason_desc
                            , status_type
                            , activity_qty
                            , leaves_qty
                            , exec_price
                            , current_status
                            , waiting
                            ,activ_dt)
                        VALUES
                            ( p_voucher_num
                            , p_reference_key
                            , p_seq_num
                            , p_return_code
                            , p_reason_desc
                            , p_status_type
                            , (-1) * p_activity_qty
                            , p_leaves_qty
                            , p_exec_price
                            , p_current_status
                            , 'Y'
                            ,SYSTIMESTAMP );
                        UPDATE tb_xop_hold_multi_orders
                        SET waiting = 'Y'
                        WHERE voucher_num = p_voucher_num;
                          dbms.output.put_line('completed6');
                    END IF;
                END IF;
            END IF;
              dbms.output.put_line('completed7');
            SELECT SUM(NVL(activity_qty,0)) INTO v_sum_activity_qty
            FROM tb_xop_hold_multi_orders
            WHERE waiting = 'Y'
            AND voucher_num = p_voucher_num;
            IF v_sum_activity_qty > 0 THEN
                IF v_sum_activity_qty <> v_order_qty THEN
                    RAISE wait_for_more;
                ELSE
                    -- final order in the partial execution; complete the process
                    UPDATE tb_xop_hold_multi_orders
                    SET waiting = 'N'
                        , process_dt = SYSDATE
                    WHERE voucher_num = p_voucher_num;
                END IF;
            END IF;
        END IF;
        UPDATE tb_xop_order_manager_t
        SET activ_dt = TO_CHAR( SYSDATE, 'YYYY-MM-DD HH24:MI:SS' ) || '.000'
            , dest = p_dest
            , reference_key = p_reference_key
            , seq_num = p_seq_num
            , return_code = p_return_code
            , reason_desc = p_reason_desc
            , status_type = p_status_type
            , activity_qty = v_order_qty --p_activity_qty
            , leaves_qty = 0 --p_leaves_qty
            , exec_price = p_exec_price
        WHERE voucher_num = p_voucher_num;
        dbms.output.put_line('completed8');
         * SPIF# 43161- Update of current status to PO moved at the end, same as how PROD works.
    IF (p_status_type = 'EO') THEN
      BEGIN
        select cusip_num
          into   v_cusip_num
          from   corp;
      EXCEPTION
          WHEN NO_DATA_FOUND THEN
              SELECT cusip_num
                INTO v_cusip_num
                FROM tb_xop_espp_compy
               WHERE compy_acronym = replace(replace(user,'CMS'),'_USER');
          WHEN OTHERS THEN
              NULL;
      END;
       select compy_nme,ml_sec_num, ivr_plan_num
       into   v_compy_nme,v_ml_sec_num, v_ivr_plan_num
       from   tb_fc_compy
       where compy_acronym = replace(replace(user,'CMS'),'_USER')
       UNION ALL
       select compy_nme, je_ml_security_number, ivr_plan_num
       from tb_xop_espp_compy
       where compy_acronym = replace(replace(user,'CMS'),'_USER');
    --   where  ivr_plan_num = replace(substr(p_voucher_num,1,7),'SSO','XOP');
      open get_order_dtls(p_voucher_num);
      FETCH get_order_dtls INTO v_order_dtls;
       v_settle_dt := fn_xop_bankopen_bizday(TRUNC(v_order_dtls.exer_date + 1));
       v_settle_dt := fn_xop_bankopen_bizday(TRUNC(v_settle_dt + 1));
       v_settle_dt := fn_xop_bankopen_bizday(TRUNC(v_settle_dt + 1));
       FOR c_mail_cd IN get_mail_cd(v_order_dtls.opt_num)
       LOOP
         v_mail_cd := c_mail_cd.mail_cd;
         -- Do we need to get sp_mail_cd and overlay with the sp_mail_cd in order_manager_t???
       END LOOP;
       OPEN get_opt_dtls(v_order_dtls.opt_num);
       FETCH get_opt_dtls INTO v_opt_dtls;
       CLOSE get_opt_dtls;
      v_fixedfee1 := nvl(v_order_dtls.fixed_fee1, 0);
       * SPIF# 43161- atleast one handling fee per day of transaction
      v_fixedfee1 := pk_xop_enh_exerupdate.chrg_tranxfixed_fee(v_fixedfee1,
                                                               v_order_dtls.symbol,
                                                               v_order_dtls.corp_acronym,
                                                               v_order_dtls.opt_num);
      --Insert into tb_ml_exer_upload
      --Added for CQ# PCTUP00481233
       Pk_Xop_Transactmodel.GET_FEE(v_order_dtls.GROUP_ID,v_order_dtls.SVC_ID,'SQ',v_order_dtls.opts_exer,
                                    round(v_order_dtls.exec_price, 4),v_sub_totfee,v_sub_fixedfee2,v_sub_fixedfee1,
                                    v_sub_fixedfee3,v_sub_secfee,v_sub_feenum,lpad(v_order_dtls.ssn,9,0));
       v_order_dtls.sec_fee:=v_sub_secfee;
       UPDATE tb_xop_order_manager_t
        SET sec_fee=v_sub_secfee
        WHERE voucher_num = p_voucher_num;
        dbms.output.put_line('completed8');
      --- End CQ # PCTUP00481233
      INSERT INTO tb_ml_exer_upload
                            (exer_num,exer_seq,
                             exer_dt, written_flag, backout_flag, output_line,
                             je_flag, opts_exer,
                             tot_tax,shrs_sold,comm_value,tot_fee,
                             mkt_prc,exer_type, soc_sec,
                             name_first, name_mi,
                             name_last,check_addr_1,check_addr_2,check_addr_3,
                             check_addr_4,check_addr_5,city,state,zip,country,
                             city_state_zip_country,
                             p_name,opt_addr1,opt_addr2,opt_addr3,opt_addr4,
                             opt_addr5,opt_addr6,
                             settle_dt,send_to_citibank_flag,
                             dom_chek_distr,foreign_currency_code,
                             distribution_method,wire_seq_no,
                             cusip_num, ml_retail_account,multi_curr_handling_fee,
                             ml_sec_num, corp_name,upd_optionee_addr,
                             outbound_flag, -- make it N
                             corp_symbol,taxwire_approve, -- make it not applicaplabe
                             exersource,
                             mail_cd, sp_mail_cd,
                             backup_withholding,
                             user_id,
                             acct_num_othr)
       VALUES(v_order_dtls.exer_num,0,v_order_dtls.exer_date,'N','N',NULL,
    -- PG 12/12/05 Changed to populate the je_flag based on dom_chek_distr         'D',
    -- PG 12/16/05 JE should not be generated for international checks.. So 'Y' always
              'Y', --je_flag
              v_order_dtls.opts_exer,0,--total tax will be 0.
              v_order_dtls.opts_exer, --shrs_sold,
              v_order_dtls.comm_value,
              --SPIF# 43161- replaced nvl(v_order_dtls.fixed_fee1, 0) with v_fixedfee1
              v_fixedfee1 + nvl(v_order_dtls.fixed_fee3,0) + nvl(v_order_dtls.sec_fee,0), --v_order_dtls.fees_amt,
              round(v_order_dtls.exec_price, 4),v_order_dtls.exer_type,
              LPAD(v_order_dtls.ssn,9,'0'), --v_order_dtls.ssn, Modified by Suresh on 02/08/07 for SPIF # 37210
              v_order_dtls.name_first,v_order_dtls.name_mi,v_order_dtls.name_last,
              v_order_dtls.check_addr_1,v_order_dtls.check_addr_2,v_order_dtls.check_addr_3,
              v_order_dtls.check_addr_4,v_order_dtls.check_addr_5,nvl(v_order_dtls.city,v_opt_dtls.city),
              nvl(v_order_dtls.state,v_opt_dtls.state),nvl(v_order_dtls.zip,v_opt_dtls.zip),
              nvl(v_order_dtls.country,v_opt_dtls.country),
              SUBSTR(nvl(v_order_dtls.city||v_order_dtls.state||v_order_dtls.zip||v_order_dtls.country,
                  v_opt_dtls.city_state_zip_country),1,34), -- COLUMN LENGTH MAX IS 35
              v_opt_dtls.p_name,v_opt_dtls.opt_addr1,v_opt_dtls.opt_addr2,v_opt_dtls.opt_addr3,
              v_opt_dtls.opt_addr4,v_opt_dtls.opt_addr5,v_opt_dtls.opt_addr6,
              v_settle_dt,decode(v_order_dtls.distribution_method,'W','Y','D','Y','C','Y','D'),
              v_order_dtls.dom_chek_distr,v_order_dtls.foreign_currency_code,
              v_order_dtls.distribution_method,v_order_dtls.wire_seq_no,
              v_cusip_num,v_order_dtls.acct_num,v_order_dtls.multi_curr_handling_fee,
    --          nvl(fn_get_sec_num(replace(substr(p_voucher_num,1,7),'SSO','XOP'),v_order_dtls.symbol),v_ml_sec_num),
              nvl(fn_get_sec_num(v_ivr_plan_num, v_order_dtls.symbol),v_ml_sec_num),
              v_compy_nme,v_order_dtls.upd_optionee_addr,
              'N', --'N' is for outbound flag.
              v_order_dtls.symbol,'D', --'D' for taxwires disabled
              'S', -- 'S' for source being subsequent sale.
              v_mail_cd,  --need to get mail_Cd??
              v_order_dtls.sp_mail_cd,v_order_dtls.backup_withholding,
              user,v_order_dtls.acct_num_othr);
    IF (NVL(v_order_dtls.wire_seq_no,0) > 0) THEN
       OPEN c_wire_instruction(v_order_dtls.wire_seq_no);
       FETCH c_wire_instruction INTO v_wire_instruction;
       CLOSE c_wire_instruction;
      INSERT INTO TB_XOP_TRANSACT_WIRE_INSTR
                           (user_id, exer_num, wire_seq_no, ml_brok_acct_num, ssn,
                            plan_num, instr_type, aba_routing_num,
                            swift_routing_code, bank_name, bank_acct_num,
                            name_on_account, bank_addr_1, bank_addr_2, bank_addr_3,
                            city, state, country, zip, bank_ident_num, addtl_info )
                        VALUES
                           (USER,v_order_dtls.exer_num, v_order_dtls.wire_seq_no,
                            v_wire_instruction.ml_brok_acct_num, v_wire_instruction.ssn,
                            v_wire_instruction.plan_num, v_wire_instruction.instr_type, v_wire_instruction.aba_routing_num,
                            v_wire_instruction.swift_routing_code, v_wire_instruction.bank_name, v_wire_instruction.bank_acct_num,
                            v_wire_instruction.name_on_account, v_wire_instruction.bank_addr_1, v_wire_instruction.bank_addr_2,
                            v_wire_instruction.bank_addr_3, v_wire_instruction.city, v_wire_instruction.state, v_wire_instruction.country, v_wire_instruction.zip,
                             v_wire_instruction.bank_ident_num, v_wire_instruction.addtl_info);
            dbms.output.put_line('completed10');
    END IF;
    /* PG 01/05/06 Call the check conversion only for international checks and wires */
    IF v_order_dtls.dom_chek_distr = 'N' AND v_order_dtls.distribution_method IN ('W', 'D', 'C') THEN
        /* PG 12/20/05 To process subsequent sales with wire or foreign currency distribution */
         v_transact_no := 88;
         pk_xop_citibank_forex.pr_cashconversion_ins_request( v_order_dtls.acct_num
                                                              , LPAD(v_order_dtls.ssn,9,'0') --v_order_dtls.ssn, Modified by Suresh on 02/15/07 for SPIF # 37210
                                                              , v_order_dtls.distribution_method
                                                              , v_order_dtls.foreign_currency_code
                                                              , v_order_dtls.wire_seq_no
                                                              , ROUND((v_order_dtls.opts_exer * round(v_order_dtls.exec_price, 4)),2)
                                                                - ROUND(v_order_dtls.comm_value,2)
                                                                - ROUND(nvl(v_order_dtls.fixed_fee1,0) + nvl(v_order_dtls.fixed_fee3,0) + nvl(v_order_dtls.sec_fee,0),2)
                                                                - nvl(v_order_dtls.multi_curr_handling_fee,0)
                                                                - nvl(v_order_dtls.backup_withholding,0) -- net proceeds
                                                              , v_order_dtls.multi_curr_handling_fee --handling fee
                    --Modified by Bhaskar/Suresh on 03/02/2006    --, v_order_dtls.login_name
                                                              , CASE v_order_dtls.login_name WHEN 'CLIENT/' THEN v_order_dtls.login_name||'SSO' ELSE v_order_dtls.login_name||'/SSO' END
                                                              , v_transact_no -- transact_no as place holder for exer_type 88
                                                              , v_order_dtls.check_addr_1
                                                              , v_order_dtls.check_addr_2
                                                              , v_order_dtls.check_addr_3
                                                              , v_order_dtls.check_addr_4
                                                              , v_order_dtls.upd_optionee_addr
                                                              , v_order_dtls.city
                                                              , v_order_dtls.state
                                                              , v_order_dtls.zip
                                                              , v_order_dtls.country
                                                              , v_order_dtls.login_ipaddress
                                                              , v_order_dtls.fcnum
                                                              , v_order_dtls.opt_num
                                                              , v_settle_dt,
                                                              p_exer_num => v_order_dtls.exer_num
    END IF;
    COMMIT;
    close get_order_dtls;
    END IF;
      * SPIF# 43161- Update to current status into PO is moved to this part, same as PROD.
    UPDATE tb_xop_order_manager_t
    SET exec_dttime = decode(p_status_type,'EO',to_char(sysdate,'DD-MON-YYYY HH24:mi:ss'),null)
         , exer_date  = TRUNC(SYSDATE)
         , cancel_dttime = decode(p_status_type,'CX',to_char(sysdate,'DD-MON-YYYY HH24:mi:ss'),'UR',to_char(sysdate,'DD-MON-YYYY HH24:mi:ss'),null)
         , current_status = 'PO'
         , sum_status = decode(p_status_type,'EO','X','C')
         , sum_stat_dttime = SYSDATE
    WHERE voucher_num = p_voucher_num;
          v_err_cd := sqlcode;
          v_err_msg := sqlerrm;
          open p_err_cur for select v_err_cd err_code,v_err_msg err_msg from dual;
    EXCEPTION
            dbms.output.put_line('completed200');
    /* PG 02/10 handled 'partial fill order' exception */
      when wait_for_more then
          v_err_cd := 0;
          v_err_msg := 'ORA-0000: normal, successful completion';
          pr_xop_log_errors('Partially filled; Waiting for more - Activity qty:' || to_char(v_sum_activity_qty)|| ' pk_xop_subsales.pr_process_exer');
          open p_err_cur for select v_err_cd err_code,v_err_msg err_msg from dual;
      when exceeds_order_qty then
          v_err_cd := sqlcode;
          v_err_msg := sqlerrm;
          open p_err_cur for select v_err_cd err_code,v_err_msg err_msg from dual;
          pr_xop_log_errors('Activity quantity exceeded the Order_qty - Activity qty: ' || to_char(p_activity_qty) || ' pk_xop_subsales.pr_process_exer');
      when others then
          v_err_cd := sqlcode;
          v_err_msg := sqlerrm;
          open p_err_cur for select v_err_cd err_code,v_err_msg err_msg from dual;
          pr_xop_log_errors('ErrorCode '||SQLCODE||' with ErrorMessage as '||SQLERRM||' has occured for '||user||'pk_xop_subsales.pr_process_exer');
                dbms.output.put_line('completed125');
    END pr_process_exer;
    Hi friends, any1 help me out how to define the ref-cursor in declaration section, and how to find at what situation the constraint error occurred..

    956684 wrote:
    Hi,.
    Friends plz help me out ..how to debug and find the exact position of the constraint violation..thank you for the help..There isn't a way to trace it unless you have caught the exception raised.
    As a way to start the debug, you will have to monitor
    1. All DML's against the Table on which you have constraint. More specifically, the DML's that act on the column you have constraint on.
    2. Use Exception Handling, to log the Error and the data that causes the constraint to fail.
    3. Do not forget to monitor the Triggers, if they are used, that would write some data into the column you have constraint on.
    Or
    Another way to trace is:
    select *
      from user_source
    where lower(text) like '%your_table_name%';
    order by type, name, line;Look at the lines, exclude that are in Declaration or in SELECT statements and target the DML's.
    Looking at the un-formatted code you posted, this statement looks like a culprit.
    INSERT INTO tb_ml_exer_upload
    (exer_num,exer_seq,
    exer_dt, written_flag, backout_flag, output_line,
    je_flag, opts_exer,
    tot_tax,shrs_sold,comm_value,tot_fee,
    mkt_prc,exer_type, soc_sec,
    name_first, name_mi,
    name_last,check_addr_1,check_addr_2,check_addr_3,
    check_addr_4,check_addr_5,city,state,zip,country,
    city_state_zip_country,
    p_name,opt_addr1,opt_addr2,opt_addr3,opt_addr4,
    opt_addr5,opt_addr6,
    settle_dt,send_to_citibank_flag,
    dom_chek_distr,foreign_currency_code,
    distribution_method,wire_seq_no,
    cusip_num, ml_retail_account,multi_curr_handling_fee,
    ml_sec_num, corp_name,upd_optionee_addr,
    outbound_flag, -- make it N
    corp_symbol,taxwire_approve, -- make it not applicaplabe
    exersource,
    mail_cd, sp_mail_cd,
    backup_withholding,
    user_id,
    acct_num_othr)
    VALUES(v_order_dtls.exer_num,0,v_order_dtls.exer_date,'N','N',NULL,
    -- PG 12/12/05 Changed to populate the je_flag based on dom_chek_distr 'D',
    -- PG 12/16/05 JE should not be generated for international checks.. So 'Y' always
    'Y', --je_flag
    v_order_dtls.opts_exer,0,--total tax will be 0.
    v_order_dtls.opts_exer, --shrs_sold,
    v_order_dtls.comm_value,
    --SPIF# 43161- replaced nvl(v_order_dtls.fixed_fee1, 0) with v_fixedfee1
    v_fixedfee1 + nvl(v_order_dtls.fixed_fee3,0) + nvl(v_order_dtls.sec_fee,0), --v_order_dtls.fees_amt,
    round(v_order_dtls.exec_price, 4),v_order_dtls.exer_type,
    LPAD(v_order_dtls.ssn,9,'0'), --v_order_dtls.ssn, Modified by Suresh on 02/08/07 for SPIF # 37210
    v_order_dtls.name_first,v_order_dtls.name_mi,v_order_dtls.name_last,
    v_order_dtls.check_addr_1,v_order_dtls.check_addr_2,v_order_dtls.check_addr_3,
    v_order_dtls.check_addr_4,v_order_dtls.check_addr_5,nvl(v_order_dtls.city,v_opt_dtls.city),
    nvl(v_order_dtls.state,v_opt_dtls.state),nvl(v_order_dtls.zip,v_opt_dtls.zip),
    nvl(v_order_dtls.country,v_opt_dtls.country),
    SUBSTR(nvl(v_order_dtls.city||v_order_dtls.state||v_order_dtls.zip||v_order_dtls.country,
    v_opt_dtls.city_state_zip_country),1,34), -- COLUMN LENGTH MAX IS 35
    v_opt_dtls.p_name,v_opt_dtls.opt_addr1,v_opt_dtls.opt_addr2,v_opt_dtls.opt_addr3,
    v_opt_dtls.opt_addr4,v_opt_dtls.opt_addr5,v_opt_dtls.opt_addr6,
    v_settle_dt,decode(v_order_dtls.distribution_method,'W','Y','D','Y','C','Y','D'),
    v_order_dtls.dom_chek_distr,v_order_dtls.foreign_currency_code,
    v_order_dtls.distribution_method,v_order_dtls.wire_seq_no,
    v_cusip_num,v_order_dtls.acct_num,v_order_dtls.multi_curr_handling_fee,
    -- nvl(fn_get_sec_num(replace(substr(p_voucher_num,1,7),'SSO','XOP'),v_order_dtls.symbol),v_ml_sec_num),
    nvl(fn_get_sec_num(v_ivr_plan_num, v_order_dtls.symbol),v_ml_sec_num),
    v_compy_nme,v_order_dtls.upd_optionee_addr,
    'N', --'N' is for outbound flag.
    v_order_dtls.symbol,'D', --'D' for taxwires disabled
    'S', -- 'S' for source being subsequent sale.
    v_mail_cd, --need to get mail_Cd??
    v_order_dtls.sp_mail_cd,v_order_dtls.backup_withholding,
    user,v_order_dtls.acct_num_othr);What is the Table structure of tb_ml_exer_upload and what columns do you have constraints on?
    Which column of the table tb_ml_exer_upload is your Primary Key (because constraint name mentions pk_tb_ml_exer_upload)?
    Edited by: Purvesh K on Jan 4, 2013 12:57 PM

  • How to debug a report

    how to debug a report
    i am new to ABAP

    Hi
    <b>ABAP Debugger</b>
    The ABAP Debugger is an integrated test tool within the ABAP Workbench. You use it to check the program logic and to find errors in the source code of an ABAP program. In the Debugger, you can step through the source code of a program. The running program is interrupted after each step, allowing you to check its processing logic and the results of individual statements.
    As of Release 6.10, you can also run Business Server Pages (BSP) in the debugging mode. You can also display and set breakpoints here. Business Server Pages can be displayed in the Object Navigator when you select an appropriate application under BSP Application.
    <b>Features</b>
    The Debugger provides an efficient means of identifying errors in ABAP programs. It contains the following functions:
    •    Ways of starting the Debugger
    •     Choosing different views
    •     Choosing different execution options in the Debugger
    •     Displaying source code in the Debugger
    •               Setting and deleting breakpoints
    •               Setting and deleting watchpoints
    •               Stopping a program at a particular statement or event
    •     Displaying and changing field contents at runtime
    •     Displaying ABAP Objects and references
    •     Displaying and positioning strings
    •     Setting and deleting database locks
    •     Opening the ABAP Editor, or Object Navigator
    •     System settings and runtime warnings
    <b>Starting the Debugger</b>
    There are two possible strategies for starting the Debugger in the ABAP Workbench:
    •     By setting breakpoints then running the program
    •     By running the program in debugging mode.
    <b>Setting Breakpoints</b>
    A breakpoint is a signal in a line of code that tells the ABAP runtime processor to interrupt the program at that line and start the ABAP Debugger. A distinction is made between static and dynamic breakpoints. For further information about the different types of breakpoints and how to use them, refer to Breakpoints.
    Running a Program in Debugging Mode
    You can start the Debugger without previously having set breakpoints. This is the best procedure to use when you want to test a program right from the beginning. It is also useful if you do not know the program very well and therefore are not sure where best to set breakpoints. You can start the Debugger as follows:
    From the Object Navigator     Select a report or transaction and program and choose Program &#61614;&#61472;Test &#61614;&#61472;Debugging.
    From the ABAP Editor     Choose Program &#61614; Execute &#61614; Debugging (or the Debugging pushbutton).
    From any screen     Choose System &#61614; Utilities &#61614; Debug ABAP.
    From any screen     Enter " /h " in the command field.
    <b>Checking System Programs for Errors</b>
    To check a program or program component that is part of the ABAP Workbench (for example, the Screen Painter), you must use the system Debugger. To start the system Debugger, choose System &#61614; Utilities &#61614; Debug system from any screen. To stop the system Debugger, choose Debugger &#61614; Debugging off.
    <b>
    Displaying Program Attributes</b>
    You can display the attributes Fixed point arithmetic, System program and Unicode checks active of the program that has just been executed by choosing Goto &#61614; Further Information &#61614; Program Attributes.
    <b>
    Display Modes in the Debugger</b>
    When you are debugging a program, there are various display modes that you can use. All of the display modes have the same structure. The top part of the screen displays an extract of the program source code. The bottom part displays the information specifically available in that display mode. There are also pushbuttons on the screen allowing you to switch to the most frequently-used display modes. 
    go to se38->give ur program name-.execute->give /h at command prompt->execute->now debugging will start->
    f5-used for line by line debugging
    f6-used for directly executing function modules or performs i.e. control won't go into that block.
    f7-run to cursor
    f8-direct executing.
    fileds: here we can check fild values.
    click fileds option and double click on the filed or type the filen name beside filed
    tables : here we can check the data in the internal table.
    click tables option and double click on the internal table.
    Break points:
    if you want to debug a particulr part you can use this.
    place the cursor at any perform click breakpoint or double click on that line.it will be set.
    if /h from report statement it will debug,so for debugging from particular point we will use break points.use f7 to traverse between multiple break points.
    Watch-points: In some cases we need to check the data populated in the internal table for eample if we want to check the data of internal table record belongs to 100th vendor we will create watch point for this goto->breakpoints->create watch points->give filed itab-lifnr->=->100.
    debugging procedure:
    Use '/H' in the command line and execute the report/program, so that it goes to debugging mode
    2. keep a hard coded break point in the code like BREAK-POINT and it stops there.
    3.From the program Menu, Keep the Soft Break-points and do the debugging.
    see the links
    Refer to this thread
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.sappro.com/downloads/Settings&SystemAreas.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/frameset.htm
    https://forums.sdn.sap.com/click.jspa?searchID=2673672&messageID=3187106
    https://forums.sdn.sap.com/click.jspa?searchID=2673672&messageID=850453
    https://forums.sdn.sap.com/click.jspa?searchID=2673672&messageID=1546485
    https://forums.sdn.sap.com/click.jspa?searchID=2673628&messageID=2048883
    http://www.saplinks.net/index.php?option=com_content&task=view&id=24&Itemid=34
    http://www.sap-img.com/abap/testing-and-debugging-abap-codes-functions.htm
    Reward points if useful

  • How to debug adapter module in PI 7.1

    Hello all,
    I am trying to figure out how to debug adapter module in PI 7.1.
    I guess runtime debugging ( switch AS java in debug mode and attach NWDS to the AS Java to debug as module is being executed) is not possible with adapter module. Please let me know if this is indeed possible and how to enable it.
    The only option is to send debug information to log file. So in the module code like:
    audit.addAuditLogEntry(key, status, message);
    location.debugT(SIGNATURE, message);
    I've read that for PI 7.0, you need to add log-configuration.xml to meta-inf. Is this still required for PI 7.1?
    My next question is how to read the log in audit log and in location. I've read that the audit log can be read in .../MessagingSystem/monitor/monitor.jsp, under which section of the page I can read the audit log? I can't see any of my log there.
    For log in location, I guess I need to go to NWA, can you please share the path (navigation) in NWA to see the location?
    Thanks
    Jayson

    > I guess runtime debugging ( switch AS java in debug mode and attach NWDS to the AS Java to debug as module is being executed) is not possible with adapter module. Please let me know if this is indeed possible and how to enable it.
    It is possible for adapter modules as well. I know this from our developers
    It should work like this:
    /people/christian.drumm/blog/2008/09/30/debugging-java-mappings-using-sap-netweaver-developer-studio
    > The only option is to send debug information to log file. So in the module code like:
    > audit.addAuditLogEntry(key, status, message);
    > location.debugT(SIGNATURE, message);
    > My next question is how to read the log in audit log and in location. I've read that the audit log can be read in .../MessagingSystem/monitor/monitor.jsp, under which section of the page I can read the audit log?
    In the RWB under Message Monitoring for Adapter, or try the shortcut
    http://server:port/mdt

  • How to call GOS(Generic Object service) attachment ( BMP file ) into SAP

    How to call GOS(Generic Object service) attachment ( BMP file ) into SAP script
    Example: MM02 Service object there attaching the bmp file the same file i need to call script based on the material number
    Please provide the procedure and  coding.
    Thanks in advance
    Raju

    Hi,
    The following link may be useful to u.
    help.sap.com/printdocu/.../BCSRVOBS.pdf

  • How to use stored procedures in DIAdem and Can the stored procedures be used to return values?

    Can anyone please tell me how to use stored procedures in diadem and to return values from it. Its really important, can you please answer it at the earliest.
    Thanks In advance
    spiya

    Hi Spria,
    I'm very sorry for the mix-up, I thought Allen was going to answer you back with the particulars that we found out. Check out the attached Word document and the below tidbits:
    The built-in DIAdem ODBC functions {SQL_...()} can only call stored functions, which return a scaler result {found then in SQL_Result(1,1)}. The syntax for this with an ORACLE db is
    "select function(parameters) from package"
    ...where package defaults to "dual" if you don't use your own package.
    There might be exceptions to that though, and the syntax will be different for other databases. Note that stored ORACLE procedures can NOT be called from the ODBC functions, instead you must use either ADO function calls in the DIA
    dem VBScript or the OO4O COM wrapper that ORACLE provides (this is described in further detail in the below Word document).
    Hope this helps,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Calling_ORACLE_Stored_Procedures_from_DIAdem.doc ‏28 KB

  • How to debug zrffous_c payment advice script program?

    Hi experts,
    Payment advice is printing through (ZRFFOUS_C) this program. I want to debug this program .I tried in this way.
    Put the break-point in the program and execute then enter the input data and execute then the following message is displayed.
    "A:FO:098 29.01.2009 PNB" after this stopped the program .How to debug this program? I want to find these values (REGUP-BELNR, REGUP-XBLNR) in the program .The location where these values selecting in the program?I tried but i didn't get.
    please give me the details or give me form name?
    please help me in this?

    Hi,
    Your procedure of debugging is correct.
    when you getting the error message , double click on the message on status bar and see wheather it is standard message or
    custome message.
    you are getting that error because of invalid data  so get  the valid data from respective  Functional consultant
    and try to debug again.
    You ll not get that error after giving valid data.
    Regards,
    Pravin

  • How to call this procedure in my report to print my procedure output

    Hi,
    i have a table named letter,it contains 2 columns named as letter_id and letter_content.
    select * from letter;
    letter_id letter_content
    103 Dear MFR
    103 This is in regards to the attached DM List
    103 Please Credit us after reviewing it.
    103 Thanks
    103 Regards
    103 xxxx
    108 Dear customer
    108 This is to inform that ur DM List is as follows
    108 Credit us according to the Dm after reviewing it.
    108 Thanks
    108 Regards
    108 xxxx
    now my requirement is,i need send a parameter as letter_id to a procedure or function in pl/sql in oracle,the output should be as follows:
    if we will pass parameter(letter_id) = 103 then it displays as follows:
    Dear MFR
    This is in regards to the attached DM List.Please Credit us after reviewing it.
    Thanks
    Regards,
    XXXXX.
    if we will pass parameter(letter_id) = 108 then it should displays as follows:
    Dear customer,
    This is to inform that ur DM List is as follows. Credit us according to the Dm after reviewing it.
    Thanks
    Regards,
    XXXXX.
    the procedure for my requirement is like below.now my problem is how to call this procedure in my report.so that if i will send a parameter as letter_id then it should get my report stated above.
    CREATE OR REPLACE PROCEDURE letter_text ( p_letter_id letter.letter_id%TYPE , p_letter_contents_out OUT SYS_REFCURSOR )
    IS
    BEGIN
    OPEN p_letter_contents_out
    FOR
    SELECT letter_content
    FROM letter
    WHERE letter_id = p_letter_id
    ORDER BY line_seq;
    END letter_text;
    which you might call with something like
    SQL> var results refcursor
    SQL> exec letter_text(103, :results)
    PL/SQL procedure successfully completed.
    SQL> print :results;
    CONTENT
    Dear MFR
    this is in regards to the attached DM List
    Please credit us after reviewing it
    thanks
    Regards
    EXP
    6 rows selected.
    so, the same out put i need to get it in a report.
    Thanks

    Thanks for ur suggestions.
    i have 2 select statements.1st query is the main query for the report.so i used it at the time of report created with datablock.
    now my 2nd query is
    select letter_content
    from ( select content_seq,
         content || case content_seq
    when 2 then
    ' ' || lead(content) over (partition by letter_id order by content_seq)
    end as letter_content
    from exp_letter_contents
         where letter_id = 103)
    where content_seq <> 3;
    i had taken 2parameters 1 for the main query and 2nd is for the above query(parameter is letter_id).
    now i have to write the above select statement in the report.
    so i had taken a field object in the report and then i had written this code in before report trigger.
    function letter_contentFormatTrigger return boolean is
    begin
    select letter_content
    from ( select content_seq,
                        content ||
                        case content_seq when 2 then
                             ' ' || lead(content) over (partition by letter_id order by content_seq)
                        end as letter_content
              from exp_letter_contents
              where letter_id = 103)
    where content_seq <> 3;
    return (letter_content);
    end;
    when i tried to compile it.i got an error as follows :
    error 103 at line6,column 5
    encountered the symbol "CASE" when expecting one of the following:
    (- + mod null <an identifier>
    <a double-quoted delimited-identifier><a bind variable> avg...etc
    so,where can i write this select statement.
    i am using oracle reports6i
    Message was edited by:
    user579585

  • How to call stored procedure from javascript? (about Google Suggest, AJAX)

    Hi I want to implement a text field so that it behaves like [Google Suggest|http://www.google.com/webhp?complete=1&hl=en] .
    I read this post .
    Now I've setup everything according to that document. But it just doesn't work. And I don't know why.
    I think problems may fall into the following three categories:
    1. Does the text field and the page invoke the proper javascript?
    2. Does the javascript successfully call the stored procedure?
    3. Can the stored procedure correctly return the formatted result?
    I am affirmative for 1 and 3, but I'm not sure about 2. Because I don't know how to tell if a stored procedure has been called? Is there a PL/SQL statement that I can query in SQL*Plus?
    Also, I would to know how to debug AJAX in APEX. It involves many things.
    Last, I used APEX 3.2 and Oracle XE. I cannot find either dads.conf or marvel.conf file. Is "/apex/" the virtual directory for APEX?
    Thanks a lot!

    Hello,
    I recently also ran into problems with this and I will post my solution here:
    1) if you need to pass parameters to your procedure, create it using "Flexible Parameter Passing". Then parse the parameters out of the array and put them in local variables inside your PL/SQL procedure.
    Example:
    CREATE OR REPLACE PROCEDURE MATTHIASH.incsearch(name_array IN owa.vc_arr,
         value_array IN owa.vc_arr) as
      l_List1 varchar2(4000);
      l_List2 varchar2(4000);
      l_query varchar2(255);
      l_separator varchar2(10) default '';
      qu varchar2(4000) default '';
      hl varchar2(4000) default '';
    BEGIN
      FOR i IN 1 .. name_array.COUNT 
      LOOP
           IF name_array(i) = 'qu' THEN
                qu := value_array(i);
           ELSIF name_array(i) = 'hl' THEN
                hl := value_array(i);
           END IF;
      END LOOP;
      l_query := qu||'%';
      FOR x IN (
      select object_name, object_id from user_objects
      where upper(object_name) like upper(l_query) and upper(object_type) = upper(hl) order by 1 asc)
      LOOP
        l_list1 := l_List1 || l_separator || '"' || x.object_name || '"';
        l_list2 := l_List2 || l_separator || '"' || x.object_id || '"';
        l_separator := ',';
      END LOOP;
      owa_util.mime_header('text/html', false);
      owa_util.http_header_close;
      --htp.p('sendRPCDone(frameElement, "'|| qu ||'", new Array(' || l_List1 || '), new Array(' || l_List2 || '), new Array(""));');
      htp.p('sendRPCDone(frameElement, "' || qu || '", new Array(' || l_List1 || '), new Array(' || l_List2 || '), new Array(""));');
    END;
    /2) grant EXECUTE rights to APEX_PUBLIC_USER (the user APEX uses to connect to the database) on the procedure
    grant execute on incsearch to apex_public_user;3) upload the ac.js file as static file to your application
    4) put the following javascript code in the HTML Header of your APEX page:
    <script src="#WORKSPACE_IMAGES#ac.js" type="text/javascript"></script>
    <script language="JavaScript" type="text/javascript">
    function iac()
    InstallAC(document.wwv_flow,document.getElementById('P1_X'),"","!MATTHIASH.incsearch","&P1_OBJECT_TYPE.");
    </script>In my example, P1_X is a text field and P1_OBJECT_TYPE is a dropdown list with all user object types.
    Good luck,
    Matthias Hoys

Maybe you are looking for

  • Analog to Digital Converter-- What's A Good Product For My System?

    What would be a good analog to digital converter for Final Cut Express HD 3.5 on a Mac OSX 10.4 system? I've used a Canopus on a MacPro with Final Cut Pro before and liked it, but wasn't sure what would be a good product for my macbook. I've looked a

  • Authentication Error from Room Console

    Hey, trying to add rooms and getting an "Authentication Error". I understand there is no limit to the amount of rooms that could  be made. Maybe its how we are naming them? room100 ? Also, is there any recommended way to 'stress test' the site. I'm g

  • One connection for each sql statment?

    Hi there! Can I use only one connection for several stataments or prepared statements? or Do I have to use 1 connection for each statement? After an insert, how can I know row id assigned by SQL Server (authonumeric)? Thanks a lot in advanced. LJ

  • Macbook Pro Won't Run Past 1GHz Without Its Battery

    Hello, I've been using a Macbook Pro 2.16GHz for half a year. I just realized that the computer will never get beyond 1GHz, both in Windows and Mac OS (I checked with Sisoft, CPU-Z, and CoreDuoTemp) when I remove the battery and run on AC Adapter. Ho

  • Weird Code Error

    tables: mara,eina. DATA: ze1edp19 like e1edp19 occurs 0 with header line. DATA: begin of zinteina occurs 0,       matnr like mara-matnr,       idnlf like eina-idnlf,       end of zintEINA. data: i_mara like mara occurs 0. CLEAR ZE1EDP19. clear zintei