Copying Packaging Spec

When I am copying packaging spec, the fields  'Category', 'Sub-Category' & 'Group' are getting copied over, however the fields under 'Available UOM', 'UOM Conversions' and Cross Reference' are not getting copied, whether I choose to keep the copied Spec linked to the Template or not. [Both the Spec copied from and the Template used has those UOM/Cross reference fields defined] . Aren't those UOM/Cross reference fields suppose to be copied over to the new Spec?  When I create a new Spec from Template, system brings over all fields [UOM/Cross reference etc.] from Template, so I was expecting the same behavior while copying too, since I am linking to the Template during the copying process. Can someone shed some light on this issue please?

I believe that the functional use cases are different. When you are copying from a Template, you are not copying a real existing specification - rather, you are creating a spec with values that should be there by default. These values from a template are typically not meant to be specific to one single specification, but rather to a grouping/classification of specs. Perhaps a Beverage type specification, created from a Beverage template, would have certain Available UOMs that a Sauce specification would not. Cross References on a template may be used for pack size purposes, which may also be specific to a template.
When you copy an existing specification, the assumption is that the specification is linked to some external system(s) using the cross references - if those were copied over, you could have an possible discrepancy. Also, since you are doing a copy and not a new revision, we assumed the UOM info would be different so is is cleared out.

Similar Messages

  • Problem with "Package Spec" please help.

    Hello once again.
    I'm developing a master-detail form, so I'm using a "Package Spec" variable to hold the primary key value from the master form. The primary key value for the master is generated by a sequence.
    Here's the package spec:
    PACKAGE primary_keygen IS
    pkey varchar2(15); 
    END;Now the master table has the following "Before Insert" Trigger .
    CREATE OR REPLACE TRIGGER MASTER_NUM_GEN
    BEFORE INSERT
    ON MASTER
    FOR EACH ROW
    DECLARE
    primary_key_value varchar2(15);
    BEGIN
    select lpad(to_char(ref_gen.nextval), 4,'0')
    into primary_key_value from dual;
    primary_keygen.pkey:='ABC/'||primary_key_value;
    :new.Ref_Number:=primary_keygen.pkey;
    END;For the detail block. I have the following "Before Insert Trigger" to generate the primary key values.
    CREATE OR REPLACE TRIGGER DET1_NUM_GEN
    BEFORE INSERT
    ON DETAIL1
    FOR EACH ROW
    BEGIN
    if :new.M_ref_number is NULL THEN
    :new.M_ref_number:=primary_keygen.pkey;
    ENd if;
    END;Works quite fine if I have only one detail block. But if I have multiple detail blocks. Depending on the user's selection. i.e. After entering data into the master block, the user selects a detail block ('Letter type'- using stacked canvases for this purpose and radio buttons for selecting the view) and then Inserts data into it. here's what I do in the Detail block2.
    CREATE OR REPLACE TRIGGER OREF_NUM_GEN
    BEFORE INSERT
    ON DETAIL2
    FOR EACH ROW
    BEGIN
    if :new.O_ref_number is NULL THEN
    :new.O_ref_number:=pkey_gen.master_key;
    ENd if;
    END;Now the problem is that When I enter one record into detail1, works fine, but for the second time, when I try to insert another record. the master table gets a new reference number (primary key value) while the detail block gets the previous value that was used in the first record!, so that means 'pkey_gen.master_key' is holding the old value, while in my opinion it should hold the new value, I dont know whats wrong here. If I try to insert two consecutive records into the same detail table, I get an error saying "Unique Constraint voilated", becuase the variable is holding the old values.
    And lastly after it inserts the record into the database, I get a dialog box saying, "successfuly inserted 2 records into the database" and when I click ok, the Form closes by itself, any ideas on how to stop this?
    I'm really stuck here. Please help me out on this.
    Thanks.
    Note: I'm using Form6i with Database 10g.
    Message was edited by:
    fahimkhan82

    Hi,
    Maybe the best way to start is to try building a new form from scratch. For simplicity I will assume that you have one master and one detail table. Master table has a primary key and the detail table has a foreign key to the master. Based on this, with the forms you can create a database block based on your master table. Use the wizard. Again using the wizard, create a second block based on the detail table. You'll see a screen to prompt to create a relationship. Create one by selecting the master table and the right foreign key relation. Now take a close look to all triggers automatically created by the form. Also check the "Relations" object found in you master block object tree. Note that the foreight key column in the detail table has the "Copy Value From Item" property set to monitor the master block's primary key.
    This is the basic. You don't need the database triggers, except (in case you want to insert through, say, SLQPlus) the one for the master table, which will look like this:
    CREATE OR REPLACE TRIGGER MASTER_NUM_GEN
    BEFORE INSERT
    ON MASTER
    FOR EACH ROW
    BEGIN
    IF :new.ref_number IS NULL THEN
    select 'ABC/'||pad(to_char(ref_gen.nextval), 4,'0')
    into :new.ref_number
    from dual;
    END IF;
    END;
    Now you have to take care about the inserts in your form. Create PRE-INSERT trigger on the master block.
    IF :master.ref_number IS NULL THEN
    SELECT 'ABC/'||pad(to_char(ref_gen.NEXTVAL), 4,'0')
    INTO :master.ref_number
    FROM dual;
    END IF;
    Run the form and explore different situations to see how the form is keeping the data integrity.
    Compile with Shift+K (incremental). Sometimes forms blow just because not all of the trigers were compiled properly.
    Hope this helps...

  • Saving package spec and body

    In previous versions of SQL Developer, there was always an All Files option in the dropdown when saving package spec and body. Now we're using the latest version 3.1.07.42 and the only option available is to save as a .pls extension. We do not use .pls files in our system, and it's annoying to have to save as .pls and then copy the code into another file. Does anyone know a way around this, and also why Oracle has put such a restriction on the save function?

    Hi,
    Welcome to the forum. This behavior of the chooser UI for Save Package Spec and Body changed between 3.0 and 3.1, mostly for the better, I assume, except perhaps for the issue on which you comment. In general, I believe there was an effort to make the user experience more consistent across the product when opening or saving files.
    Checking this area in the code line up next for release, I see that pls and sql are the file extension choices, but not all files. Will that help?
    Regards,
    Gary
    SQL Developer Team

  • Edit Package/Spec Body missing from browser

    v1.1.0.23 It seems I now have to open package specs and bodies independently. The prior version let me open both at the same time. Can this be added back in?
    Thanks

    Thank you for the effort. There are still informal steps. Here is refined test:
    7. Save is successful to package_a.sql
    7a. wait one minute
    7b. copy file package_a.sql with OS command
    7c. witness copy_of_package_a.sql having later timestamp
    7d. edit copy_of_package_a.sql to have easily identifiable content
    8. Modify package body, recompile
    9. Repeat steps 4-5-6, only change select package_a.sql name to overwrite the file with new code
    I don't understand what you are saying here, don't you want to keep fine name and location the same?
    Or you have meant that the first time around you had to input filename, and this time you just have choosen it?
    10. SQLDEV claims save is successful (it says the same thing in 'File - log' tab as well.
    11. Start windows explorer, navigate to 'Scripts' folder, sort files by last modified time descending.
    12. I can see that some other existing file was overwritten because
         a. it has a timestamp later than 'package_a.sql'
    and
        b. the randomly modified file has the new code for package_a in it, existing package_a is left as is.
    I see intact copy_of_package_a.sql and modified 'package_a.sql

  • Wants Some Help About Package Spec

    Hi Friends,
    I developed one package spec in my Report.
    It has around 40 Ref Cursors.
    I created 40 Functions for those Ref Cursors.
    Right now all are in my Report at client end.
    At present the performance is very slow.
    Can i maintain these Package spec & Functions
    in data base side? If possible how ?
    If i maintain like that my performance is
    increases or not?

    You should be able to move those to the server. Read Chapter 6 in Oracle Report Documentation. Just click on topic "Documentation" on your left to find documentation on report.

  • Schema name not present on filename for "Save Package Spec and Body"

    In versions previous to 3.0 EA, the filename defaulted to schema.object.sql when using the "Save Package Spec and Body" on the right click of the package/body. This appears to have disappeared. Also, it now defaults to the .PLS ext/type, which I prefer to save them as .SQL (which i can override, but it would be nice in the file type dropdown). Also, I had posted a suggestion about the actual file not including the schema name prefixing the object name when using the "Save Package Spec and Body". i.e. it does create or replace package reader_package instead of what it should be doing which is create or replace package schema.reader_package

    Would be nice indeed having the real name as default, and all supported PL/SQL types (as in the preferences) in the extensions dropdown.
    As for the schema name inside, I reckon that would do damage for more users than it would do good for others. But a preference would be best of course.
    K.

  • Error while using Copy Package

    Hi,
    I want to copy data from category BudgetV1 to BudgetV2,
    I have tried to use Copy Package but I always get error with
    error message "The file is empty".
    Can anyone help me with the problem?
    Thanks in advance.

    Hi,
    Please check if you have data in category BudgetV1. This error normally occurs when there is no data in source specified in COPY package. Make sure to select appropriate members when you specify other source dimensions.
    Hope this helps.
    Regards,
    Shoba

  • Error data file is empty in standard Copy package

    Hi,
    We have an appset that consists of four applications and we can't successfully run Data Manager Copy package in one of them. It launches the following tasks: Dump, Convert (execution fails in this step with error "Data file is empty") and Load. SSIS configuration in BIDS is defined by default and we haven't set any parameter.
    We have figured out this error appears when we select any member of a dimension in "COPYMOVEINPUT" prompt except for Time dimension. Previously there was a custom Copy package based on standard BPC and it only filters by Time dimension. Perhaps this error is related to application configuration to run custom package.
    We show code:
    INFO(%TEMPFILE1%,%TEMPPATH%%RANDOMFILE%)
    INFO(%TEMPFILE2%,%TEMPPATH%%RANDOMFILE%)
    TASK(DUMP,APPSET,%APPSET%)
    TASK(DUMP,APP,%APP%)
    TASK(DUMP,USER,%USER%)
    TASK(DUMP,FILE,%TEMPFILE1%)
    TASK(DUMP,SQL,%SQLDUMP%)
    TASK(DUMP,DATATRANSFERMODE,2)
    TASK(CONVERT,INPUTFILE,%TEMPFILE1%)
    TASK(CONVERT,OUTPUTFILE,%TEMPFILE2%)
    TASK(CONVERT,CONVERSIONFILE,%CONVERSION_INSTRUCTIONS%)
    TASK(LOAD,APPSET,%APPSET%)
    TASK(LOAD,APP,%APP%)
    TASK(LOAD,USER,%USER%)
    TASK(LOAD,FILE,%TEMPFILE2%)
    TASK(LOAD,DATATRANSFERMODE,4)
    TASK(LOAD,DMMCOPY,1)
    TASK(LOAD,CLEARDATA,%CLEARDATA%)
    TASK(LOAD,RUNTHELOGIC,%RUNLOGIC%)
    TASK(LOAD,CHECKLCK,%CHECKLCK%)
    Any variables as %CONVERSION_INSTRUCTIONS% aren't defined. Is it a system constant?
    Thanks.

    Hi Roberto,
    Thanks for having a look at my question.
    We're using .act files to upload data from SAP BW into SAP BPC.
    This is the content of  .act file that I'm trying to upload:
    ACTUAL
    1
    1
    GCN.CZN,2621.LC_.EUR,100.5000
    GCN.CZN,2621.TC_.CZK,7050.0000
    Transformation file looks like:
    Conversion files are:
    Time:
    Category:
    Entity:
    Counterpart:
    RCCinterco:
    IntercoCurr:
    Transcurrency:
    In case of any other info needed, please let me know.
    Thanks a lot in advance,
    Wai Yee Kong

  • Standard BPC Copy Package Fails

    Has anyone experienced the standard copy package failing in BPC?  I get the error message: 'Object variable or With block variable not set'.

    I tried to submit data via an input template and received the same error (Object Variable or With block variable not set).  I checked the security and the ID has all functionality access.  The member is a base member.  I also had the server rebooted and still no luck.
    Below is the detail log of the copy pkg:
    TOTAL STEPS  3
    1. Dump:           completed  in 3 sec.
    2. Convert:        completed  in 3 sec.
    3. Load:           Failed  in 2 sec.
    [Selection]
    CLEARDATA= No
    RUNLOGIC= No
    CHECKLCK= No
    (Member Selection)
    Category: ACTUAL
    Time: 2006.JAN
    RateSrc:
    Rate:
    InputCurrency: 
    (Destination Member Selection)
    Category: ACTUAL
    Time: 2007.JAN
    RateSrc:
    Rate:
    InputCurrency: 
    [Messages]
    Object variable or With block variable not set

  • Report cannot access pl/sql table variable defined in Package Spec.

    Hi,
    I've created a package spec called pkg_report with a PL/SQL table variable defined called body_text_table. When I tried to compile the following code under the Before Report trigger:
    :desc := pkg_report.body_text_table(1);
    Oracle gave me the following error:
    Implementation Restriction: 'PKG_REPORT.BODY_TEXT_TABLE': Cannot directly access remote package variable or cursor.
    Does anyone have any idea about this error? Thank you for your time at looking at it.
    Regards,
    John

    You cannot directly access the package variable in a database package. The work around is to create a set_variable and get_variable wrapper function in the package body. See Metalink note 105838.1 for more info.
    A simple example:
    create or replace package my_package as
      my_var     number;
      function   get_variable return number ;
      procedure  set_variable (p_value in number) ;
    end ;
    create or replace package body my_package as
      function get_variable return number is
      begin
        return my_var;
      end ;
      procedure set_variable(p_value in number) is
      begin
        my_var := p_value ;
      end ;
    end;

  • COpy Package not working as it should in BPC V 5.0

    Problem:-
    When I choose Replace and Clear Data Values, it merges them .. I have run it few times and each time the data was duobled.
    When I chose, Merge Data Values, it cleared and the numbers !!. 
    Possiable Cause:-
    The function seems to be working in reverse order, Could this be bug in the SAP BPC v5.0?
    If any of you have any idea how to fix this, I would appreciate it.  Thanks.
    Sam

    Hi Sam,
    Check the modify script for the copy package by going to modify package, view script and advanced tab.
    In script, in the prompt comand, '0' should be assigned to Merge data values and 1 to clear data. If it is in reverse order, change it and save it back.
    Note that if you are using sql 2005, you can directly modify the script, if it is 2000, you need to modify the EVmodifyscript task in the DTS assigned to Copy package.
    Hope this helps,
    Kranthi

  • Bug SQL Developer 3.0.04 Save Package Spec and Body to ips file bug

    Hi.
    I have problem with export package body end header. Exported ips file have some rows switched compared to original source code.
    SQL Developer version: 3.0.04. Build MAIN-04.34
    Error simulation:
    - Click on package header with right mouse button in SQL Developers Connections bar
    - In context menu choose 'Save Package Spec and Body...'
    - Save ips file... (Small bug: Offered file name is wrong (= last saved package/file, not actual name of package) :-( )
    - This file(source code) compare with original source code in Developer and u will see switched rows every +-90. row in source code.
    Can u fix this in next version of SQL Developer?
    Thanks...
    Edited by: 880809 on 22.8.2011 6:57

    Bug 12904494 has been created.
    Michael

  • Split a PL/SQL Package Spec and Body

    I hope this was not discussed in some other thread somewhere (haven't found it), but my problem is:
    How to split the Package Spec and Package Body in JDeveloper if you want to have both (for database deployment) as files in e.g. a subversion repository?
    The problem arises if you have a couple of packages that are dependent on each other, so that you have to deploy the specs first to have the "public" part in place and afterwards the bodies to define the package functions/procedures.
    Is there a way to do this?
    TIA.
    --Ciao, FD.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    If you want to store for example the package "mypackage" source code in a subversion repository
    one possibility is to define 2 svn files:
    - mypackage.pks (which contains the package "specification") and
    - mypackage.pkb ( package "body").
    I haven't tried this from JDev 11.2 but it works for example when using a single-user
    svn repository from Sql Developer 2.1.1. ( in SQL Dev if you specify a database
    connection you can compile the file based pakage specification and after then the
    package body ...)
    Regards
    user_alex

  • How to retreive contents of package spec and body over jdbc

    is there a query i can issue that would return the contents (both spec and body) of a database package? similar to "desc schema.pkg" ?
    i want to issue this query via jdbc and get back the contents of the package spec/body.

    solved:
    select * from user_source where name='my_pkg'
    Message was edited by:
    user612126

  • Can we declare a Cursor in Package Specs?

    Dear buddies
    Can I Declare a Cursor in Package Specs so that I can call that cursor and use its data in some procedures and functions of package. Otherwise I've to write that cursor for every sub-program of a package which I don't feel a smart way to accomplish the job.

    Hi,
    here is a short example with the whole way down. Maybe the concept is getting clearer with this:
    first of all, if you do not have the table emp, here the DDL for this example.
    Be carefull, works only for german clients because of the names of months, sorry for that.
    CREATE TABLE EMP
    (EMPNO NUMBER(4) NOT NULL,
    ENAME VARCHAR2(10),
    JOB VARCHAR2(9),
    MGR NUMBER(4),
    HIREDATE DATE,
    SAL NUMBER(7, 2),
    COMM NUMBER(7, 2),
    DEPTNO NUMBER(2));
    set echo on
    INSERT INTO EMP VALUES
    (7369, 'SMITH', 'CLERK', 7902,
    TO_DATE('17-DEZ-1980', 'DD-MON-YYYY'), 800, NULL, 20);
    INSERT INTO EMP VALUES
    (7499, 'ALLEN', 'SALESMAN', 7698,
    TO_DATE('20-FEB-1981', 'DD-MON-YYYY'), 1600, 300, 30);
    INSERT INTO EMP VALUES
    (7521, 'WARD', 'SALESMAN', 7698,
    TO_DATE('22-FEB-1981', 'DD-MON-YYYY'), 1250, 500, 30);
    INSERT INTO EMP VALUES
    (7566, 'JONES', 'MANAGER', 7839,
    TO_DATE('2-APR-1981', 'DD-MON-YYYY'), 2975, NULL, 20);
    INSERT INTO EMP VALUES
    (7654, 'MARTIN', 'SALESMAN', 7698,
    TO_DATE('28-SEP-1981', 'DD-MON-YYYY'), 1250, 1400, 30);
    INSERT INTO EMP VALUES
    (7698, 'BLAKE', 'MANAGER', 7839,
    TO_DATE('1-MAI-1981', 'DD-MON-YYYY'), 2850, NULL, 30);
    INSERT INTO EMP VALUES
    (7782, 'CLARK', 'MANAGER', 7839,
    TO_DATE('9-JUN-1981', 'DD-MON-YYYY'), 2450, NULL, 10);
    INSERT INTO EMP VALUES
    (7788, 'SCOTT', 'ANALYST', 7566,
    TO_DATE('09-DEZ-1982', 'DD-MON-YYYY'), 3000, NULL, 20);
    INSERT INTO EMP VALUES
    (7839, 'KING', 'PRESIDENT', NULL,
    TO_DATE('17-NOV-1981', 'DD-MON-YYYY'), 5000, NULL, 10);
    INSERT INTO EMP VALUES
    (7844, 'TURNER', 'SALESMAN', 7698,
    TO_DATE('8-SEP-1981', 'DD-MON-YYYY'), 1500, 0, 30);
    INSERT INTO EMP VALUES
    (7876, 'ADAMS', 'CLERK', 7788,
    TO_DATE('12-JAN-1983', 'DD-MON-YYYY'), 1100, NULL, 20);
    INSERT INTO EMP VALUES
    (7900, 'JAMES', 'CLERK', 7698,
    TO_DATE('3-DEZ-1981', 'DD-MON-YYYY'), 950, NULL, 30);
    INSERT INTO EMP VALUES
    (7902, 'FORD', 'ANALYST', 7566,
    TO_DATE('3-DEZ-1981', 'DD-MON-YYYY'), 3000, NULL, 20);
    INSERT INTO EMP VALUES
    (7934, 'MILLER', 'CLERK', 7782,
    TO_DATE('23-JAN-1982', 'DD-MON-YYYY'), 1300, NULL, 10);2. Package Spec:
    create or replace
    package test_cursor as
      --Type for the returncode of the function
      TYPE typ_emp IS TABLE OF emp%rowtype;
      --Array for fetching, of course also possible in the body
      t_emp typ_emp;
      --function wich returns the array from fetching the cursor
      function get_emp return typ_emp;
      --function for manupilation data retrieved by the function
      PROCEDURE man_emp;
    end test_cursor;3. Package Body
    create or replace
    package body test_cursor as
      FUNCTION get_emp RETURN typ_emp AS
      cursor c_emp is select * from emp;
      BEGIN
        open c_emp;
        fetch c_emp BULK COLLECT INTO t_emp;
        CLOSE c_emp;
        --t_emp returns the whole table set from emp
        return t_emp;
      end get_emp;
      PROCEDURE man_emp AS
      --just for not confusing names, is the same as t_emp of course
      v_emp_array typ_emp;
      BEGIN
        --call the function and retrieve the whole data set
        v_emp_array := get_emp;
        --now manipulate the data, in this case just write the names to the calling client
        FOR rec IN v_emp_array.FIRST .. v_emp_array.LAST
        loop
          dbms_output.put_line(v_emp_array(rec).ename);
        end loop;
      end man_emp;
    end test_cursor;4. Calling the procedure
    SET serveroutput ON
    exec test_cursor.man_emp;5. And this is the result:
    anonymer Block abgeschlossen
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLERPlease be aware, this is just for demonstration purpose, of course it makes no sense to display the names this way. But how to call a funktion returning arrays with datasets from fetching cursors is shown here.
    Hth
    Joerg

Maybe you are looking for

  • Logic based on Date on Selection-Screen

    Dear friends, I've been writing a report in which I have the date field on selection-screen. By default I have been displaying the system date on the selection-screen. The reqiurement is that the user cannot execute the code for a date in past (less

  • Purchase value + tax details

    hi gurus Through which t code i will get purchasing value + applicable tax ammount. Reg. Roc

  • Online redo logs vs backup

    Below quoted sentence is from Oracle documentation "Online redo logs, unlike archived logs, should never be backed up. The chief danger associated by having backups of online redo logs is that you may accidentally restore those backups without meanin

  • How to extend data viewing for LCHR

    Hi all I have one field of a table which using LCHR data type. I want to view the whole data in the field. However currently SAP truncated to partial char only for viewing with message "Field Generic structure is too wide to display (field will be tr

  • About Flex Builder3 File Search.

    1.In Flex Builder3 's menu -- Search , I only can see two items: declarations and references. But when I press Ctrl+Shift+F, then pop File Search window. Forget menu ?? 2.In File Search window, press Search button, then perspective change to DataBase