Running procedure in forms

Hi, i have a procedure that populates a temporary table. After populating, i have several functions that run to compute values based on the records on the temporary table and then deletes the records upon form exit. Now, what i want to do is just run the procedure to populate the temporary table and then display the data on the table. But when i tried running just the procedure, nothing happens. I cant see the data on the table. How can i do this please? Thank you. Here is the query in my forms developer:
DECLARE
plid paramlist;
the_param varchar2(1600) := 'tmpdata';
it_id Item;
V_RI_BUSY CHAR(1);
BEGIN
if :block3.date_to is null then
message('no date to');
message('no date to');
Go_Item(':block3.date_to');
end if;
/* check if 'tmpdata' exists */
plid := get_parameter_list(the_param);
/* if it does exist, destroy it */
if not id_null(plid) then
destroy_parameter_list(plid);
end if;
/* create it fresh */
plid := create_parameter_list(the_param);
add_parameter(plid,'PARAMFORM', TEXT_PARAMETER, 'NO');
add_parameter(plid,'V_CUTOFF_FROM',TEXT_PARAMETER,TO_CHAR(:BLOCK3.DATE_FROM,'DD/MON/YYYY'));
add_parameter(plid,'V_CUTOFF_TO',TEXT_PARAMETER,TO_CHAR(:BLOCK3.DATE_TO,'DD/MON/YYYY'));
add_parameter(plid,'P_CLASSIFICATION',TEXT_PARAMETER,:BLOCK3.RADIO_GROUP_TRANS_SUBTRANS);
add_parameter(plid,'P_GRID',TEXT_PARAMETER,:BLOCK3.GRID);
add_parameter(plid,'P_REGION',TEXT_PARAMETER,:BLOCK3.REGION);
add_parameter(plid,'P_DISTRICT',TEXT_PARAMETER,:BLOCK3.DISTRICT);
add_parameter(plid,'P_BRANCH',TEXT_PARAMETER,:BLOCK3.BRANCH);
add_parameter(plid,'P_USER_NAME',TEXT_PARAMETER,:global.v_user_name);
add_parameter(plid,'P_POSITION',TEXT_PARAMETER,:global.v_position);
CALC_DATA_2010(:BLOCK3.DATE_FROM,
:BLOCK3.DATE_TO,
:BLOCK3.GRID,
:BLOCK3.REGION,
:BLOCK3.DISTRICT,
:BLOCK3.BRANCH);
run_product(REPORTS,'RPTSPM_NOI_DETAILS.rep',
SYNCHRONOUS,RUNTIME,
FILESYSTEM,
plid);
END;

Thanks. Actually, the original query was working fine - when some values were computed thru functions based from data on the temporary table. But when i removed the functions and just run the procedure, i could not display the records in the temp table. Here below is the working query (some parts were removed in the middle to shorten it):
DECLARE
     V_RI_BUSY CHAR(1);
BEGIN
          CALC_DATA_2010(:BLOCK3.DATE_FROM,
               :BLOCK3.DATE_TO,
               :BLOCK3.GRID,
               :BLOCK3.REGION,
               :BLOCK3.DISTRICT,
               :BLOCK3.BRANCH);
          IF :BLOCK3.DATE_FROM IS NOT NULL AND :BLOCK3.DATE_TO IS NOT NULL THEN
          --MESSAGE('Computing....');
          IF :RADIO_GROUP_TRANS_SUBTRANS = 'TS' THEN
               MESSAGE('TRANS-SUBTRANS: Finished....');
               :DO_VALID.TEXT_LINE_TYPE:= 'RELIABILITY INDICATORS (Trans-Subtrans)';
          ELSIF :RADIO_GROUP_TRANS_SUBTRANS = 'T' THEN
               MESSAGE('TRANS: Finished....');
               :DO_VALID.TEXT_LINE_TYPE:= 'RELIABILITY INDICATORS (Trans)';
          ELSE
               MESSAGE('SUBTRANS: Finished....');
               :DO_VALID.TEXT_LINE_TYPE:= 'RELIABILITY INDICATORS (Subtrans)';
          END IF;
          IF :BLOCK3.RADIO_GROUP_TRANS_SUBTRANS = 'T' THEN
               :DO_VALID.TEXT_LINE_TYPE:= :DO_VALID.TEXT_LINE_TYPE||'- 1 MIN. ';
          ELSE
               :DO_VALID.TEXT_LINE_TYPE:= :DO_VALID.TEXT_LINE_TYPE||'- 5 MINS. ';
          END IF;
-- COMPUTE RELIABILITY INDICATOR
-- GO_BLOCK('DO_VALID');
                    GO_ITEM('DO_VALID.INT_N001');
                    IF :RADIO_GROUP_TRANS_SUBTRANS = 'TS' THEN
                              CALC_INT(' ');
                         CALC_SAIDI_SAIFI_maifi_TS(' ');                                   CALC_SISI(' ');
                              CALC_TLF_TS;
                    ELSIF :RADIO_GROUP_TRANS_SUBTRANS = 'T' THEN
                              CALC_INT('T');
                              CALC_SAIDI_SAIFI_maifi('T');
                              CALC_SISI('T');
                    -- THIS IS SAME AS TRANS-SUBTRANS
                              CALC_TLF_TS;
                    ELSE
                         CALC_INT('S');
                    CALC_SAIDI_SAIFI_maifi('S');
                              CALC_SISI('S');
                              CALC_TLF_S;
                    END IF;
          ELSE
          MESSAGE('DATE RANGE MUST BE SPECIFIED.');
          IF      :BLOCK3.DATE_FROM IS NULL THEN
               GO_ITEM('BLOCK3.DATE_FROM');
          ELSE
          GO_ITEM('BLOCK3.DATE_TO');
          END IF;
          END IF;
END;
The above query works fine as it is. Procedure CALC_DATA_2010 populates the temp table then several functions (CALC_INT, CALC_SISI, etc.) runs to compute several values based on data from temp table. CALC_DATA_2010 query is shown below:
CREATE OR REPLACE PROCEDURE SPM_IS.CALC_DATA_2010(
date_from IN date,
date_to IN date,
text_GRID IN VARCHAR,
text_REGION in varchar,
text_DISTRICT in varchar,
text_branch in varchar
IS
CURSOR TRIP_CLASS IS
SELECT DISTINCT TRIP_CAUSED_BY, SCODE_TRIP_CAUSED_BY
FROM SPM_REL_IND_TMP
WHERE TRIP_CAUSED_BY IS NOT NULL;
CURSOR Cas IS
SELECT substr(customer_code,6,4) customer_code, demand, period
FROM SPM_ACTUAL_SALES
WHERE to_date(to_char(PERIOD,'MM/RRRR'),'MM/RRRR')
BETWEEN TO_DATE(TO_CHAR(Date_From,'MM/RRRR'),'MM/RRRR') AND
TO_DATE(TO_CHAR(Date_To,'MM/RRRR'),'MM/RRRR');
v_cuscode spm_daily_outs.substation_code%TYPE;
v_demand spm_actual_sales.demand%TYPE;
v_period spm_actual_sales.period%TYPE;
V_OUT_DATE spm_daily_outs.out_date%TYPE;
BEGIN
DELETE FROM SPM_REL_IND_TMP;
commit;
INSERT INTO spm_rel_ind_tmp(branch_code, ccode,circuit, scode, UE, outage_type,OUTAGE_CODE,OUTAGE_SUBCODE, V_OUT_DATE, V_DATE_IN,cload,
frequency, classification, trip_caused_by, TRIP_CAUSED_TLTX, scode_trip_caused_by, interruption_event,
remarks,DISCONNECT_SWITCH,DURATION)
(SELECT z.branch_code, z.circuit_code, z.circuit, z.substation_code,
(CASE WHEN ROUND(Z.UE,2) <> ROUND((Z.PEAK_DEMAND*Z.DURATION2*1000/60),2)
THEN
ROUND(Z.ue ,2)
ELSE
(CASE WHEN Z.DURATION = Z.DURATION2
THEN
ROUND(Z.ue ,2)
ELSE
(CASE WHEN Z.UE < (Z.PEAK_DEMAND*Z.DURATION*1000/60)
THEN
ROUND(Z.ue ,2)
ELSE
ROUND((Z.PEAK_DEMAND*Z.DURATION*1000/60),2)
END)
END)
END) UE,
z.outage_type, Z.OUTAGE_CODE,Z.OUTAGE_SUBCODE,z.V_OUT_DATE, z.V_DATE_IN,
z.connected_load, z.frequency, z.classification, z.trip_caused_by, z.TRIP_CAUSED_TLTX, z.scode_trip_caused_by, z.interruption_event,
z.remarks,z.DISCONNECT_SWITCH,z.duration
from
SELECT y.branch_code, y.circuit_code, y.circuit, y.substation_code, y.peak_demand, y.outage_type,Y.OUTAGE_CODE,Y.OUTAGE_SUBCODE, y.V_OUT_DATE, y.V_DATE_IN,
y.connected_load, y.frequency, y.classification, y.trip_caused_by, Y.TRIP_CAUSED_TLTX, y.scode_trip_caused_by, y.interruption_event,
y.remarks,y.DISCONNECT_SWITCH,
(CASE WHEN Y.DATE_PRIVATELY_OWNED IS NULL THEN
(CASE WHEN (Y.ESTIMATE IS NULL and Y.V_DATE_IN IS NOT NULL)
THEN
(DECODE(SIGN(Y.V_OUT_DATE - DATE_FROM),
-1,DECODE(SIGN(Y.V_DATE_IN - DATE_TO),
-1, Y.V_DATE_IN - DATE_FROM, -- DATE_TO > date_in & date_out < TO_DATE(DATE_FROM, 'DD/MON/YYYY')
+1, (DATE_TO - DATE_FROM)+1, -- Date_in > DATE_TO & date_out < TO_DATE(DATE_FROM, 'DD/MON/YYYY')
END) END)
*24*60 DURATION, ((V_DATE_IN -V_OUT_DATE)*24*60) DURATION2, UE
FROM
(SELECT B.BRANCH_CODE, b.circuit_code, B.DATE_PRIVATELY_OWNED,b.circuit, b.substation_code, b.peak_demand, b.outage_type,B.OUTAGE_CODE,B.OUTAGE_SUBCODE, b.V_OUT_DATE, b.V_DATE_IN,
b.connected_load, b.frequency, b.classification, b.trip_caused_by,B.TRIP_CAUSED_TLTX,b.scode_trip_caused_by,
b.interruption_event, b.remarks,b.DISCONNECT_SWITCH, b.estimate, b.ue
FROM (SELECT X.BRANCH_CODE, d.circuit_code, C.DATE_PRIVATELY_OWNED,d.circuit, d.substation_code, d.peak_demand, d.outage_type,
D.OUTAGE_CODE_NEW OUTAGE_CODE,D.OUTAGE_SUBCODE_NEW OUTAGE_SUBCODE, D.V_OUT_DATE, d.V_DATE_IN,
D.connected_load, d.frequency, c.classification, d.trip_caused_by, D.TRIP_CAUSED_TLTX,d.scode_trip_caused_by,
d.interruption_event, d.remarks,d.DISCONNECT_SWITCH, d.estimate, unserved_energy ue
FROM spm_daily_outs d, SPM_SUBSTATIONS X,
spm_circuits c
WHERE
X.SUBSTATION_CODE = D.SUBSTATION_CODE
AND (C.DATE_PRIVATELY_OWNED IS NULL OR (C.DATE_PRIVATELY_OWNED > TO_DATE(DATE_FROM, 'DD/MON/YYYY')
AND C.DATE_PRIVATELY_OWNED <= TO_DATE(DATE_TO, 'DD/MON/YYYY'))
and ((D.V_OUT_DATE >= (TO_DATE(TO_CHAR(Date_From,'DD-MON-RRRR'),'DD-MON-RRRR HH24:MI:SS')) and
D.V_OUT_DATE <= TO_DATE(TO_CHAR(Date_To ,'DD-MON-RRRR')||' 23:59:59','DD-MON-RRRR HH24:MI:SS')
OR
((D.V_OUT_DATE <= (TO_DATE(TO_CHAR(Date_From,'DD-MON-RRRR'),'DD-MON-RRRR HH24:MI:SS'))) AND
D.V_DATE_IN >= (TO_DATE(TO_CHAR(Date_From,'DD-MON-RRRR'),'DD-MON-RRRR HH24:MI:SS'))
) and (SUBSTR(d.circuit_code,5,1) = '4' OR SUBSTR(d.circuit_code,5,1) = '8')
AND d.OUTAGE_CODE_NEW NOT IN (SELECT OUTAGE_CODE FROM SPM_TL_OUTAGE_CLASS_2010)
AND (D.OUTAGE_SUBCODE_NEW NOT IN (SELECT OUTAGE_SUBCODE FROM SPM_TL_OUTAGE_SUB_2010)
OR LENGTH(LTRIM(RTRIM(D.OUTAGE_SUBCODE_new))) IS NULL
and d.circuit_code = c.circuit_code
and d.substation_code = c.substation_code
AND (SUBSTR(D.SUBSTATION_CODE, 1,1)=TEXT_GRID OR TEXT_GRID IS NULL)
AND (SUBSTR(D.SUBSTATION_CODE, 2,4)=TEXT_REGION OR TEXT_REGION IS NULL)
AND (SUBSTR(D.SUBSTATION_CODE, 6,4)=TEXT_DISTRICT OR TEXT_DISTRICT IS NULL)
AND (D.CIRCUIT_CODE IN (SELECT CIRCUIT_CODE FROM SPM_CIRCUITS WHERE BRANCH_CODE = TEXT_BRANCH)
OR TEXT_BRANCH IS NULL)
) b
) y
) z);
COMMIT;
DELETE FROM spm_tmp_actual_sales;
commit;
FOR dem_record IN Cas LOOP
EXIT WHEN Cas%NOTFOUND;
INSERT INTO spm_tmp_actual_sales(customer_code, demand, period)
VALUES(dem_record.customer_code,dem_record.demand,dem_record.period);
END LOOP;
FOR TRIP IN TRIP_CLASS LOOP
EXIT WHEN TRIP_CLASS%NOTFOUND;
UPDATE SPM_REL_IND_TMP
SET CLASSIFICATION_TRIP = (SELECT CLASSIFICATION
FROM SPM_CIRCUITS
WHERE RTRIM(TRIP.TRIP_CAUSED_BY) = RTRIM(CIRCUIT_CODE)
AND TRIP.SCODE_TRIP_CAUSED_BY = SUBSTATION_CODE)
WHERE RTRIM(TRIP_CAUSED_BY) = RTRIM(TRIP.TRIP_CAUSED_BY)
AND SCODE_TRIP_CAUSED_BY = TRIP.SCODE_TRIP_CAUSED_BY
AND TRIP_CAUSED_TLTX = 'TL';
UPDATE SPM_REL_IND_TMP
SET TRIP_BRANCH_CODE = (SELECT BRANCH_CODE
FROM SPM_CIRCUITS
WHERE RTRIM(TRIP.TRIP_CAUSED_BY) = RTRIM(CIRCUIT_CODE)
AND TRIP.SCODE_TRIP_CAUSED_BY = SUBSTATION_CODE)
WHERE RTRIM(TRIP_CAUSED_BY) = RTRIM(TRIP.TRIP_CAUSED_BY)
AND SCODE_TRIP_CAUSED_BY = TRIP.SCODE_TRIP_CAUSED_BY
AND TRIP_CAUSED_TLTX = 'TL'
UPDATE SPM_REL_IND_TMP
SET CLASSIFICATION_TRIP =
(SELECT distinct CLASSIFICATION
FROM SPM_TRANSFORMERS
WHERE RTRIM(TRIP.TRIP_CAUSED_BY) = RTRIM(TRANS_CODE)
AND TRIP.SCODE_TRIP_CAUSED_BY = SUBSTATION_CODE
AND CLASSIFICATION IN ( 'T', 'S')
WHERE RTRIM(TRIP_CAUSED_BY) = RTRIM(TRIP.TRIP_CAUSED_BY)
AND SCODE_TRIP_CAUSED_BY = TRIP.SCODE_TRIP_CAUSED_BY
AND TRIP_CAUSED_TLTX = 'TX';
UPDATE SPM_REL_IND_TMP
SET TRIP_BRANCH_CODE = (SELECT BRANCH_CODE
FROM SPM_SUBSTATIONS
WHERE SUBSTATION_CODE = TRIP.SCODE_TRIP_CAUSED_BY
WHERE CLASSIFICATION IN ( 'T', 'S')
AND RTRIM(TRIP_CAUSED_BY) = RTRIM(TRIP.TRIP_CAUSED_BY)
AND SCODE_TRIP_CAUSED_BY = TRIP.SCODE_TRIP_CAUSED_BY
AND TRIP_CAUSED_TLTX = 'TX';
END LOOP;
commit;
COMMIT;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
RAISE;
END;
However, when i changed my query so that i will just get the data from the temporary table instead i was not successful. here is my revised query:
DECLARE
V_RI_BUSY CHAR(1);
BEGIN
CALC_DATA_2010(:BLOCK3.DATE_FROM,
               :BLOCK3.DATE_TO,
               :BLOCK3.GRID,
               :BLOCK3.REGION,
               :BLOCK3.DISTRICT,
               :BLOCK3.BRANCH);
          IF :RADIO_GROUP_TRANS_SUBTRANS = 'TS' THEN                     MESSAGE('TRANS-SUBTRANS: Finished....');
               :DO_VALID.TEXT_LINE_TYPE:= 'RELIABILITY INDICATORS (Trans-Subtrans)';
          ELSIF :RADIO_GROUP_TRANS_SUBTRANS = 'T' THEN
          MESSAGE('TRANS: Finished....');
               :DO_VALID.TEXT_LINE_TYPE:= 'RELIABILITY INDICATORS (Trans)';
          ELSE
          MESSAGE('SUBTRANS: Finished....');
               :DO_VALID.TEXT_LINE_TYPE:= 'RELIABILITY INDICATORS (Subtrans)';
          END IF;
          IF :BLOCK3.RADIO_GROUP_TRANS_SUBTRANS = 'T' THEN
               :DO_VALID.TEXT_LINE_TYPE:= :DO_VALID.TEXT_LINE_TYPE||'- 1 MIN. ';
          ELSE
               :DO_VALID.TEXT_LINE_TYPE:= :DO_VALID.TEXT_LINE_TYPE||'- 5 MINS. ';
          END IF;
          IF :BLOCK3.DATE_FROM IS NULL THEN
               GO_ITEM('BLOCK3.DATE_FROM');
          ELSE
          GO_ITEM('BLOCK3.DATE_TO');
          END IF;
          END IF;
END;
I hope you will not be confused. Thanks again.

Similar Messages

  • How to run procedure in forms

    hi to all
    How to run the database procedure in Forms while the program Unit in forms is also having the same name of the database procedure.

    Please address this question to the Portal Applications Forum at http://forums.oracle.com/forums/forum.jsp?forum=7

  • Running reports from forms on the web

    On forms and reports 6i we used the following code to run reports from forms.
    We need to do the same on 9i forms and reports, we are running into problems.
    Any help will be appreciated.
    PROCEDURE web (inFileName VARCHAR2,
    inRecordGroup RECORDGROUP) IS
    outVirtualPath VARCHAR2(200) := '/forms90/f90servlet?p_url=/reports/rwservlet?'; outServer VARCHAR2(200) := 'server=rep_ora-app-4';
    outReport VARCHAR2(200) := 'report='||inFileName;
    outUserid VARCHAR2(200) :=
    'userid='||GET_APPLICATION_PROPERTY(USERNAME)||'/'||GET_APPLICATION_PROPERTY(PAS
    SWORD)||'@'||GET_APPLICATION_PROPERTY(CONNECT_STRING);
    outDesType VARCHAR2(200) := 'DESTYPE=CACHE';
    outDesFormat VARCHAR2(200) := 'DESFORMAT=PDF'; outUser VARCHAR2(2000);
    outCount INTEGER;
    error we are getting.
    FRM-42017:Module name must be specified.

    S Hatch (guest) wrote:
    : I'm thinking that you're going to have to install the Reports
    : cartridge, create an entry in the keymap with any parameters
    and
    : call your report via the url.
    : Dessislava Gantcheva (guest) wrote:
    : : How do I call a report from a form on the web?
    : : I have installed Windows NT Server 4.0 with SP 5, OAS4.0.7
    EE
    : : with patch 1, Developer 6.0 with patch 1. Developer server
    and
    : : forms server work fine in a non-cartridge implementation,
    but
    : I
    : : cannot run a report within a form. I just have no any info
    how
    : : to do this.
    I have entries in my keymap file and I can call my reports via
    the url, but I cannot run a report WITHIN a form. I mean to call
    a report by clicking on a button of a form on the web. The
    RUN_PRODUCT built-in does not work (at leas it seems like this)
    If any one has expiriense with it, please, give me a hint.
    Thanks
    null

  • Batch procedure in Forms 10g, calling rdf and send by mail

    Hi all,
    I need your advice regarding my task: i have a table with invoices of some clients. I have created a report in Oracle Reports 10g R2, so to have a pdf with all the data from this table.
    I have created a form in Forms 10g R2, displaying in a screen one field, where the user can choose the date of invoice. Then i will query by that date all my invoices in that table, and then i want to create a procedure in Forms, so that for every line in that table with the invoice date just chosen i will run HOST(rwrun ... all my parameters).
    My questions:
    1. I need to read some more about how to create a custom xml so to pass to my rwrun, and depending on the records fetched in my cursors in Forms 10g, i will pass a xml variable to my reports, so i will get the data from Forms 10g in the report created in Oracle Reports 10g. Is there any way that i can grep the errors? I need to create some insertions based on succes on failure, how can i accomplish this?
    2. Is the above described scenario way to complicated to loop throuh a cursor, create a pdf, and mail the pdf until the cursor is totally fetched? Do you recommend me a simpler way to accomplish this task?
    Thank you so much,
    Michael.

    Hello,
    I have a report with all my clients, with their email addresses in the same report. Each client as unique account number or invoice number.
    So i want to burst and distribute each invoice to the corresponding client:
    1. I have set REPEAT ON: INVOICE in oracle reports.
    2. From Oracle Reports, i click on Distribution list, and in the DESNAME i type email_address (which is the column from the table with the invoices).
    3. Then, File >> Distribute. Says: distribution completed succesfully, but nothing happens.
    Question:
    1. Where am i mistaking?
    2. Is there any log activity file that i could see what the application is doing, step by step?
    Thank you,
    Michael

  • How to call Pl/sql procedure from form ?

    Hi all,
    I need to call a procedure from form after the user has pressed the button to invoke the sql procedure, can anyone please advise me on how to do it ?
    Thanks.
    Lim

    Hi,
    Thanks for your reply.
    yes, I have include in when-button-pressed trigger as
    AIC_PROC_AR_CCID_UPD;
    Below is my procedure :-
    CREATE OR REPLACE PROCEDURE AIC_PROC_AR_CCID_UPD(errbuf out Varchar2,
              retcode out Number ) is
    VAR_BUF VARCHAR2(240);
    Cursor C1 is
    SELECT CONCATENATED_SEGMENTS ACCT,
    SEGMENT5 SEG5
    FROM AIC_GL_COA AGC
    WHERE AGC.CODE_COMBINATION_ID IS NULL;
    Rec1 C1%RowType;
    BEGIN
    FOR Rec1 IN C1 LOOP
         BEGIN
         UPDATE AIC_GL_COA A SET ( DESCRIPTION, CODE_COMBINATION_ID, SEGMENT5 )=
         ( SELECT FFVT.DESCRIPTION, GLA.CODE_COMBINATION_ID, GLA.SEGMENT5
         FROM GL_CODE_COMBINATIONS_KFV GLA,
         FND_FLEX_VALUES_TL FFVT,
         FND_FLEX_VALUES FFV
         WHERE GLA.CONCATENATED_SEGMENTS = REC1.ACCT
         AND FFV.FLEX_VALUE = REC1.SEG5
         AND FFV.FLEX_VALUE_ID = FFVT.FLEX_VALUE_ID
         AND FFV.FLEX_VALUE_SET_ID = 1002673 )
         WHERE A.SEGMENT5 = REC1.SEG5 ;
         EXCEPTION
         WHEN NO_DATA_FOUND THEN
         FND_FILE.PUT_LINE(FND_FILE.OUTPUT, 'NO RECORD UPDATE !!');     
         END;
    END LOOP;
    COMMIT;
    RETURN;
    END;
    However, when I try to compile it, error prompt :-
    Error 306 at line 1, column 1
    wrong number or types of arguments in call to 'AIC_PROC_AR_CCID_UPD'
    Error 0 at line 1, column 1
    statement ignored.
    By the way, my form 6i is running at client site and connection to procedure in unix server. Will this is ok ?
    Thanks
    Rgds
    Lim

  • Different session used when calling stored procedure from form

    after commiting data in a form to a table, a stored procedure is called that inserts the data written to the table into several other tables. Some columns in the original table are updated - no commit is issued in the procedure. On returning from the procedure the form is re-queried but the updated columns don't contain the updates. This seems to imply that the stored procedure is running as a different session to the one of the form.
    Is this the case? Can we make the form and the stored procedure use the same session so that the data is available in both without having to commit in the procedure?

    No. They should be within one session unless you explicitly open a new session.
    The reason why you dont see updates of the data block when you requery is probably the changes on the form never go to the back end. I think first you have to make sure data changes go to db table. You can do a commit_form before calling the stored procedure and open up another session (e.g. sqlplus) to check the data in the table changed or not.

  • Procedure Based Forms( a little !)

    Freinds!
    I have mada a form based on a package:
    ======================================
    Create or Replace Package vchrpro AS
    TYPE glrec is RECORD (company_code varchar2(4),
    voucher_type varchar2(4),
    voucher_seq varchar2(6),
    user_code varchar2(8)
    TYPE glcur is REF CURSOR RETURN glrec;
    PROCEDURE glquery(resultset IN OUT glcur,
    v_company_code in varchar2, v_voucher_type in varchar2);
    END vchrpro;
    show errors;
    Create or Replace Package Body vchrpro AS
    PROCEDURE glquery(resultset IN OUT glcur,
    v_company_code in varchar2, v_voucher_type in varchar2) IS
    BEGIN
    OPEN resultset FOR
    SELECT a.company_code, a.voucher_type, a.voucher_seq, a.user_code
    FROM gl_voucher a,gl_voucher_type b
    WHERE a.company_code=b.company_code and
    a.voucher_type=b.voucher_type and
    a.user_code=b.user_code and
    a.company_code=v_company_code and
    a.voucher_type=v_voucher_type
    ORDER BY a.voucher_type;
    CLOSE resultset;
    END glquery;
    END vchrpro;
    show errors
    ========================================
    the package is succesfully created and also
    the form.But the prob. is that i am not sure
    about the "Query Data Source Arguments" of
    a form's block property. i.e what i will
    give "Type Name" and "Value" to my procedure's parameter "resultset" (i have given nothing)AND when i run the form and
    execute the query error says:
    FRM-40505 Oracle error: unable to perform
    query.
    Kindly help me it is very important & urgent!
    also let me know if i have conveyed properly.
    Many thaks!
    null

    Take a look at
    "Forms and Reports Feature/Benefit Demos"
    that you can also get from: http://technet.oracle.com/sample_code/products/forms/content.html
    There is a sample of a procedure based form there.

  • Error while running procedure for refreshing AWS

    Hello There,
    I am using a procedure which consists the script of refreshing the analytic workspace. I call this procedure from Business objects data services for automatic refresh.
    It used to work perfectly until the recent changes implemented.
    The issue is, when I run the procedure the cube refreshes successfully. When the same procedure is called from BODS, it shows an error.
    Error is :: XOQ-01601: error while loading data for cube dimension "BI_PETRA_DWH.ACTIVITY_TIME"  into analytic workspace
    Underlying DB error is : ORA-01858: a non -numeric character was found where a numeric was expected.
    I dont get this error if I run procedure directly in SQL developer.
    I verified attribues of dimension, there is only one numeric attribute and it is mapped to only numeric columns of view.
    Can you please help me fixing this issue?
    Thanks in advance.

    Hello There,
    I am using a procedure which consists the script of refreshing the analytic workspace. I call this procedure from Business objects data services for automatic refresh.
    It used to work perfectly until the recent changes implemented.
    The issue is, when I run the procedure the cube refreshes successfully. When the same procedure is called from BODS, it shows an error.
    Error is :: XOQ-01601: error while loading data for cube dimension "BI_PETRA_DWH.ACTIVITY_TIME"  into analytic workspace
    Underlying DB error is : ORA-01858: a non -numeric character was found where a numeric was expected.
    I dont get this error if I run procedure directly in SQL developer.
    I verified attribues of dimension, there is only one numeric attribute and it is mapped to only numeric columns of view.
    Can you please help me fixing this issue?
    Thanks in advance.

  • Running report from forms

    hi,
    I am having problems in running report from form.
    I am using oracle 9i on windows 2000 server and no 9iAS at the moment. On client side, i have windows xp and 9iDS installed. I want to run report from forms in 9iDS testing environment.
    my forms are running ok but now i need to run report. so what i have done is that i have created a report object in form and following are enteries present in it at the moment.
    Name REPORT7
    FileName D:\Projects\IBMR\forms\soil_water_quality_data.rdf
    Execution Mode Batch
    Communication Mode Synchronous
    Destination Type Cache
    Report Server 9irep
    and in when_button_pressed trigger
    DECLARE
    Report_Id REPORT_OBJECT;
    Report_Job_Id VARCHAR2(20);
    Report_Status VARCHAR2(80);
    Report_Svr VARCHAR2(20);
    BEGIN
    Report_Id := FIND_REPORT_OBJECT('REPORT7');
    Report_Svr := '9irep';
    SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_EXECUTION_MODE, BATCH);
    SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_FILENAME, '\projects\ibmr\forms\soil_water_quality_data.rdf');
    SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_COMM_MODE, SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_DESFORMAT,'PDF');
    SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_OTHER, 'paramform=no');
    Report_Job_Id := RUN_REPORT_OBJECT(Report_Id);
    Report_Status := REPORT_OBJECT_STATUS(Report_Job_Id);
    WHILE Report_Status IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
    Report_Status := REPORT_OBJECT_STATUS(Report_Job_Id);
    END LOOP;
    IF Report_Status = 'FINISHED' then
    WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(Report_job_id,instr(Report_Job_Id,'_',-1)+1)||'?'||'server=9irep','_blank');
    else
         message ('report server failed with error message '||report_status);
    END IF;
    END;
    i have installed report server with following command
    rwserver -install 9irep
    i have changed entry in rwservlet.properties like
    SINGLESIGNON=NO and i have removed the following entire block of 9irep.conf, which i have read from some documentation
    <!--security id="rwSec" class="oracle.reports.server.RWSecurity">
    <property name="securityUserid" value="%PORTAL_DB_USERNAME%/%PORTAL_DB_PASSWORD%@%PORTAL_DB_TNSNAME%" confidential="yes" encrypted="no"/>
    </security-->
    i get the following error message when i run my form
    frm-41214 Unable to run report
    and then next message is
    frm-41217 unable to get report job status
    i debugged the report id and it is
    9irep_0
    returned by Report_Job_Id := RUN_REPORT_OBJECT(Report_Id);
    When I checked the Report Queue Manager
    it is showing status like
    (9irep)Terminated with error
    and detail it shows is
    Unable to connect to the specified database.
    Now I am wondering what to do next.
    any suggestions???????

    Hello,
    From your description, it seems like the report is faling due to a database authentication problem. When you run your report from Forms, Forms internally passes the its database connection information to Reports automatically. So ensure that you are connected to a valid database in Forms, before the report is called.
    Please verify whether a simple report which does not require a database connection, for example, a report containing only a boilerplate text object, is running correctly. Also, in the trigger code that you have specified, you should add the following:
    SET_REPORT_OBJECT_PROPERTY(Report_Id, REPORT_DESTYPE, CACHE);
    so that the report output gets generated to the server cache, and can be retrieved using rwservlet/getjobid.
    Thanks,
    The Oracle Reports Team.

  • FRM-92101 error while running report from form

    HI All,
    I am getting the form error FRM-92101 while running report from form menu.My code is given below:
    DECLARE
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(20);
    BEGIN
    repid := FIND_REPORT_OBJECT('REPORT47');
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    WEB.SHOW_DOCUMENT('http://192.168.0.21:8889/reports/rwservlet/getjobid'||
    substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90','_blank');
    ELSE
    message('Error when running report');
    END IF;
    Clear_message;
    END;
    Clear_message;
    --Arif                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    hi Arif
    Please see this note on MOS/Metalink for some common causes of this error:
    Known Causes of FRM-92101 Error In Forms [ID 604633.1]
    thanks,
    AMN

  • Report is taking too much time when running from parameter form

    Dear All
    I have developed report in oracle reports bulider 10g. while running it from report builder data is coming very fast.
    But, If it is running from parameter form it is taking too much time to format report in PDF.
    Please suggest any configuration or setting if anybody is having Idea.
    Thanks

    Hi,
    The first thing to check is whether the query is running to completion in TOAD. By default, TOAD just selects the first 50 rows, where as Discoverer must return all the rows before displaying results if a crosstab report is used.
    Secondly, check that the queries and the explain plans are the same in Discoverer and Toad. Although, Discoverer shows the SQL in the SQL inspector this isn't necessarily the SQL actually sent to the database. Use TOAD to interogate the Discoverer session to determine the actual SQL and compare this SQL and explain plan to SQL you ran in TOAD.
    Thirdly, check that the session context is the same in both cases. So check that any custom contexts and the USER_ENV context is the same, and if any security packages or VPD policies are used in the SQL that these have been initialised the same.
    If you still cannot determine the difference then trace both sessions.
    Rod West

  • How to run the parameter form example report :pform_report.jsp

    how to run the parameter form example report : pform_report.jsp ?
    I got these error message:
    Reports Error Page
    Sat Oct 18 11:58:24 CST 2003
    javax.servlet.jsp.JspException: rwlib-1: REP-6106: (, 4 L, XML 1h��/�� ' PI with the name 'xml' can occur only in the beginning of the document.'.
    javax.servlet.jsp.JspException: rwlib-1: REP-6106: (, 4 L, XML 1h��/��
    PI with the name 'xml' can occur only in the beginning of the document.'.
         at oracle.reports.jsp.ObjectsTag.doEndTag(ObjectsTag.java:180)
         at examples.tools._pform__report._jspService(_pform__report.java:79)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:302)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:66)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:539)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:285)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:771)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:152)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:796)
         at java.lang.Thread.run(Thread.java:484)

    repost !
    please help!

  • Fax remmitance issue during teh Payemnt run procedure

    Hi Gurus ,
    There is a scenario : whenever a payment run is executed through F110 , the payments information of vendors or customers are sent to BANK .
    now there is an issue that fax remmitance information has not beeen recievd by the same individual
    How do we check the settings of automatic payment program :in order to check teh fax remmitance details being
    sent to Vendors while payment ?
    Does this kind of sending information deals with a configured workflow in system ?
    Could someone guide me in : Where do we find the configuration settings for Automatic payemnt run procedure?
    Thanks
    KylieTisha

    Hi Gurus ,
    this is a question about Payemnt Run :-
    While conducting the payemnt run a variant is being used , which populates paying company code , company code posting date etc parameters and the printer details also where the payment remittances needs to be sent .
    Payment remittances will include : Fax detailsof vendors etc.
    Fax remittances : vendor fax details as entered in FK03 are supposed to be received at the printer .
    Now could anybody guide me in the information :-
    Fax details as entered in the Vendor Master data will be utilized whileprinting this remittances or do we need toalso mention
    the Standard Communication method : FAX ? Is there a relation between the fields in XK03 Standard Communication method and the Tel Details/Fax Details/Email Detials being entered for the Vendor ?
    now along with vendor fax details do we need to mention the standard communication method as ' FAX ' also in XK03
    so that Payment Run can send only the fax details .
    Any information is appreciable
    Please help.
    Thanks
    Kylietisha
    Edited by: kylietisha on Jul 1, 2010 9:55 PM

  • I want to run report from FORM

    I want to run report from FORM. The report will save in PDF format then OPEN automatically in PDF
    Every PDF file should have a unique file name.
    I am using Form 6i and Reports 6i

    DECLARE
    vParamList PARAMLIST;
    BEGIN
    vParamList:=GET_PARAMETER_LIST('MyRep');
    IF NOT ID_NULL(vParamList) THEN
    DESTROY_PARAMETER_LIST(vParamList);
    END IF;
    vParamList:=CREATE_PARAMETER_LIST('MyRep');
    SET_REPORT_OBJECT_PROPERTY('report_path\emp_rep_def',REPORT_DESFORMAT,'PDF');
    RUN_PRODUCT(REPORTS,'report_path\emp_rep_def',ASYNCHRONOUS,RUNTIME,FILESYSTEM,vParamList,NULL);
    END;

  • Run report from form in 9i

    I cannot seem to get the 9ias Report Server to return the PDF file to my
    browser when my Form runs a report form its menu. If I just send the server
    the request
    (http://mydomain:7777/reports/rwservlet?report=d:\path\report.rdf&userid=me/
    pw@servertnsname&destype=cache&desformat=PDF) in the browser, it works fine;
    but when I use the RUN_REPORT_OBJECT built_in from a Form (menu) to do (I
    thought) the same thing, resulting PDF does not return to the browser.
    Ideally, it should spawn a new browser window containing the displayed PDF.
    The report properties in the calling form are FILENAME (d:\path\report.rdf),
    BATCH, ASYNCHRONOUS, CACHE, REP_SERV_NAME, and USER_ID=me/pw@servertnsname
    in Other Parameters. I know the report is executing properly because I have
    examined the report server queue, and the completed job is listed.
    How to I tell it to shoot the PDF back over the web to my browser?
    This process was similar in the old client/server days when the destination
    was PREVIEW, and RUNFORM took care of the data, but for the moment I am
    baffled.

    If calling your report works as you like in a browser, then use WEB.SHOW_DOCUMENT to call out to that URL.
    Regards,
    Robin Zimmermann
    Forms Product Management

Maybe you are looking for