Sharing Package level variables in PL/SQL Libraries in Forms 6i and 10g

We have a Forms 6i Application, where we share variables between Forms in the following way:
In scheme A_PROMATA is a table called T_GLOBAL_VAR, where we define our variables as Columns of the table. That means there is no record in the table, just columns, that represent our “global” variables, we want to share between Forms.
Then we have a PL/SQL Library called NAV, where we have only the Package Specifiation:
PACKAGE NAV
IS
VAR A_PROMATA.T_GLOBAL_VAR%ROWTYPE;
END;
This works fine for years, but when we try to migrate to Forms 10g, this does not work anymore, because we always get the following error message:
ORA-06508 PL/SQL: could not find program unit being called
But when we create a Dummy-Package Body with a Dummy Procedure in the Package NAV in the library, it works again...
Does anybody know the reason for this???
Regards and Thanks.
Udo
p.s.:
Database is 10g (10.1.0.4.0)
Application Server is 10g (10.1.2.0.0) on Red Hat

Have you generated (compiled) the runtime .plx from your PLL library using the 10g compiler? I use the command:
f90genm LIBNAME un/pw@xyz Module_Type=LIBRARY Output_File=LIBNAME Strip_Source=YESI tried out your situation, creating a PLL library with ONLY a package spec, and only a table%Rowtype record within the spec. While I had problems getting the Forms 10 Builder to generate the PLL Library, I was able to create a test form that sets, and then displays the columns within the record within the package spec.
I had problems generating the .plx from the .pll within the Forms Builder. It kept giving me errors:    FRM-91507: Internal Error: Unable to generate library.
and
    PDE-CCR003 Library TMP3 is currently in use.The only way I could create the .plx was from a cmd.exe window, with the batch compiler command above.

Similar Messages

  • Calling shared objects in unix from Forms 6i and 10g

    I would like to know how to call shared objects in unix from Froms 6i and 10g. Can anybody help in this regard? Your help is very well appreciated.

    Hi,
    Do you have any 11i instance where those custom forms are used? If yes, you will have to copy those forms from 11i to R12 instance, open the forms using Forms 10g builder, compile it and upload it back to the server.
    Note: 427879.1 - How To Customize And Compile An Application Seeded Form (FMB) Or Library (PLL)?
    Note: 743490.1 - Customization in Oracle Applications
    Note: 563258.1 - How To Upgrade 11i Custom Forms And Reports To R12
    Regards,
    Hussein

  • SQL Developer 3.0.04 and 10g

    Downloaded SQL Developer 3.0.04 to interface to a 10g server. I encountered the now infamous no ocijdbc11 in java.library.path problem which is described in other forum posts. Upon reading, my understanding is that more recent versions of Developer require an 11 client. Workarounds include 1) backing up to previous versions of Developer or 2) downloading and using instantclient. I chose the 2 ^nd^ option.
    Instantclient got rid of the ocijdbc11 error, but now I'm seeing Internal Error: Fetch error message failed!
    There doesn't seem to be much help available on the Oracle site or forums, and I'm hoping that someone else has seen and solved this problem.
    Any guidance for this Oracle newbi is appreciated. Thanks!

    There is another workaround - set the Use OCI/Thick drive option off.
    Tools|Preferences|Database|Advanced.
    This won't work if you need OCI for specific functions not supported by the thin driver.

  • SQL*LOADER on forms in IAS 10g environment

    I want to execute a sqlloader command within a Oracle Form in a Oracle IAS 10g environment. Is there any knowledge out there how to solve that?
    thanks,
    Ame
    Message was edited by:
    joinnv

    Well... you could try to call some unix script from your forms and have this script handle the sqlldr stuff (which is the solution you already found ;) ). You could also try to build some java bean to upload files and load it directly into your database (not using sqlldr anymore).

  • PL/SQL package global variable in Dev. 6i and newer....

    Hi,
    In db packages , the use of global variable is an appropriate method to keep the value it contains globally... without the danger of being overriden by other session....(as for each session , there is a 'private' section in memory(library cache)).
    Is the above also true to pl/sql packaged global variables kept at client's side(forms/reports)...????
    Thanks,
    Sim

    db-package variables are global to your session
    forms globals are global to your forms application
    In one case you have trouble: When you start a new forms via open_form (, new session, ) then your db-globals are global in that new session, while your forms globals are the same in all forms of the actual forms - session

  • Forms 10 and PL/SQL: Using a server package variable

    Hi,
    I have a variable created at package level in the server,
    When I try to assign its value to a Forms item, I get an error.
    "Unable to access distant package variable".
    What should I do to access this variable?
    Many thanks

    Hello,
    Add to the package a procedure to set this variable, and also a function that returns the variable content.
    Francois

  • SQL Queries don’t recognize Package member variables.

    Hi,
    I have a package defined like this:
    CREATE OR REPLACE PACKAGE PROD.PKG_BSYS_COMMON
    AS
    MAX_RETURN_ROWS NUMBER(6) :=1000;
    END PKG_BSYS_COMMON;
    The problem is that I cannot use MAX_RETURN_ROWS in my SQL queries:
    SELECT
    FROM
    CLIENT
    WHERE
    ROWNUM < PROD.PKG_BSYS_COMMON.MAX_RETURN_ROWS
    Is there any way to use that package member variable in my queries?
    This is a simplified explanation of our problem and it is very important for our business to avoid hardcoding constants in queries and define all of them in a central location. Is there a better way doing this?
    Any help would be appreciated,
    Alan

    CREATE OR REPLACE PACKAGE PKG_BSYS_COMMON
    AS
    function max_return_rows return number ;
    END PKG_BSYS_COMMON;
    CREATE OR REPLACE PACKAGE body PKG_BSYS_COMMON  as
    function max_return_rows return number is
    begin
    return(1000);
    end;
    end PKG_BSYS_COMMON;
    select pkg_bsys_common.max_return_rows from dual;
    MAX_RETURN_ROWS
               1000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • What are the Advantages & Disadvantages of Global Variable at Package Level

    Dear Expprts
    Please tell me,
    What is mean by Global Variable?
    What are the Advantages and Disadvantages of Global Variable at Package Level against Private Variable?

    HI
    GLOBAL VARIABLE UR USE ANY BLOCK IN PLSQL
    BUT LOCAL VARIABLE USED ONLY THERE THEY DECLARE.
    REGARDS
    MOHAMMADI

  • Package body variable- is it always safe to use it?

    In a package spec i have a function "function1" and in package body this functions does following:
    1) it evaluate/calculate a variable/value "Flag1".
    2) it calls 4 (package body) functions that needs to use value "Flag1".
    I have forgotten how "package body variables" work. Is it safe to declare variable "Flag1" in a "package body" level? So that "function1" can initialize this variable and 4 functions can use this variable later too. Or it is not safe if i have lot of sessions in my database which may go into conflict with sharing this "flag1"? And i perhaps better send "flag1" as function parameter to all 4 functions?

    Easy enough to test, but it depends on what you mean by the "next run".
    In the same session:
    SQL > CREATE PACKAGE p AS
      2     FUNCTION f1(p_v1 IN NUMBER) RETURN NUMBER;
      3  END;
      4  /
    Package created.
    SQL > CREATE PACKAGE BODY p AS
      2     g_var VARCHAR2(10);
      3
      4  FUNCTION f2(p_v2 IN VARCHAR2) RETURN NUMBER IS
      5  BEGIN
      6     DBMS_OUTPUT.Put_Line('Value of g_var in f2 is: '||g_var);
      7     RETURN 1;
      8  END;
      9
    10  FUNCTION f1 (p_v1 IN NUMBER) RETURN NUMBER IS
    11     l_res NUMBER;
    12  BEGIN
    13     DBMS_OUTPUT.Put_Line('Value of g_var at start f1 is: '||g_var);
    14     SELECT dummy INTO g_var FROM dual;
    15     l_res := f2(g_var);
    16     g_var := 'A';
    17     DBMS_OUTPUT.Put_Line('Value of g_var at end f1 is: '||g_var);
    18     RETURN l_res;
    19  END;
    20  END;
    21  /
    Package body created.
    SQL > var v number;
    SQL > exec :v := p.f1(1);
    Value of g_var at start f1 is:
    Value of g_var in f2 is: X
    Value of g_var at end f1 is: A
    PL/SQL procedure successfully completed.
    SQL > exec :v := p.f1(2);
    Value of g_var at start f1 is: A
    Value of g_var in f2 is: X
    Value of g_var at end f1 is: A
    PL/SQL procedure successfully completed.but after running it in one session, then doing the "next run" in a different session:
    SQL > exec :v2 := p.f1(1);
    Value of g_var at start f1 is:
    Value of g_var in f2 is: X
    Value of g_var at end f1 is: A
    PL/SQL procedure successfully completed.John

  • Version migration, shared ssl, session variables

    I'm migrating a shopping cart application from Cold Fusion
    4.5 to a new server running MX 7, and have run into a weird problem
    transferring session variables.
    Basically, there's two sites running on one physical server.
    The catalog, and then the shared ssl checkout pages. I'll call them
    catalog.com and sharedssl.com.
    Under 4.5, if I passed CFID & CFTOKEN in a link from
    identically named applications on catalog.com to sharedssl.com, the
    session and all its associated variables would transition
    seamlessly forward. Under MX, this is no longer happening. The
    *very first page* on sharedssl.com (the one that was directly
    passed CFID & CFTOKEN) will have access to those variables, but
    any subsequent pages on sharedssl.com will just throw errors.
    Looking at the debugging info, it's obvious that under MX a
    new CFID and CFTOKEN are being assigned when the user goes to
    sharedssl.com, regardless of the session id that was passed on; as
    soon as the "old" CFID & CFTOKEN aren't being explicitly
    mentioned, the "new" ones take over, resulting in a completely
    blank session.
    Has anyone else experienced anything similar? Is there a
    simple fix?
    I have some ideas on how to make this work, but I'd really
    like to keep this projection a "migration," and not, ie., a
    "rewrite." I guess I'm wondering whether there's a configuration
    checkbox I'm unaware of, or perhaps some arcane option in
    cfapplication that will restore the old behavior.
    Thanks for any help,
    Tim

    On which page is the following code?
    After login, user is validated and set values to those session.variables:
    ........user validation codes here......................
    <cfif mylogin NEQ true>
          <cflocation url="/login/login.cfm">
          <cfabort
    <cfelse>
          <cfset session.loggedin="Yes">
          <cfset session.username="#Trim(Form.username)#">
         <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
         <cfset session.userrights = qUserRights><!--- it's a query --->
        <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
            <cfloop query="qUserGroup">
               <cfset session.usergroup = user_group>
               <cfbreak>
            </cfloop>
        <!--- ****************** ???????????????????????????????????????????????????????????????????????????
        When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
        But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
        So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
       <cfdump var="#session.loggedin#">
       <cfdump var="#session.username#">
       <cfdump var="#session.userright#">
       <cfdump var="#session.usergroup#">
    </cfif>

  • Lookup by SQL select in ODS tables and source package

    Hi all
    I load FI data in ODS and need some extra info from older ODS records.
    In my Update rule for target InfoObject I created 2 SQL selects on Active Data and New data tables of ODS. Selects worked fine while testing them as separate program, but I got no data while data load.
    I guess, the data I need was in the same data package during data load. So I assume, besides Active/New data selects, I need to check data on SOURCE_PACKAGE. Is it possible on update rule level of InfoObject? Could you please, provide me some ABAP example?
    thanx in advance, points will be awarded.

    SELECT in field routine:
    ==========================================================
          DATA src_doc_no(10) TYPE c.
          DATA src_item_num(3) TYPE c.
          DATA src_year(5) TYPE c.
          DATA src_doc_typ(2) TYPE c.
      if ( COMM_STRUCTURE-AC_DOC_TYP = 'DD' or COMM_STRUCTURE-AC_DOC_TYP =
      'LD' ) and STRLEN( COMM_STRUCTURE-REF_KEY3 ) = 17.
         CONCATENATE COMM_STRUCTURE-REF_KEY3+0(4) '%' INTO src_year.
         src_item_num = COMM_STRUCTURE-REF_KEY3+15(3).
         src_doc_no = COMM_STRUCTURE-REF_KEY3+4(10).
    select from NEW data of ODS:
         SELECT AC_DOC_TYP into src_doc_typ
         FROM /BI0/AFIAR_O0340
         WHERE COMP_CODE = COMM_STRUCTURE-COMP_CODE
           AND DEBITOR = COMM_STRUCTURE-DEBITOR
           AND FISCVARNT = COMM_STRUCTURE-FISCVARNT
           AND AC_DOC_NO = src_doc_no
           AND ITEM_NUM = src_item_num
           AND FISCPER like src_year.
         endselect.
         if src_doc_typ = ''.
    select from ACTIVE data of ODS:
           SELECT AC_DOC_TYP into src_doc_typ
           FROM /BI0/AFIAR_O0300
           WHERE COMP_CODE = COMM_STRUCTURE-COMP_CODE
             AND DEBITOR = COMM_STRUCTURE-DEBITOR
             AND FISCVARNT = COMM_STRUCTURE-FISCVARNT
             AND AC_DOC_NO = src_doc_no
             AND ITEM_NUM = src_item_num
             AND FISCPER like src_year.
           endselect.
         endif.
         RESULT = src_doc_typ.
      endif.
    ============================================

  • Pass variable into execute sql task

    hi
    i want to execute my stored proc, in ssis package . i have 2 parameter, so i need pass values from another table one by one.
    i need to execute stored proc for each from another table, by passing values
    how to do it

    hi
    i want to execute my stored proc, in ssis package . i have 2 parameter, so i need pass values from another table one by one.
    i need to execute stored proc for each from another table, by passing values
    how to do it
    You can do it as follows
    1. Add a variable of type object in SSIS
    2. Add a execute sql task with query as
    SELECT field1,field2
    FROM Table
    Set resultset option as Full resultset and in resultset tab map the resultset to object variable.
    3. Add a ForEach loop with ADO enumerator and map it to object variable. Inside loop add two variable to get each iterative values for field1 and field2
    4. Inside loop add a execute sql task and set command as
    EXEC ProcedureName ?,?
    Map the parameters to two variables created inside the loop.
    On executing package the procedure gets executed for each record in the table.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Problem with merge using package (row)variable

    We're doing an ETL project, where we have to validate data coming from staging tables before inserting / updating them in our data tables.
    We use a validate function for this, in which we 'test' our mappings and business logic, and returns 'OK' if no errors were occured.This function is called in the WHERE clause, and populates a package row variable. From this variable, values are read in the insert / update statement, using a get function.
    The problem is that sometimes, with a data set with NO duplicate keys, we get an ORA-00001 error, and sometimes not.
    Does anyone have any idea why this error could occur ? We're on Oracle 9.2.0.5.0.
    For the demo mentioned below, the following statement fails , while it succeeds if we add 'and rownum < 11' to the where clause :
    merge into target_tab t
    using (select st.* from source_tab st where demo_pack.assign_var(st.attrib_1, st.attrib_2, st.attrib_3) = 'OK') s
    on (t.attrib_1 = s.attrib_1 and
    t.attrib_2 = s.attrib_2)
    when matched then update
    set t.attrib_3 = demo_pack.get_attrib('ATTRIB_3')
    when not matched then
    insert(attrib_1, attrib_2, attrib_3)
    values (demo_pack.get_attrib('ATTRIB_1'), demo_pack.get_attrib('ATTRIB_2'), demo_pack.get_attrib('ATTRIB_3'));
    Can anyone explain to me why this statement sometimes fails, and other times not ?
    Thanks in advance .
    demo tables / packages :
    create table source_tab
    attrib_1 varchar2(30),
    attrib_2 varchar2(30),
    attrib_3 varchar2(200)
    create table target_tab
    attrib_1 varchar2(30) not null,
    attrib_2 varchar2(30) not null,
    attrib_3 varchar2(200),
    constraint pk_target_tab primary key(attrib_1, attrib_2)
    insert into source_tab
    select table_name, column_name, data_type
    from user_tab_columns;
    commit;
    create or replace package demo_pack as
    function assign_var(p_attrib_1 in target_tab.attrib_1%type,
    p_attrib_2 in target_tab.attrib_2%type,
    p_attrib_3 in target_tab.attrib_3%type) return varchar2;
    function get_attrib(p_name in varchar2) return varchar2;
    end;
    create or replace package body demo_pack as
    g_rec target_tab%rowtype;
    function assign_var(p_attrib_1 in target_tab.attrib_1%type,
    p_attrib_2 in target_tab.attrib_2%type,
    p_attrib_3 in target_tab.attrib_3%type) return varchar2 is
    begin
    g_rec.attrib_1 := p_attrib_1;
    g_rec.attrib_2 := p_attrib_2;
    g_rec.attrib_3 := p_attrib_3;
    return 'OK';
    end;
    function get_attrib(p_name in varchar2) return varchar2 is
    l_return varchar2(200);
    begin
    if p_name = 'ATTRIB_1' then
    l_return := g_rec.attrib_1;
    elsif p_name = 'ATTRIB_2' then
    l_return := g_rec.attrib_2;
    elsif p_name = 'ATTRIB_3' then
    l_return := g_rec.attrib_3;
    end if;
    return l_return;
    end;
    end;
    /

    It's not necessarily that the problem is within your package code. As long as UNIQUE constraint exists on DEST table, any MERGE statement may fail with ORA-00001 due to concurrent updates and inserts taking place.
    Of course, it's just my guess but consider the following scenario (three sessions modify DEST table in parallel – and to keep this example clear, I put their commands in chronological order):
    S#1>  create table dest(x primary key, y) as
      2   select rownum, rownum
      3     from dual
      4  connect by level <= 5;
    Table created.
    S#1>  create table src(x, y) as
      2   select rownum + 1, rownum + 1
      3     from dual
      4  connect by level <= 5;
    Table created.
    S#1> select * from src;
             X          Y
             2          2
             3          3
             4          4
             5          5
             6          6
    S#1> select * from dest;
             X          Y
             1          1
             2          2
             3          3
             4          4
             5          5
    S#2> -- Now, session #2 will update one row in DEST table
    S#2> update dest
      2     set y = 40
      3   where x = 4;
    1 row updated.
    S#2> select * from dest;
             X          Y
             1          1
             2          2
             3          3
             4         40
             5          5
    S#1> -- Session #1 issues the following MERGE:
    S#1> merge into dest d
      2  using (select * from src) s
      3     on (s.x = d.x)
      4   when matched then update set d.y = s.y
      5   when not matched then insert (d.x, d.y)
      6        values (s.x, s.y);
    -- At this point, session #1 becomes blocked as it can not modify row locked by session #2
    S#3> -- Now, session #3 inserts new row into DEST and commits.
    S#3> -- MERGE in session #1 is still blocked.
    S#3> insert into dest values (6, 6);
    1 row created.
    S#3> select * from dest;
             X          Y
             1          1
             2          2
             3          3
             4          4
             5          5
             6          6
    6 rows selected.
    S#3> commit;
    Commit complete.
    S#2> -- Session #2 rolls back its UPDATE.
    S#2> rollback;
    Rollback complete.
    -- Finally, session #1 is getting unblocked, but...
    merge into dest d
    ERROR at line 1:
    ORA-00001: unique constraint (MAX.SYS_C0032125) violated
    S#1>Hope this helps,
    Andrew.

  • Basis Support package level of ECC 6.0

    Dear All,
    I use SAP Version ECC 6.0 (700 Kernel, 64bit) Database SQL.
    My question is what should be the support package level of ECC 6.0? SAP recommends for the latest support package level always. But, whether the latest support package level will be stable?
    We are in the blue print stage now, I haven't received any requirement from the fuctionals for the support package upgrade.
    We have modules like, SD, MM, FI, FICO, HR, PS and CS.
    Anyone worked with these modules who can provide me, the particular components related to these modules with the stable support pack level.
    Thanks in Advance,
    Abu Sandeep

    Hi,
    Yes, for a new installation always go for the last support packages.
    After going live, NEVER, NEVER apply support packages without  qualifying them for YOUR company in a test system. It takes a lot of time to do non regression tests but it is mandatory IMHO.
    Regards,
    Olivier

  • Routines for File name at External Data in Info Package level.

    Hi All,
    Can any one give the example codes of how to write the routine for Files at External Data in Info Package level.
    Regards
    srinivas

    Hi Srinivas
    Here iam attaching a sample code in the infopackage level this code is used to select the Current version from TVARV table ..based on the version from variable the data is loaded into the ods..
    data: l_idx like sy-tabix.
              read table l_t_range with key
                   fieldname = 'FISCPER'.
              l_idx = sy-tabix.
    tables tvarv.
    data: v_prever(6)   type c,
          v_fiscper(7)  type n.
      clear tvarv.
      select single low
       from tvarv
       into v_prever
      where name = 'ZBSK_PREVIOUS_RELEASED_VERSION' and
            type = 'P' and
            numb = '0000'.
    concatenate v_prever(4) '0' v_prever+4(2) into v_fiscper.
       concatenate  '0' v_prever+4(2) v_prever(4) into v_fiscper.
            l_t_range-low = v_fiscper .
              modify l_t_range index l_idx.
    Hope the above code helps you..
    let me know in case of any concerns.. and further help needed..
    bye
    Shu Moh..

Maybe you are looking for

  • Payment model for Adobe Premiere Elements 12

    One site announces a one time cost. Is there also a mandatory annual license fee?

  • Urgent help - Cannot open examsoft app in Mac (Yosemite)

    I need to use examsoft and downloaded and installed to my Mac (OXS Yosemite), but I could not open it. Whenever I am trying to open it, it just pops out in the dock and then quit immediately. What should I do? Thank you!

  • Domo arigato, Mr. Roboto

    Hi-- I would like record and playback mouse movements and key presses for a demo of the software that I am developing using Swing. The gui consist of a main window with lots of internal frames. The Robot works well for playback, but I need a way to r

  • Appleworks 5 files won't work with Pages, appearing as UNIX files

    I realize Pages will not open Appleworks 5 files. However, for some reason, when I copied my Appleworks 5 files onto a hard drive and put them on my PPC G4 iBook running OS 10.4, the icons for the files are appearing as unix executable files. I had n

  • ResourceBundle is driving me mad. Please help

    Is simple: i have a folder in the project root named config and in that folder i have a file server_en.properties. In a java class i do this: public class MySqlConnection{ private static ResourceBundle server = null; public MySqlConnection(){ Locale