Need to duplicate the package through code

I am about to update the package body. I don't have direct access to the database. However, there will be a dba that will be running scripts for us. I can't be sure that the script in Production is the same as the script that I am sending. Towards the idea of disaster recovery, I'd like to duplicate the script and rename it 'script_name_BAK'.
I know that I can do this by copying the script and renaming it. Since I don't have that access, can I send over a script that will do as I need?
Also, when I query the script, it cuts off so-many characters to the right (maybe 80). I'm hoping that making a copy of the script doesn't have the same deficiency. Will it?
thank you.
daniel

Here's a very basic, but working, approach to dealing with source code versioning of packages.
Suffix a basic version number to the package name. So if your package is called MonthEndInvoicing, then version 1.00 of the package will be called MonthEndInvoicing_v100.
A synonym called MonthEndInvoicing provides the resolution scope - and results in code using this synonym to call v1.00 of the package.
A new update is made to the package and the new package is called MonthEndInvoicing_v110. This can be build (installed/created) while v1.00 of the package is in use (and shared locked).
To enable the v1.10 as the version to use, the synonym MonthEndInvoicing simply needs to be recreated to point to the new package.
To rollback the v1.10 upgrade, the synonym MonthEndInvoicing simply needs to point again to the previous version's package.
The advantages of the simplistic approach are that you do not overwrite the existing package version, you do not need an exclusive package lock to replace the existing package version, and that you can rollback to the previous package version easily.
In 11g, there is a new feature called edition based redefinition - that addresses this issue in a significantly more comprehensive manner. (it also addresses changes to tables and so on at the same time)
IMO, the above approach should be a serious consideration in the type of environment you are finding yourself in, and facing the risks of not exactly knowing what version of code is in production and what version of code is being used.

Similar Messages

  • Assign theme to the user through code

    Hi,
       I need to create the personalize component through which we can assign theme to the user(changing theme). can anyone give solution for assigning theme to the user through code.
    Regards,
    Shanthakumar.

    Hi Shanthakumar,
    Here's a document for creating portal desktop and display rule
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e549a890-0201-0010-3f8b-d3b852457ebd
    You can create a display rule for a portal desktop depending upon the group. Through code you can add the required users to this group.
    Hope this helps resolve your issue.
    Regards,
    Seema Rane.

  • Need to load the data through excel for plan data through IP?

    Hi all,
    The user needs to load the data through the excel and click on the save button so that the data is saved in the cube through integrated planning.
    The objects used are
    customer, material, plant, calendarmonth sales qty, gross billing!!
    Can anyone pls let me know how to do this?
    Thanks

    Hi,
    You can use the following How to guide to load data from file into transactional cube.
    If using IP :
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90cef248-29e0-2910-11bb-df8dece7e22c?quicklink=index&overridelayout=true
    Can also Refer to Marc's Blog:
    /people/marc.bernard/blog/2007/11/25/how-to-load-a-file-into-sap-netweaver-bi-integrated-planning-part-1
    If you are using bPS you can get the details in Wiki also for the same.
    You can then create the hyperlink in Excel ,which user can use to upload data which can then be saved to cube using save button.

  • Do you need to sync the iPhone through iTunes if you sync over the air?

    Do you need to sync the iPhone through iTunes if you sync over the air?
    My MacBook Pro and iPhone 3G with OS 4 synchronize with each other over the air through my Snow Leopard Server. Though when I connect it to iTunes I see that it allows me to checked "Synchronize with this computer" type options and I'm confused as to why that would be if they're synchronizing over the air.
    Can someone help clarify when those should be checked? Because I do want everything that's on my computer synchronized with my iPhone and vice versa, but if I add the accounts on my phone manually that seems to work too.

    In regards to syncing contacts and calendar events, if you are syncing this data over the air on your iPhone and the contacts and calendar events synced over the air on your iPhone match the Address Book and iCal data on your Mac, there is no reason to sync this data direct with the Address Book and iCal on your Mac via the iTunes sync process.

  • Need to run the package

    Hi friends,
    i need to run a package which will send a mail as soon after it runned. I have a package. But i need to run that package for each and every 10 min in a day. For that how i can create a job to execute that package.
    As a result of the job for each and every 10 min ill be receiving a mail. How to create a job to execute my package for every 10 min.
    Regards,
    Mini

    Hi srikanth and hoek,
    Thanks for your reply.
    i dont know why the job is not running and executing the package.
    if i compiled the package separately means, i can able to execute it successfully and also im receiving mails correspondingly.
    begin
    it_check_overdue_issues.email_overdue;
    end;But if i tried to execute the above package using a job means, it is not running corresponding to the time and also not receiving emails. This is my DBMS_JOB query that i used, it is compiling successfully without errors, but not working what is wrong with it.
    DECLARE
        jobno number;
    BEGIN
        DBMS_JOB.SUBMIT(
            job => jobno,
            what => 'BEGIN it_check_overdue_issues.email_overdue; END;',
            next_date => SYSDATE,
            interval => 'SYSDATE + (2/1440)');
        COMMIT;
    END;Regards,
    Mini

  • How to find references of a Property in the class through code? similar to 'Find All References' in Visual Studio Environment.

     Hello,
    I am trying to find a code to find all the references of the property defined in a class which is very similar to 'Find All References' function available in Visual Studio environment. But I want to have it in code during run time. How to do it?
    e.g 
    =>Property 1
    private int _Salary;
    public int Salary()
    get{return _Salary;}
    set{_Salary = value;}
    => Property 2
    private int _Bonus;
    public int Bonus()
    get{return Salary * 2;}
    Like in the above example I have two properties Salary & Bonus. Bonus is calculated from salary. As soon as I set a value to Salary, value of Bonus gets updated. 
    Similarly I want to get reference of all other properties or methods in the class or program which are affected when value of Salary is changed through code. 
    Conclusion - I want to have a method or function, so that whenever I set a value to some property in a class, I want to have a list of all the other properties(List<Property>) or methods which are affected and in which the changed property is referenced.
    Please help me to achieve this.
    Siddharth.Shinde

    This is not something possible, as requested, even with reflection.
    I can't find the reason for having that kind of implementation at runtime.. your compiled assembly is not going to change once it's compiled.
    The way references are listed from within visual studio is probably using metadata gathered from the background compiler. When you write code, the compiler run pre-compilation tests, this is the same feature that will display error in your code before you
    compile, or complete your intelisense for types that aren't even compiled in the assembly.
    So, the only way for you to analyze this kind of thing would be to use something like ILDASM to disasemble your compiled libraries and gather metadata from the resulting MSIL. That would not work if you are using code obfuscation by the way.

  • Infopath: Rules run before Code...So Can we close the form through Code?

    Hi,
    I have a form with a couple of buttons. Clicking on any of the buttons first executes the RULES and then jumps to execute the code in the FormCode.cs file for the button click event. However, if I have "Close the Form" as one of the Rules for the button, the code does not execute. So, is there a way that I can close my Infopath fom after executing the code instead of closing from the RULES? Also "The form has been closed" is the message which pops up after closing form through rules. Can we redirect to the form library instead of showing this message?
    I tried to execute everything through code in FormEvents_Submit. It works fine if I have a single submit button. But how would i differenciate if there are multiple buttons like Approve, Reject etc.
    Thanks !

    Hi Aanu,
    Thanks for the reply.The proposed solution in the thread is to use;
    this.Application.ActiveWindow.Close();
    or
    thisXDocument.View.Window.Close(true) in order to close the form.
    Both of them don't work when I try to use them in Visual Studio. It complains of a missing namespace.
    Did this approach work for anyone?

  • Tool needed for creating the package structure

    I need to create a package structure of an existing application. I don�t know much of UML and so I was just wondering if there's any tool available to do so.I researched and came to one such tool(not free to use) i.e
    http://javacentral.compuware.com/pasta/
    Please let me know if you guys know of something similar to this.
    Thanks

    No. There should be an option to 'import java sources' somewhere in the 'file' menu (I think). Unpack the WAR. You will need to locate the JAVA source files, and then import from ArgoUML. The classes will all come in. You simply have to drag which ones you want onto the applicable blank diagram(s) you create.
    - Saish

  • For ESS - Travel ABAP WD do we need to deploy the Java WD code in the EHP

    We currently have ESS - Trips and Expenses Java WD version.  We are in the process of implementing the ABAP WD for Trips and Expenses. 
    According to the documentation at
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/46/95288c46f619ace10000000a11466f/content.htm
    if we turn on the Travel Management (FIN_TRAVEL_1) business function Java WD should stop working.  We turned on the business function but our Java WD is still working.  The buttons (Create Expense Report, Copy, Change, Delete, Display Form) on the My Trips and Expenses ABAP WD version do not work.
    We have not deployed the Java WD code that was in the EHP.  Is it required?
    Thanks.
    Edited by: Neha Thakkar on Apr 19, 2010 9:29 PM
    Edited by: Neha Thakkar on Apr 19, 2010 9:30 PM

    Hi^^,
    I have created the following servlet and added it to my project. Is this correct
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class NIUserLogin extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet
       static final long serialVersionUID = 1L;
       private ServletConfig config;
       public void init() throws ServletException {
            getServletContext().log("getinit init");
       // Get the value of an initialization parameter
       String value = getServletConfig().getInitParameter("CSUser");
       String value1 = getServletConfig().getInitParameter("PropFile");
       System.out.println("CSUser" + value);
       System.out.println("PropFile" + value1);
    }

  • Need help in Understanding synchronization through code

    I read someone that synchronization is suppose to allow only one thread to access a synchronized method or block of code. But then I wrote some code just to test it out.
    import java.util.ArrayList;
    import java.util.Vector;
    public class Testing extends Thread {
         private String someString;
         static Vector<Integer> someVec;
         static ArrayList<Integer> someArrayList;
         public Testing(String value) {
              someString = value;
              someVec = new Vector<Integer>();
              someArrayList = new ArrayList<Integer>();
         public static void main(String args[]) {
              Testing one = new Testing("one");
              Testing two = new Testing("two");
              one.start();
              two.start();
         public void run() {
              if (someString.equals("one")) {
                   for (int i = 0; i < 1000; i++) {
                        try {
                             someVec.add(i);
                        } catch (RuntimeException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
                        System.out.println("adding with " + i);
              } else
                   for (int i = 0; i < someVec.size(); i++)
                        try {
                             System.out.println("getting .. " + someVec.get(i)+ " from "+someVec.size());
                        } catch (RuntimeException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
    }Now my questions
    1. Why the 2nd thread is able to access the someVec ( Vector) when the 1st thread is still adding some values?
    2. When I changed someVec to someArrayList the result is still the same. I wonder why ?
    3. Lastly, Can anyone modify my code so only either a Vector or a Arraylist will make the program run without error ? Because right now I can run them both fine, so I don't see the difference.
    Thank you.
    Regards,
    Mustafa

    Vrijmetse wrote:
    1. Why the 2nd thread is able to access the someVec ( Vector) when the 1st thread is still adding some values?You have not added any synchronization around your Vector operations. Vector's individual methods are synchronized, but that only extends to the execution of those methods. There's no way for that syncing to know that you're doing stuff in a for loop. If you want to complete the for loop without anything else affecting that Vector, then you need a sync block around the body of the loop, and anything else that acceses the Vector must also sync on the same object. The Vector itself is a good candidate for the lock here.
    (There may be other problems as well. I haven't read your code closely. Just noticed the for loop and lack of syncing.)
    2. When I changed someVec to someArrayList the result is still the same. I wonder why ?Same reason.
    3. Lastly, Can anyone modify my code so only either a Vector or a Arraylist will make the program run without error ?No.

  • I need to find the Netflix activation code for NS-BRDVD3

    I bought this as an open box today and everything works great, but the Netflix has already been activated with someone else's account.  While it was fun for a while searching through their queue and their recently watched movies (they seem to like raunchy teenage sex comedies), I'd really like to set my account up on there.  Is there anyway to find out what the code is?

    There was not a netflix option under the Networking menu.  The first thing I tried was resetting the system to factory defaults, and it triggered the "try netflix" popup, but it kept the old netflix user's account in there.  Later (after tweeting with someone on twelpforce) I decided to try it one more time.  That time it deleted the old account and gave me the activation code.  So everything is great now.  Thanks for your help.

  • Saved Document Number needed after saving the customer  company code data

    I created a customer than I saved the company code data and forgot to note the number the saved document number. Next time I went to the same customer again and I wanted to find out the saved document number for the same customer but did not know where to look for. Can you tell me what I should do?
    Thanks

    Hi,
    For any customer there will be general data,Company code data and sales area data.
    Even though you maintain the general data or company code data  only one numebr will be generated.
    If you want to maintain some other data as comapny code data and sales area data we will goto XD02 and enter the company code,sales area nd customer number in the initial screen and we will maintain that data.
    I think you are thinking that different number will be created for different data which is wrong.
    So enter the same number and company code in XD03 and view your data.
    Regards,
    Krishna.

  • Need help with the following condition code

    Hi All,
    I am creating CreditMemo based on the open amount and I have option to create either up to 4 credit memo's or open amount is zero. When I create the CM initially then cmponum1 has to be updated in the table, for second CM cmponum2 has to be updated.
    The created CM number comes out from the function as 'Salesdocument'.
    The following code I wrote is working fine for CM1, if I have the CM2 then it is updating CMPONUM2 but update command is making CMPONUM1 as zero, so for CM3 as CM1 was updated as zero it is going to CMPONUM1 instead of CMPONUM3.
    Can some one please help me with this code.
    Thanks,
    Veni.
          DATA: zcmponum1  type zsdcoop-cmponum,
                zcmponum2  type zsdcoop-cmponum,
                zcmponum3  type zsdcoop-cmponum,
                zcmponum4  type zsdcoop-cmponum.
          If zsdcoop-cmponum1 is initial.
            zcmponum1 = salesdocument.
          elseif zsdcoop-cmponum2 is initial.
            zcmponum2 = salesdocument.
          elseif zsdcoop-cmponum3 is initial.
            zcmponum3 = salesdocument.
          elseif zsdcoop-cmponum4 is initial.
            zcmponum4 = salesdocument.
          endif.
          Update zsdcoop
          set
          cmponum1  = zcmponum1
          cmponum2  = zcmponum2
          cmponum3  = zcmponum3
          cmponum4  = zcmponum4
          where kunnr = zsdcoop-kunnr and pfnum = zsdcoop-pfnum.

    Hi All,
    This code solved my req.
          If zsdcoop-cmponum is initial.
            zcmponum = salesdocument.
            Update zsdcoop
            set cmponum  = zcmponum
            where kunnr = zsdcoop-kunnr and pfnum = zsdcoop-pfnum.
          elseif zsdcoop-cmponum2 is initial.
            zcmponum2 = salesdocument.
            Update zsdcoop
            set cmponum2  = zcmponum2
            where kunnr = zsdcoop-kunnr and pfnum = zsdcoop-pfnum.
          elseif zsdcoop-cmponum3 is initial.
            zcmponum3 = salesdocument.
            Update zsdcoop
            set cmponum3  = zcmponum3
            where kunnr = zsdcoop-kunnr and pfnum = zsdcoop-pfnum.
          elseif zsdcoop-cmponum4 is initial.
            zcmponum4 = salesdocument.
            Update zsdcoop
            set cmponum4  = zcmponum4
            where kunnr = zsdcoop-kunnr and pfnum = zsdcoop-pfnum.
          endif.
    Thanks,
    Veni.

  • OIC: Need to find the Source Code for the YTDSummary.java file

    Hi All,
    We have 11.5.10 implemention and we are using the OIC(Incentive Compensation) Application. In the Report Module for the Year-To-Date Summary we need look for the Java Source Code.The cnytdsum.jsp file call the YTDSummary.java file. We have teh following question
    1. How we can get the Java Source Code and where and which directory we need to look into?
    2. Let say if we need to customize the java file how we can do that?
    3. where and which directory we have to complie the java file?
    Highly appreciate for any pointers
    Thanks,
    Johnson.

    But those must be platform dependant, not really that
    interesting to look at. I have never felt any need to
    look at those at least.Wake up and smell the coffee, abbie! I read the source code all the time and constantly tell my students to do that, too.
    1. Java source code is not platform dependent. The original poster wanted to look at linked list code, how could that be platform dependent?
    2. It is the implementation of the SDK APIs, so by definition it is implementation dependent code, liable to change in a later version. So don't assume anything beyond what is claimed in the API documentation. However, sometimes the documentation is incomplete or ambiguous to you, and reading the source can provide some insight, however implementation dependent. (Light a candle or curse the darkness.)
    3. Why read source code? It's a good way to learn how to program. You see something in the API and ask: how'd they do that? Or you realize you want to do something broadly similar, but you can't reuse the source code.
    For example, Images are not Serializable, but suppose you want a small image that is part of an object to be serialized with the rest of the object without too much fuss (ie, without using javax.imageio). You notice ImageIcon is serializable, so you use it. (An ImageIcon has-an Image.) Then you wonder: how'd they do that? You read the source and then you know.
    You live, you learn,
    Nax

  • Need to duplicate "colorize" effect on adjustment layer, but did it the wrong way apparently...

    I'm designing a ring of fire for a client and have used -Image -Adjustments -Hue and Saturation to color my layers, which were originally just a dotted white ring. I then duplicated the layer and added an overlay lighting effect several times to get the result I was after. I am very satisfied with how it has turned out, as is my client. My problems lies in the fact that I now need to duplicate the exact colorizing and lighting effects on a word that has been manipulated to look as if it is also on fire. I didn't realize that when "coloring" this way there was no way to go back and see the values I used so that I could duplicate them later if necessary.. I have done a lot of reading, and now realize I should have used the adjustments pallete so that I could apply the same effect to other layers and be able to reuse it, but alas, it is too late for that. I REALLY don't want to have to spend all the time I spent redoing this to get to where I need to be. Any ideas? Please, and thank you in advance!
    -Jodi

    Hi Tom,
    In the other post I had asked about how to save an effect recipe to reuse in other clips.
    In this post I am asking is there a way to duplicate an effect (to have two instances of the effect) in a single clip.
    Thanks,
    matt

Maybe you are looking for

  • Passing a parameter to a report that appears to be ignored.

    I am using VS 2005 and Crystal Reports XI R2 The app I am working on allows users to either email a report as a PDF attachment or preview the report using a CrystalReportViewer. Users select a record number as the report parameter which the app feeds

  • Truncated variable names in solver

    when many variables are created in the solver , upon entering the numeric mode are not displayed correctly , only 1 character and then three points is read, making it impossible to identify which variable it is , for example if more than one starts w

  • JVM wars - MS vs. Sun

    When I test my plug-in at http://www.java.com/en/download/help/testvm.xml, it shows I'm using ver. 1.1.4 of the MS JVM. I've followed the instructions to upgrade by downloading the newest JRE 1.5.4, and checking the box in the IE Advanced Tab. Then t

  • INSERTING IMAGE TO DATABASE TABLE

    please suggest me the simplest code of image insertion in the database table.

  • Adding Modification Adjustment Transports to SPAM queue

    Hello; As part of my upgrade, I need to remove a table column as the upgrade to component SAP_APPL will re-insert it. However, if I remove it separately from the upgrade, the activation of the table removes the data - which needs to be kept. I've cre