Problem in Program unit

Hi all experts,
PROCEDURE fun_a(cond varchar2) IS
declare
cursor m_cur1 is
select name, id from member where sex = 'F';
cursor m_cur2 is
select name,id from member;
BEGIN
if cond = 'F' then
     m_cur1 := m_cur1;
else
     m_cur1 := m_cur2;
end if;
for mc in m_cur1
loop
-- Do something. many lines
end loop;
END;
it appears error during compiling in assign cursor to cursor,
anyone have ideas how to solve this problem.
This program has to base on the cond to use the correct sql.
I cant duplicate the for loop coz it has many lines.
Thanks

Or maybe use a REF Cursor:
PROCEDURE fun_a(cond varchar2) IS
  Type     Ref_cursor_type is REF CURSOR;
  m_cur    Ref_cursor_type;
  v_sql    Varchar2(4000);
  cursor mc_row is
    select name,id from member;
  mc mc_row%rowtype;
BEGIN
  if cond = 'F' then
    v_sql := 'select name,id from member where sex = ''F''';
  else
    v_sql := 'select name,id from member';
  end if;
  Open m_cur for v_sql;
  Loop
    Fetch m_cur into mc;
    Exit when m_cur%NotFound;
    -- Do something, many lines
  End loop;
  Close m_cur;
END;

Similar Messages

  • Problem calling program unit function in Forms 6i

    Hi,
    I'm new to programming with Oracle Forms. I have a question that I cannot seem to figure out. In Forms 6i, I have created a program unit function that compiles correctly. The trouble I'm having is calling it and displaying the function's contents into a non-database display item I created. When I run my app, the display item it blank while my other fields populate.
    I first tried to call it in a POST-QUERY trigger but I get an error stating "function cannot be called in SQL." Can you not call a function in a form's trigger? If so, what would be the correct syntax?
    Then I tried to call it in the non-database item's Calculation => Formula (property) by just stating the function_name(parameter). This appears to compile fine too, but still no display at runtime.
    What would be the best way to reference my function to display its contents properly? Does anyone have any examples? Any help would be greatly appreciated. Thank you.

    First, get rid of the
    EXCEPTION WHEN NO_DATA_FOUND
    in your function. Summary queries never raise no_data_found; They just return null.
    Your ":history.consecutive_years := NumberOfYears(:student.id);" is the proper way to call the function. That is what I was trying to tell you with the example: ':Myblock.Item_x := function_name(some_parm);' code
    If your post-query trigger only executes the function, then I think your problem is somewhere else:
    'FRM-40735 POST-QUERY trigger raised unhandled exception' looks like a problem elsewhere.
    Don't know of a good website. Just keep asking here -- somebody is bound to pop in and help you out.
    One more thing: drop this into your form-level on-error trigger. It often helps to find problems:
    -- On-error form-level trigger                                       --*
    DECLARE
      Err_Code NUMBER(5)     := ERROR_CODE;
      Err_Text VARCHAR2(100) := ERROR_TEXT;
      MSG      VARCHAR2(150)
              := SUBSTR('   '||ERROR_TYPE||'-'||TO_CHAR(Err_Code)||': '
                                         ||Err_Text,1,150);
      DBMS_TXT VARCHAR2(500);
    BEGIN
      IF Err_Code IN (40401,40405,     --No changes to save/apply
                      40100,40352) THEN --at first/last record
        MESSAGE(MSG,NO_ACKNOWLEDGE); -- Don't raise Form_Trigger_Failure
      ELSE -- all other messages
        -- check database error message --
        DBMS_TXT := SUBSTR(DBMS_ERROR_TEXT,1,500);
        if  DBMS_TXT is not null
        and substr(DBMS_TXT,5,5)
          not in('00000',
                 '01403') then --1403=no data found
          -- show entire msg, add new_line chars.
          DBMS_TXT := replace(DBMS_TXT,'ORA-',chr(10)||'ORA-');
          DBMS_TXT := replace(DBMS_TXT,' '||chr(10), chr(10));
          -- show MSG and DBMS_TXT both as an alert --
          --PLL_ALERT( ltrim(MSG) || DBMS_TXT );
          Message(ltrim(MSG) || DBMS_TXT );
          Message(' ',no_acknowledge);
          Raise Form_Trigger_Failure;
        else
          Message(MSG);
          Message(' ',no_acknowledge);
          Raise Form_Trigger_Failure;
        End if;
      END IF;
    END; -- end of on-error trigger

  • Error : ORA-06508: PL/SQL: could not find program unit being called

    Hi
    I got surprise issue while testing my Oracle code . Let me explain first the environment detail . Our appliaction built on
    Java/J2EE(Weblogic) and backend is Oracle 11g re2 . While calling from java it call thru different user which have been provide
    synonym and exectue option for corresponding procdure ,
    I created on package EXTRACT_CUSTOMER_INFO_PK which will exract data to text file using UTL_FILE ( direcory , UTL_FILE grant is provided to DB user).
    Now this package has been called from rp_execute_procedure_pr -- Here I is the code
    CREATE OR REPLACE PROCEDURE RP_EXECUTE_PROCEDURE_PR
    i_atlas_job_schedule_fk IN atlas_job_schedule.atlas_job_schedule_pk%TYPE,
    i_job_id IN atlas_job.job_id%TYPE,
    i_parm_value IN atlas_job_schedule.parm_value%TYPE,
    o_status_code OUT NUMBER,
    o_status_mesg OUT VARCHAR2
    IS
    -------Other old code which is not relevent for this issue ----
    --------Other old code which is not relevent for this issue ----
    ----Below code I added ----
    ELSIF l_job_id = 'CUST_EXTRACT' THEN
    EXTRACT_CUSTOMER_INFO_PK.customer_report ( i_parm_value ,
                   o_status_code,
    o_status_mesg ) ;
    -- o_status_code := -99999999;
    --o_status_mesg := 'PARTHA PARTHA PARTHAcess terminated!';
    ELSE
    o_status_code := -20300;
    o_status_mesg := 'Job Id : ' || l_job_id || ' NOT found. Process terminated!';
    END IF;
    update_log_auto
    ajs_rec.atlas_job_schedule_pk ,
    'Processing End Time (GMT): '
    EXCEPTION
    WHEN eProcError THEN
    o_status_code := SQLCODE;
    o_status_mesg := SUBSTR(vMsg ||'-'||SQLERRM, 1, 200);
    WHEN OTHERS THEN
    o_status_code := -20300;
    o_status_mesg := SUBSTR(SQLERRM, 1, 200);
    update_log_auto
    ajs_rec.atlas_job_schedule_pk ,
    'Error : '||SQLERRM||' '
    update_log_auto
    ajs_rec.atlas_job_schedule_pk,
    'Processing End Time (GMT): '
    END RP_EXECUTE_PROCEDURE_PR;
    Now It compiled sucesfully . And while I did SIT then RP_EXECUTE_PROCEDURE_PR run fine and extracted txt file . But while I called it from Java procedure It gives us error like
    Error : ORA-06508: PL/SQL: could not find program unit being called 02-AUG-2012 13:16:51.
    As I told RP_EXECUTE_PROCEDURE_PR old proc and used by other proc , So I first suspect issue is newly added code or may be some grant or synonym ( Although it should not be )
    so I created public synony amd gave execute grant to my pkg to public .
    But it repeat same error .
    I did lot of R&D on my pkg but nothing happen . Finally I remane my new pkg RP_EXTRACT_CUSTOMER_INFO_PK and it works fine
    I need to know what is the RCA for it . I donot think any dependecy issue as renaming pkg is working fine .
    NB my DB user is iATLAS and Javauser is SUDEEP
    Thanks in Advance
    Debashis Mallick

    First of all If i run the main procedure in like below in my Schema it is working fine
    begin
    -- Call the procedure
    rp_execute_procedure_pr(i_atlas_job_schedule_fk => :i_atlas_job_schedule_fk,
    i_job_id => :i_job_id,
    i_parm_value => :i_parm_value,
    o_status_code => :o_status_code,
    o_status_mesg => :o_status_mesg);
    end;
    So thre is no question of parameter .... or Invalid state etc . If it is parameter or Invalid state issue it will give other error.
    Here problem is not syntax issue .
    let me give u more detail regards this issue
    1.. All objects corresponding to procedure all Valid
    2.. If I test on the proc on my schema like above code . It works fine
    3.rp_execute_procedure_pr is a old procudere which called for differner report generartion based on parameter passing . Also as extract_customer_info_pk called with in rp_execute_procedure_pr So there is no question of synonym or privilage issue for new procedure.
    4. Suprising thing is if I rename and recreate package like extract_customer_info_pk _1 or rp_extract_customer_info_pk . Which are exactly same as extract_customer_info_pk and replace those new one with extract_customer_info_pk then it work fine in my java application
    I think I make it clear the issue
    Edited by: debashisora on Aug 3, 2012 5:31 AM
    Edited by: debashisora on Aug 3, 2012 5:40 AM

  • Error while compiling program unit

    Hi All,
    I am working on oracle forms 10g.
    I am getting an error "wrong no or types of arguments in call to 'COUNTCDRSTODELETE' ", while trying to compile my program unit.
    The extract of my program unit is as written below:
    PROCEDURE CALL_PCK_BACKOUT IS
    -- type bmpf_id_arr is varray(100) of bmp_files.bmpf_id%type;
    type bmpf_id_arr is varray(100) of integer;
    id_arr bmpf_id_arr := bmpf_id_arr();
    file_cnt number := 0;
    BEGIN
    GO_BLOCK('B_FILE');
    first_record;
    LOOP
         --     EXIT WHEN :SYSTEM.RECORD_STATUS='NEW';
              IF UPPER(:B_FILE.FILE_ON_OFF_IND) = 'Y' THEN
         FOR I IN ( SELECT BMPF_ID FROM BMP_FILES
                             WHERE BMPF_FILENAME = :B_FILE.BMPF_FILENAME
                             AND BMPF_PROCESSING_STATE = 'P'
                             ORDER BY BMPF_ID ASC)
         LOOP
              if file_cnt < id_arr.limit then
                   id_arr.extend;
                   id_arr(id_arr.last) := i.bmpf_id;                
                   INSERT INTO bmp_files_to_backout (file_id, job_id) values (i.bmpf_id,pkg_constants.gt_bat_code_bckout_cdr);
                   file_cnt := file_cnt + 1;
              else
                   msg_alert('You can select maximum 100 files at a time','E',FALSE);
                   RAISE FORM_TRIGGER_FAILURE;     
              end if;                                         
         END LOOP;
         END IF;
         EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';
         NEXT_RECORD;
    END LOOP;
    if file_cnt = 0 then
         msg_alert('Please select at least one file in order to initiate the backout','E', FALSE);
         go_item('b_ctrl.file_name');
         RAISE FORM_TRIGGER_FAILURE;     
    end if;
    if file_cnt > 0 then
    commit;
    end if;
    -- check if the backout request has been accepted or not
    if pck_backout.CountCDRStodelete(id_arr,file_cnt) = 0 and pck_backout.AreallCDRSOpen(id_arr,file_cnt) = 0 then
         msg_alert('Backout request can be scheduled for the selected input','E',FALSE);
    elsif     pck_backout.CountCDRStodelete(id_arr,file_cnt) != 0 and pck_backout.AreallCDRSOpen(id_arr,file_cnt) != 0 then
         msg_alert('Backout request has been rejected due to maximum number of cdrs exceeded and not all cdrs belonging to open invoices','E',FALSE);
         RAISE FORM_TRIGGER_FAILURE;
    elsif     pck_backout.CountCDRStodelete(id_arr,file_cnt) != 0 then
    msg_alert('Backout request has been rejected due to maximum number of cdrs exceeded','E',FALSE);
    RAISE FORM_TRIGGER_FAILURE;
    elsif pck_backout.AreallCDRSOpen(id_arr,file_cnt) != 0 then
         msg_alert('Backout request has been rejected due to not all cdrs belonging to open invoices','E',FALSE);
         RAISE FORM_TRIGGER_FAILURE;
    end if;
    END;
    pck_backout is a stored database package. The definition of two functions used above is as given below:
    FUNCTION countcdrstodelete (
    p_bmpf_id_array IN pkarray,
    p_batch_size IN NUMBER
    RETURN NUMBER;
    FUNCTION areallcdrsopen (p_bmpf_id_array IN pkarray, p_batch_size IN NUMBER)
    RETURN NUMBER;
    where pkarray is defined as :
    TYPE pkarray IS VARRAY (100) OF INTEGER;
    Can anyone please tell me why i am getting wronf type or no of arguments error while calling the databse functions.
    I guess, it has to do with the varray field. Can you please tell me if i am using any wrong syntax??
    I request all the forms gurus to please help me with this.

    Hi Fabrio,
    I solved my problem.
    I'd to actually define pkarray as sql type rather than PL/SQL type.
    It's because oracle forms wasn't able to bind the varray defined locally in program unit with the varray defined in stored PL/SQL function.
    Once i created pkarray as sql type and removed the declaration of varray in program unit and PL/SQL code, it worked.
    Thanks for your reply though.
    Regards,
    Navnit

  • How to reference a user parameter in program unit

    I tried to define a user parameter in Oracle Report 6i and I could reference it (&p_where_clause) in the main query but I failed to reference it in one of the program units. Here is the logic:
    function CF_OTHER_COURSESFormula return Char is
    cnt           number;
    priority     number;
    class_code     varchar2(8);
    oc           varchar2(100) := null;
    cursor oc_cur is
    select class_code, branch_priority
    from nominations n, employments e
    where n.hkic_no = e.hkic_no
    and e.staff_status_code = 'EMP'
    and &p_where_clause --> contain "n.course_code in ('A','B','C')"
    and n.hkic_no = :hkic_no
    and n.class_code != :class_code;
    begin
    cnt := 1;
    open oc_cur;
    loop
    fetch oc_cur into class_code, priority;
    if oc_cur%notfound then
         exit;
    end if;
    if cnt = 1 then
    oc := oc||class_code||'('||priority||')';
    else
    oc := oc||', '||class_code||'('||priority||')';
    end if;
    cnt := cnt + 1;
    end loop;
    close oc_cur;
    return oc;
    exception
    when no_data_found then      
    return '';
    end;
    Does anyone tell me how to reference it in program unit? Does Oracle Reports 6i support this operation?

    There hasn't been any changes to the way lexicals and bind variables work in Reports between 2.5 and 6i. There are different versions of PL/SQL and you might be hitting some problem here.
    In your case, you shouldn't be using the query lexical "&p_where_clause" just the PL/SQL bind variable syntax ":p_where_clause". Since you're creating a PL/SQL cursor, you should probably use dynamic sql creation with a concatenation of the where clause to build up the SQL for the cursor. Check out the PL/SQL documentation for this.

  • Pd0-ppu017 program unit source must define a  subprogram body  or package

    Hi
    Iam new to oracle l and trying to teach myself
    my problem is when I compile any function in program units of forms ,
    the following error message obtained:-
    pd0-ppu017 program unit source must define a subprogram body or package.
    for example this ready function that I have just copied ,pasted
    CREATE OR REPLACE FUNCTION TestTrig_body() RETURNS TRIGGER AS $$
    DECLARE
    v_TempRec temp_table%ROWTYPE;
    BEGIN
         INSERT INTO report_table(num_col, old_val, new_val)
              VALUES (NEW.num_col, OLD.char_col, NEW.char_col);
         RETURN NEW;
    END;
    what is the reason please?
    Windows OS
    Oracle 10g database
    oracle 6i developer
    regards

    VANPERSIE,
    It looks like you are mixing sytax. Some of the Syntax used in a Database trigger (such as Before Insert, After Insert, etc) is specific to database triggers. Referring to :NEW and :OLD are specific to database triggers and can't be used as you are using them, unless you have data blocks names NEW and OLD. Also, when you refer to a item in a block, you must prefix the block or item name with the colon ":". Also, as aweiden points out, you define your return data type as "TRIGGER". The return type of a Function must be a valid Oracle data type. Therefore, your function should return a BOOLEAN, NUMBER, VARCHAR, or even a Ref Cursor, just to name a few. From the looks of your code, your function would simply return a value to indicate that the INSERT was successful. Therefore, you could rewrite your function something like:
    CREATE OR REPLACE FUNCTION TESTTRIG_BODY() RETURNS BOOLEAN AS
    BEGIN
       /* This example assumes you have data blocks in your form called:  NEW_BLOCK and OLD_BLOCK. */
       INSERT INTO REPORT_TABLE
          (NUM_COL, OLD_VAL, NEW_VAL)
       VALUES
          (:NEW_BLOCK.NUM_COL, :OLD_BLOCK.CHAR_COL, :NEW_BLOCK.CHAR_COL);
       RETURN TRUE;
    EXCEPTION
       WHEN OTHERS THEN
          RETURN FALSE;
    END;Also, is there a particular reason you are manually INSERTing a record versus letting Oracle Forms handle this for you?
    Hope this helps.
    Craig...
    -- If my response or the response of another is helpful or answers your question please mark the response accordingly. Thanks!

  • Generate txt output using a program unit in web report (OAS 10g)

    Hi Everyone.
    I have a c/s report (6i) which generates a txt file in a program unit using TEXT_IO package. I need to move this report to web (Reports 10g) and publishing it in OAS 10g. I've done that (without the text file generation), I can see the report on the browser in PDF Format and works fine... but, I still have a problem... when I use Text_io package, the c/s version of the report in 10g runs an generates the output.txt file but when I move it to web I got an error in the before report trigger (in which I invoke the program unit sp_generate_txt)
    I looked around for a solution and I just find the usage of webutil package, but as you know, webutil package is only usable in Forms.
    Any Ideas on how can I solve this problem?

    Hello,
    TEXT_IO can be used in Reports deployed on the web.
    The difference with Client /Server is the fact that the file create by TEXT_IO will be created on the "Middle Tier Server" and not on the Client.
    Regards

  • Forms Program units don't work in Oracle Apps Server 10.1.2.2

    Dear all,
    I created a simple form with some triggers and a button. Everything works fine when I run the form using my PC's local OC4J. If I deploy the form in Oracle Application server 10.1.2.2 and run from there, none of the triggers or program units is working. What could be the reason?
    For example, in when-button-pressed trigger, I have the following code.
    go_block('block1');
    execute_query(no_validate);
    When I press the button, nothing happens.
    Can you please help?
    Regards,
    Sanjeev

    that's indeed your problem , you need to recompile on solaris
    frmcmp.sh you can find this in you ias home/bin directory
    eg
    frmcmp.sh module=your form.fmb user=
    for this you need to have an active Xwindow
    you can use frmcmp_batch.sh too then normally you don't have to set the Xwindow
    I putted already some scripts to do this on the forum
    search for frmcmp.sh
    Erwin

  • Error in executing mappings "could not find program unit being called"

    I am trying to deploy a mapping from the control center in Oracle WareHouse Builder usign Oracle 11g . Here is what i exactly do , first I generate the mapping it goes okay with an insignificant warning .. After that I right click the mapping and click start (for exection to begin).. Eventually I get the error
    STAGES_MAP
    Error
    ORA-04063: package body "ACME_DWH.STAGES_MAP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "ACME_DWH.STAGES_MAP"
    ORA-06512: at line 1
    what does "could not find program unit being called" mean ?? I validated all my tables and its realated table and successfully deployed them ... but now the mappings is giving me trouble ??? Whas going on... I am confused.... Thansk....

    ScoobySi wrote:
    It sounds as though you've generated but haven't actually deployed the mapping to the DB? That error usually occurs when the package for the mapping is missing from the DB or the parameters have changed.
    Ignore above, just read properly, as MccM suggests try to compile package on DB to determine error. If there are no errors, refresh control center or close it and reopen it as it may be trying to call package with old set of parameters.
    Si
    Edited by: ScoobySi on Nov 30, 2010 4:20 PMExactly , I generated the mappings and then in the control center right clicking on the mappings and consider (default- create new) i deploy it. It goes ahead but tells mer there is a warning , which i already know but chose to ignore. Then i right click on the mappings again and I select start unfortunately at this point this error comes up and my DB doesnt get populated :( ...
    I am a bit new so could you kindly go step by step here , how can i compile my package on DB ??? Btw i am using toad to connect to oracle 11g , are u suggesting that using toad i should compile the package ?? if so how ?? hwo would i know the package location ??? as for the second method
    "If there are no errors, refresh control center or close it and reopen it as it may be trying to call package with old set of parameters." I doubt it will work as i already tried it. I definitely think there is a problem with the package.. i dont think there is any other problemm... I would really appreciate your help thanks...

  • ORA-06508 PL/SQL: could not find program unit being

    Hi all,
    I'm having the following problem: I have a trigger that gets fired before update of a field. The trigger source code calls a function from a package. This function calls another function.
    When the trigger was executed I got the following error ORA-06508 PL/SQL: could not find program unit being call(referring to the second function called).
    This trigger works well, but from time to time gets this error. (The database has a lot of users and there is a chance that more users fire the same trigger).
    What can I do to solve this problem as it's very inconvenient? Any suggestions?
    Thanks.

    Try running the following query:
    select *
    from
    v$db_object_cache
    where sharable_mem > 10000
    and type in ('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE')
    and KEPT='NO'
    order by sharable_mem desc
    See which objects are taking up a lot of SGA memory, you may need to pin them to prevent fragmentation. If you see DBMS_STATS in there it means that you Oracle is dynamically collecting stats which is not good - you need to set up a background task to do that.

  • Program units at forms 10g

    Hey friends,
    I have a lot of user made procedures built in the program units of forms.
    Since ia m in a process to make a web server of teh forms application, i wanted to know that would these program units cause any performance problems on the application server.
    Since the processing of thses program units would occur at application server.
    Do i have to create these procedures at database level?
    thanks
    Thanks

    That depends on what they are doing. If there is any data processing, then, yes, put it into the database. If there is just controlling of the behaviour of the form going on, e.g. setting visual attributes, enabling/disabling items etc. then leave it there.

  • Program units (Package) as global variable

    Hi all,
    Report 10g, generate PDF on the web.
    I need to manage some informations as rowtype.
    So, I defined a program unit as Package Spec VAR and defined v1 tablename%rowtype. When fired the trigger After Parameter Form run a procedure that populate the VAR.v1 and so I can use this information inside the column formula or format trigger without read the table many times.
    I try on client / server and all is ok.
    I try on the web and the package spec not work good. Exist some rule or bug about it?
    I try to move the package on the DB as Stored Procedure and so the report is ok.
    Thank you in advance.

    But in report builder is it possible to use global variable define as rowtype?
    I have some doubts about it.
    About my problem I want add an example to understand better the situation:
    As program unit I defined:
    PACKAGE VAR IS
    vTab0001 tab0001%rowtype;
    END;
    FUNCTION TAB0001_GET (pCom number) RETURN tab0001%rowtype IS
    vTab0001rec tab0001%rowtype;
    BEGIN
    Select *
    into vTab0001rec
    from tab0001
    where t0001soc = pCom;
    return (vTab0001rec);
    Exception when others Then
         return (null);
    END;
    About the After Parameter Form trigger:
    var.vTab0001 := tab0001_get(:company_code);
    With the srw.message(12345, var.vTab0001.t0001soc) check the value in all the report.
    In client/server all it is ok.
    In web I received the error
    REP-0069: Internal error
    REP-57054: In-process job terminated:Terminated with error:
    REP-1418: 'cf_1formula': Passed null arguments to SRW.MESSAGE.
    So, I have the evidence that the var.vTab0001.t0001soc is null.
    Can you help me to find a way?
    Is there someone that had this case in report builder?

  • URGENT: REP-1249: There exist uncompiled program unit(s).

    Hi all,
    We just had a problem in our production environment one report suddently started giving the following error:
    Enter Password:
    REP-0069: Internal error
    REP-57054: In-process job terminated:Terminated with error:
    REP-1249: There exist uncompiled program unit(s).
    REP-1249: Column 'C_original_buyer' has no PL/SQL formula.
    We have a similar report in french and it works fine...
    We have recompiled the report so its does not make sense the error we get.
    And also the pl/sql formula for the c_original_buyer is there and is compiled and it does not contain errors.
    Does anyone have a clue of what this could be ?
    Its in our production environment so if you know anything please reply a soon as possible.
    Any help is appreciated.
    Cheers,
    Carl

    Hi all,
    We just had a problem in our production environment one report suddently started giving the following error:
    Enter Password:
    REP-0069: Internal error
    REP-57054: In-process job terminated:Terminated with error:
    REP-1249: There exist uncompiled program unit(s).
    REP-1249: Column 'C_original_buyer' has no PL/SQL formula.
    We have a similar report in french and it works fine...
    We have recompiled the report so its does not make sense the error we get.
    And also the pl/sql formula for the c_original_buyer is there and is compiled and it does not contain errors.
    Does anyone have a clue of what this could be ?
    Its in our production environment so if you know anything please reply a soon as possible.
    Any help is appreciated.
    Cheers,
    Carl

  • Rep-771 There exist uncompiled program unit(s).

    hi ,
    i am using 10g when i run my reports , some reports giving this error message
    rep-771 There exist uncompiled program unit(s).
    REP-1247: Report contains uncompiled PL/SQL.
    REP-1247: Report contains uncompiled PL/SQL.
    i have compiled my reports number of times and also these are properly running when i run them from reports builder but when i try to run them from menu above errors occured.
    please can someone help me
    thanks
    Najeeb

    I got the problem resolved by myself. I looked at the "showjobs" and found that the blobdestination output type was actually recognized. All the error messages (when running the url) had nothing to deal with the new output type. Here is the trick.
    In addition to specifying the DESNAME=http://username:password@host:port/sid for the output destination, you also need to specify the userid userid=username/password@database_name in the same url in order for the report to run.
    Thanks.
    Andy

  • REP-1247: There exist uncompiled program unit(s). REP-1247: Report contains

    Hello,
    i have the following problem when i first run this Report i have :
    REP-1247: There exist uncompiled program unit(s). REP-1247: Report contains uncompiled PL/SQL.
    many other reports i have having this problem pls help
    Abdetu..

    Any help pls...?
    i still experience the problem..?
    i found out the forulam that causes the problem as it is :
    ==========================================
    function CF_PREVIOUS RETURN Number is
              V_MATERIAL_HEIGHT1 NUMBER(40);
              V_MAX_SERIAL NUMBER(40);
              V_MAX_DATE DATE;
    BEGIN
              IF :SERIAL > 1 THEN
                   BEGIN
                                       SELECT MAX(SERIAL)-1
                                       INTO V_MAX_SERIAL
                        FROM PLN_TANK_TRANSACTION
                        WHERE TRANSACTION_DATE = :TRANSACTION_DATE
                        AND TANK_CODE = :TANK_CODE
                        AND MATERIAL_CODE = :MATERIAL_CODE;
                             EXCEPTION
                        WHEN NO_DATA_FOUND THEN V_MAX_SERIAL := 0;
                             END;
                        BEGIN
                             SELECT NVL(MATERIAL_HEIGHT,0)
                             INTO V_MATERIAL_HEIGHT1
                        FROM PLN_TANK_TRANSACTION
                        WHERE PLN_TANK_TRANSACTION.TRANSACTION_DATE = :TRANSACTION_DATE
                        AND PLN_TANK_TRANSACTION.TANK_CODE = :TANK_CODE
                        AND PLN_TANK_TRANSACTION.SERIAL = V_MAX_SERIAL
                        AND PLN_TANK_TRANSACTION.MATERIAL_CODE = :MATERIAL_CODE;
                   EXCEPTION
                        WHEN NO_DATA_FOUND THEN
                        V_MATERIAL_HEIGHT1 := 0;
                   END;
              ELSE --IF :SERIAL =  1 THEN
                        BEGIN
                             SELECT MAX(TRANSACTION_DATE)
                             INTO V_MAX_DATE
                   FROM PLN_TANK_TRANSACTION
                   WHERE TRANSACTION_DATE <=:TRANSACTION_DATE
                   AND TANK_CODE = :TANK_CODE
                   AND MATERIAL_CODE = :MATERIAL_CODE;
                        EXCEPTION
                        WHEN NO_DATA_FOUND THEN
                        V_MAX_DATE := NULL;
                        END;
                             BEGIN
                                  SELECT NVL(MATERIAL_HEIGHT,0)
                                  INTO V_MATERIAL_HEIGHT1
                                  FROM PLN_TANK_TRANSACTION
                                  WHERE SERIAL = V_MAX_SERIAL
                                  AND TRANSACTION_DATE = V_MAX_DATE
                                       AND TANK_CODE = :TANK_CODE;
                             EXCEPTION
                        WHEN NO_DATA_FOUND THEN
                        V_MATERIAL_HEIGHT1:= 0;
                             END;
         END IF;
         RETURN (V_MATERIAL_HEIGHT1);
    END;
         ------------------------------------------------------------------------------------------

Maybe you are looking for

  • Home Location Problem in OVI MAP

    Hi, I have set the home location to a non-street point near  a road to check if it can route to it.  As this was not a valid street name so I choose my current location from map. When I ask to go DRIVE HOME, it say no route found. I try to chane the

  • Timer problem, GetCtrlAtt​ribute gives weird results

    I have several timers and am having problems with one that I have enabled and set the time interval to 60.0 s. I was trying to change the time interval and couldn't get that to work, so decided to interrogate it for the enabled status and the time in

  • Stop Lightroom 2.4 from Importanting Images w/camera connected

    I want to stop LR 2.4 from auto importing images when I connect my camera. I have tried many times to set "Preferences" so it would not auto import images when I connect my camera (Edit > Preferences... > Import > (uncheck box) next to "Show import d

  • Lumia 620 sw update

    I want to ask can lumia 620 update to windows 8.5 and 9 when they will be launch?

  • PI sheet for pharma industry - step by step customization required very urg

    Hi, We are implementing sap PP-PI for pharma industry.Can some one please send some good document explaining the customization for PI sheet , custom pi sheet . any help is gretaly appreciated. sonia