Using constants in the package

Hi gurus,

We store all our constants in a package named WIE_CONSTANTS_TEST. That was the original spec and body:


create or replace package wie_constants_TEST authid current_user as


/*
Constants for INTERFACE_BATCH_STATUS field in the table WIE_INT_BATCHES_B.
*/
c_int_batch_inprocess        constant wie_int_batches_b.interface_batch_status%type :='IN_PROCESS';
c_int_batch_completed        constant wie_int_batches_b.interface_batch_status%type :='COMPLETED';
c_int_batch_complerror       constant wie_int_batches_b.interface_batch_status%type :='COMPLETED_ERRORS';
c_int_batch_complwarn        constant wie_int_batches_b.interface_batch_status%type :='COMPLETED_WARNINGS';
c_int_batch_ready            constant wie_int_batches_b.interface_batch_status%type :='READY';

/*
Constants for INTERFACE_BATCH_TYPE field in the table WIE_INT_BATCHES_B.
*/

c_int_batch_optxn            constant wie_int_batches_b.interface_batch_type%type  :='WO_OP_TXN';
c_int_batch_mattxn           constant wie_int_batches_b.interface_batch_type%type  :='WO_MTL_TXN';
c_int_batch_restxn           constant wie_int_batches_b.interface_batch_type%type  :='WO_RSC_TXN';
c_int_batch_wotxn            constant wie_int_batches_b.interface_batch_type%type  :='WO';


-- Table Name Constants
c_mtr_trans_table_name       constant wie_int_errors.table_name%type := 'WIE_MATERIAL_TRANSACTIONS_INT';
c_res_trans_table_name       constant wie_int_errors.table_name%type := 'WIE_RESOURCE_TRANSACTIONS_INT';
c_batch_int_table_name       constant wie_int_errors.table_name%type := 'WIE_INT_BATCHES_B';
c_wo_hdr_table_name          constant wie_int_errors.table_name%type := 'WIE_WORK_ORDERS_INT';
c_wo_dtl_table_name          constant wie_int_errors.table_name%type := 'WIE_WORK_ORDER_DETAILS_INT';

end wie_constants_test;

/
commit;
exit;

The package body is

CREATE OR REPLACE PACKAGE BODY WIE_CONSTANTS_TEST AS

END WIE_CONSTANTS_TEST;
/
COMMIT;
EXIT;

This package is referred to by several other packages. I change the value of a constant and recompile it, but that translates into a large number of questions. There is no change in the package body. There is only change in package spec, I modify and recompile the package spec and body. This is how the new spec package looks like:

create or replace package wie_constants_TEST authid current_user as


/*
Constants for INTERFACE_BATCH_STATUS field in the table WIE_INT_BATCHES_B.
*/


c_int_batch_inprocess        constant wie_int_batches_b.interface_batch_status%type :='IN_PROCESS';
c_int_batch_completed        constant wie_int_batches_b.interface_batch_status%type :='COMPLETED';
c_int_batch_complerror       constant wie_int_batches_b.interface_batch_status%type :='COMPLETED_ERRORS';
c_int_batch_complwarn        constant wie_int_batches_b.interface_batch_status%type :='COMPLETED_WARNINGS';
c_int_batch_ready            constant wie_int_batches_b.interface_batch_status%type :='READY';


/*
Constants for INTERFACE_BATCH_TYPE field in the table WIE_INT_BATCHES_B.
*/
c_int_batch_optxn            constant wie_int_batches_b.interface_batch_type%type  :='WO_OP_TXN';
c_int_batch_mattxn           constant wie_int_batches_b.interface_batch_type%type  :='WO_MTL_TXN';
c_int_batch_restxn           constant wie_int_batches_b.interface_batch_type%type  :='WO_RSC_TXN';
c_int_batch_wotxn            constant wie_int_batches_b.interface_batch_type%type  :='WO';

-- Table Name Constants
c_mtr_trans_table_name       constant wie_int_errors.table_name%type := 'ORA_WIE_MATERIAL_TRANSACTIONS_INT';
c_res_trans_table_name       constant wie_int_errors.table_name%type := 'ORA_WIE_RESOURCE_TRANSACTIONS_INT';
c_batch_int_table_name       constant wie_int_errors.table_name%type := 'WIE_INT_BATCHES_B';
c_wo_hdr_table_name          constant wie_int_errors.table_name%type := 'WIE_WORK_ORDERS_INT';
c_wo_dtl_table_name          constant wie_int_errors.table_name%type := 'WIE_WORK_ORDER_DETAILS_INT';

end wie_constants_test;
/
commit;
exit;

Now, the problem is that whenever I call the new package, I don't see the values. Is an example to run the script:

declare
l_variable VARCHAR2(200);
begin
l_variable :=wie_constants_TEST.c_int_batch_inprocess;
DBMS_OUTPUT.PUT_LINE('wie_constants_TEST.c_dispatch_ready='||c_int_batch_inprocess );
L_VARIABLE :=wie_constants_TEST.c_int_batch_optxn;
DBMS_OUTPUT.PUT_LINE('wie_constants_TEST.C_DEFAULT_SCHEDULER='||c_int_batch_optxn );
L_VARIABLE :=wie_constants_TEST.c_mtr_trans_table_name;
DBMS_OUTPUT.PUT_LINE('wie_constants_TEST.c_mtr_trans_table_name='||L_VARIABLE );
end;
/

Before the change, all right. After the change, the first time I run the script above, I get the error:

ORA-06502: PL/SQL: digital or value error: character string buffer too small

ORA-06512: at the 'APPS '. WIE_CONSTANTS_TEST,"

When I restarted it, I get the values for the new table name as null.

I already run the commands below, but it did not help

alter system flush shared_pool;
ALTER SYSTEM FLUSH buffer_cache;

begin
DBMS_SESSION.RESET_PACKAGE;
END;
/


begin
DBMS_SESSION.MODIFY_PACKAGE_STATE(DBMS_SESSION.FREE_ALL_RESOURCES);
end;
/

begin
DBMS_SHARED_POOL.UNKEEP ('APPS.WIE_CONSTANTS_TEST', 'P');
end;
/

Demand for experts help to solve the problem.

What are the data type of

wie_int_errors.table_name%type

You have changed the constants to be 33 characters long.  Oracle table names are usually limited to 30 characters.  Any chance that the data type only allows 30 characters?

Justin

Tags: Database

Similar Questions

  • How the packaging material used to represent the packaging material

    Hello

    We use PLM 6.0 and upgrade to PLM 6.2. but we have trouble on the specifications for packaging printed have been deprecated.

    In the user's Guide for the hardware specification packaging should be used to represent printed packaging.

    Can it-someone ' a please us referring to this problem.

    Thank you


    Sorry, it should be 3.13.1. I don't think that it's mentioned in the documentation since it was released two months ago.

    You can contact Oracle support for help. The bug number is 22253870.

  • Using odiRef in the package ODI to get the user name for the object in step OdiSendmail

    Hello

    I'm trying to do something simple and to include the user name in a subject line of a stage of OdiSendMail.  In the Expression Editor for the topic, I use the following syntax, but in vain.

    Send data to HFM starts by < % = odiRef.getUser (String) % >

    What a friend missing here?  I need to replace the string with something like 'UserName' or is there a different setting to spend?  I tried the username, but it did not work.  This syntax is correct or do I have to enter another way?

    Thank you

    T.

    Hello

    getUser has a parameter which is the name of the property to recover, you will probably want the username;

    http://docs.Oracle.com/CD/E14571_01/integrate.1111/e12645/odiref_reference.htm#autoId70

    Something like...

    <%=odiRef.getUser( "USER_NAME" )%>

    See you soon

    David

  • default attributes and all the packages attribute survey

    I'm on vCops 5.7.1.  I have a question about the packages of the attribute.  If I go under adapt - VMware adapter type > type - Virtual Machine resources, I see two packages of default attributes attribute) 1 and 2) all attributes.  I saw on some other assignments the default attributes package comes with 5.7.1 and should be used instead of the set of all attributes which collects everything.  By default collects about 50% of the measures.  How will I know which of the packages attribute are used and if the package of all of the attributes is used how to change to use the default package of attributes?  It seems that there are two packs of attribute under all kinds of resources to the VMware adapter.  If it is configured to use the package of all attributes which is a performance more big hit for the environment since it collects everything instead of 50%?

    The "default" and "all" are part of the history of Integrien days, where their appellation.

    If you choose the 'balanced profile', you will get the default attribute. I think it's sufficient for my needs, considering that it allows to save about 50%. I have

    If you need the full metric, what particular settings you are after? The reason to ask, is that there are a lot of settings in doubles, where the reason for profile balanced.

    You can still customize the collection. Apologies, I do not have vC Ops in front of me to give you the screenshot. It is in one of the menu. Try the option type adapter or a resource.

    See you soon!

    E1

  • AAMEE 3.0 and install the Package error

    Hello.

    I hopoing can someone help me with a problem I have with JOHN 3.0 and try to install packages for CS6 for Windows.

    I use Illustrator as the package of initial test but when tyring to run the .msi (on a 32-bit Windows 7 system) file, I get an error that says...  This Setup program cannot be run directly in UI mode.  Please, deploy the MSI in silent mode.

    I'm sure I followed the instructions correctly but do not understand why I see this message.  I read on a lot of people having problems with JOHN, but I don't have to do anything fancy with the package.  Just a straight line basically install Illustrator in this case.  I finally need so that packages for several products, but this is my first shot at this.

    Any help on why I see this message would be greatly appreciated.

    Thank you!

    Mark,

    Sorry, you feel like being to avoid the question, this isn't the case and Liba answered the question earlier in his answer. JOHN is a tool Enterprise Volume designed to facilitate the deployment of CS through hundreds or thousands of machines and for that reason the tool was designed to présérialiser, give some advanced configuration options and create a package optimized for silent deployment slots client without user intervention. The standard installation program continues to provide a bar of GUI and progress for users.

    JOHN is also designed to be used with a 3rd party deployment tool, and we have seen in the past, individuals use so that a notification of progress or installation is displayed to the user if you wish them.

    We will take your comments on board and look to see if a progress bar is something that we can achieve in the future for windows, as it is present on Mac.

    See you soon

    Karl

    CS Enterprise Systems Engineer

  • Not able to access the constant value of package in oracle reports

    Hello

    I created the package with the constant variables in the database

    CREATE or REPLACE PACKAGE cls_vars AS

    -Constants

    const_yes CONSTANT VARCHAR2 (1): = 'Y ';

    const_no CONSTANT VARCHAR2 (1): = 'n';

    const_active CONSTANT VARCHAR2 (1): = 'A ';

    const_inactive CONSTANT VARCHAR2 (1): = 'I ';

    end;

    I created the function of oracle reports, please see the code below

    function CF_CONSTINACTIVEFormula returns the Char type is

    L_const_inactive VARCHAR2 (10);

    Start

    RETURN cls_vars .const_inactive;

    EXCEPTION

    WHILE OTHERS THEN

    RETURNS A NULL VALUE.

    end;

    When I compile this code in the oracle reports, I get this error "cannot directly access remote variable or cursor.

    We can not directly get/set a variable (or constant) in a package to database forms and reports module.

    We must use the procedures/functions to get/set accessor. For example:

    CREATE or REPLACE PACKAGE cls_vars AS

    -Constants

    const_yes CONSTANT VARCHAR2 (1): = 'Y ';

    const_no CONSTANT VARCHAR2 (1): = 'n';

    const_active CONSTANT VARCHAR2 (1): = 'A ';

    const_inactive CONSTANT VARCHAR2 (1): = 'I ';

    FUNCTION get_const_yes RETURN VARCHAR2;

    ...

    END;

    /

    CREATE or REPLACE PACKAGE BODY cls_vars AS

    FUNCTION get_const_yes RETURN VARCHAR2 IS

    BEGIN

    RETURN const_yes;

    END;

    ...

    END;

    /

    Kind regards

    Zlatko

  • Error in the application using emulator ripple of packaging

    Hello everyone, I'm on emulator running continuous for the packaging of the app for blackberry help SDK Blackberry Webworks 2.3.1.5 7os.

    When I click the package button I get error as follows:

    Build request failed with the message: error: ENOENT, remove the link "C:\Documents and Settings\AtikJ\RippleSites\HelloWorld\PKG\HelloW.zip".

    So please suggest me some solutions...

    Thanks for your reply...
    My machine is computer 32-bit... Also I use JDK 1.7...

    I solved this problem...
    It must specify the path of our webworks SDK in the option settings of the emulator of the ripple.
    So avoid all space charater in the path of the SDK...
    for example c:/Program Files / Research In Motion /... is not valid.

    c:/ResearchInMotion/BlackberrySDK2.3.1.5... This is correct.

    Another thing I've done is in the bbwp.properties file located in the webworks SDK bin directory... I've provided the correct path of the JDK. Also I put environment variables.

    After completing these steps cod and alx files are generated.

  • BSoD - error DRIVER_OVERRUN_STACK_BUFFER and chart use disc in the Task Manager showing constant 100% graphic

    All of sudden it began to show "BSoD - error DRIVER_OVERRUN_STACK_BUFFER" and while the system is turned on, it displays "chart use disc in the Manager of tasks showing constant 100% graphic.

    Friends, this is

    IT HAS THE FILE INFO MINIDUMP AND ZIPPED SYSTEM.

    Please go through it and help me friends :(

    SkyDrive link: https://onedrive.live.com/redir?resid=3CFADFC6344DFA0A%21263

    It worked, thanks!

    All attached files of the DMP are the verification of bug DRIVER_OVERRAN_STACK_BUFFER (F7) .

    This indicates that a driver has saturated a stack-based buffer.

    A driver invaded a buffer based on the stack (or a local variable) in a way that would have replaced the function's return address and jumped to an arbitrary address when the function returned.

    2: kd > k
    Call child-SP RetAddr site
    fffff880 '192edc58 fffff880' 03da0f6e nt! KeBugCheckEx
    fffff880 '192edc60 00000000' WinFLAdrv + 0x3f6e 000000f7
    fffff880 '192edc68 00fff880' 6d2ebda0 0xf7
    fffff880 '192edc70 0000f880' 03da3019 0x00fff880'6d2ebda0
    fffff880 '192edc78 ffff077f' fc25cfe6 0x0000f880'03da3019
    fffff880 ' 192edc80 00000000 00000000 of ' 0xffff077f ' fc25cfe6

    WinFLAdrv.sys invaded a buffer based on the stack, so called bug control. It is a pilot

    associated with the Service of NewSoftwares.net WinFLAdrv.sys Application. Uninstall ASAP!

    Kind regards

    Patrick

  • I have photoshop cs6 and want to use the patch tool, but I can't find it anywhere in my program. I tried to download the latest updates, but I'm still not. Fix function is supposed to be part of the package CS6?

    I have photoshop cs6 and want to use the patch tool, but I can't find it anywhere in my program. I tried to download the latest updates, but I'm still not. Fix function is supposed to be part of the package CS6?

    Hello Mojo,

    Please right-click on the Spot Healing Brush, and you should be able to see the patch tool.

    Kind regards

    Tanuj

  • I use a mac and would like to buy the package of Lightroom.  I had the trial and it was fine.  I was enrolled in the Belize and I get an error message saying that the country is not supported.  In the United Kingdom, I changed my region and I still get th

    I use a mac and would like to buy the package of Lightroom.  I had the trial and it was fine.  I was enrolled in the Belize and I get an error message saying that the country is not supported.  In the United Kingdom, I changed my region and I still get the same error message?

    Hello

    Try to subscribe through pricing and membership creative cloud plans | Adobe Creative Cloud

    Hope that helps!

    Kind regards

    Sheena

  • If I subscribe to the applications Adobe CC everyone (students and teachers), how many computers can I use the package on?

    If I subscribe to the applications Adobe CC all (students and teachers).

    How many computers can I use the package?

    Please check the FAQ - Licensing FAQ: can I install Creative Cloud on several computers?

    Thank you

    Bev

  • I ordered and paid an annual ADOBE PDF PACKAGE that is scheduled to expire April 2016. But I can't use any more the pack, it's just contractually or is an abuse of the COMPANY ADOBE?

    I ordered and paid an annual ADOBE PDF PACKAGE that is scheduled to expire April 2016. But I can't use any more the pack, it's just contractually or is an abuse of the COMPANY ADOBE?

    Hi renzov75729811,

    Is there an error message?

    Make sure that you use the last DC of Adobe Acrobat Reader Acrobat Reader DC Learn & Support to use Adobe PDF pack or attempt to use the service online at https://cloud.acrobat.com/

    Kind regards

    Nicos

  • I am trying to download acrobat pro dc creative use of clouds packer. It fails every time. It seems like PAC and do the package, but then when I try to install (acrobat pro dc) nothing happens. Installation starts but there is no dc pro acrobat installs

    I am trying to download acrobat pro dc creative use of clouds packer. It fails every time. It seems like PAC and do the package, but then when I try to install (acrobat pro dc) nothing happens. Installation starts but there no acrobat pro CD is installed.

    Hi Pavle,

    The installer for Acrobat is different from the rest Cloud Creative applications that is why when you create a package by using Creative Cloud Packager, there are two folders created:-

    (1) build-->> all upward for all Applications of Cloud Creative except Acrobat.

    (2) exceptions-->> Contains for Acrobat and the Muse.

    You will need to install Acrobat first through the Exceptions folder. Select the option to install as a trial or a subscription.

    Then install the creative rest of Cloud applications through generation file, it will install the applications and your copy of Acrobat license also.

    I hope this helps!

    Thank you

    Tanvi

  • Hello, I bought the package creative cloud for a month, had a complete trial version. Already move forward payment, but I use coudnt (how can I instal)

    Hello, I bought the package creative cloud for a month, had a complete trial version. Already move forward payment, but I use coudnt (how can I instal)

    Hi Victoria,.

    Please check the help below document:

    Applications creative Cloud back in test mode after an update until 2015 for CC

    Kind regards

    Sheena

  • Hi.Downloaded Elements13. Try to run it, the downloaded package is 32-bit, but it tells me that I need 64-bit. When I downloaded the package, it does not offer an option... I am also frustrated that had produced 8 weeks now and can't use it

    Try to download 13 items. But the package loads 32bitand when I try to install it says I need 64-bit... When you download the package I cannot find the options for flow rates.

    Download and install the 64-bit PES 13.

    Available downloadable Setup files:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

    window using the Lightroom 3 link to see these "important Instructions".

Maybe you are looking for