Webdynpro - how to add global variables and common proj to existing proj

How to add global variable in either ViewController or CustomController.  We realise that codes must be added within the begin and end exction.  Codes outside that will be deleted when saved. 
How can we add a common WDP project to an existing project?  We have actually added a common wdp project at the project references screen.  But during runtime, we encouter error.  The error is classNotFoundException.  The class is the class created in the common project.

Hi.
I think you need to assign ProB to ProA.
Step1.
Open propety of ProjectA.
Step2.
Select WebDynproRefrences
Step3.
Select Sharing references
Step4.
Choose add button.
Step5.
If your projectA named "testapp" and you are not using
DC "local/testapp" is the proper name.
I hope that it work!!!.

Similar Messages

  • How can i find all global variable and parameters in a form?

    I don't know name of global variables and parameters,but i want get their name and value .
    how can i do? who can help me?
    Thank you.
    Daniel Liang
    2007.1.19

    no problem. As Francois said you can't do it programmatic in runtime.
    But when you use the debug-mode you can see each global with name and value.
    By the way: It's not good to not know all the globals in your application. This is one of the most important things you have to write down for your app. Create a wiki for such informations, so that all developer can share their information.

  • How do I store VI References in global variables and access them later

    From what I know, Labview automatically deletes VI references when they go out of use. Is there a way for me to override this so that I can access a set of preloaded references in a separate VI? Essentially I would like to open the VI's dynamically into the memory, store the references in global variables and access them at a later time. The VI's I'm referencing won't be known until runtime. I know its not the safest way to do it, but it would be the most productive on my end.
    Thank you
    Clay Upton

    I'm not sure what you mean by "a later time", but a VI reference will remain valid as long as the VI is in memory. If you don't unload the VIs, the references will remain valid.
    If you do need to unload the VIs, for whatever reason, I would suggest the following:
    Create a functional global as your interface for obtaining the references.
    Feed the paths to the VIs into the VI when initializing it (since you don't know which VIs in advance).
    When calling the VI to obtain the references, have the VI check them first (using the Not a Number... primitive). If it sees that they're invalid, it can open a new reference and return that.
    You should note that when a VI is removed from memory, the data space is used is released, so if those VIs are expected to hold data (using shift registers, etc.) this will be a problem.
    The description I've given will only be usable in certain instances (and it has its intricacies), but you didn't really give any details about what you're actually trying to accomplish.
    Try to take over the world!

  • Declare global variable and retrive?

    Hi,
    we are working in live project in webtool, we wants to create global variable,
    calling that variable in a required pages, our questions is that where to declare global variable and how to declare in which page we have to declare?   pls guide us its very urgent and send the code.
    Regards
    Kannan.D
    Edited by: kannan desikan on Jan 14, 2008 8:07 AM

    Hi Kannan,
    I would suggest using a comma delimied list or putting it in the database.
    ArrayList myList = new ArrayList();
    myList.Add("one");
    myList.Add("two");
    myList.Add("three");
    string comma = "";
    // store the array in the session state
    foreach (string s in myList){
      Session["persistedArray"] += comma + s;
      comma = ",";
    To get the array back
    if (Session["persistedArray"] != null){
      ArrayList myList = Session["persistedArray"].ToString().Split(new char[1] {','});
    If your array is storing objects, you should use the database.

  • How to change Global variable in the query

    Hi,
    I have 6 reports which is using 0PDT as a global variable and has single option as a property. Now I want to change this property and have multiple selection but I am not able to change its property.
    I am able to see all the filter variables from the query property and from there I am getting edit option to change but the "single selection" option is grey/disable which is preventing me to make change in this variable. Is there any way that I delete this variable and create a local variable which has date range option.
    This is affecting all my reports and all the report needs date ranges instead of single select option.
    Thanks,
    Shivani

    Shivani,
        You can change the restrictions with new variable(right click on required infoobject and choose restrict -->> choose variables -->> move existing variable from right to left and move  new variable. Then you can see only one variable.
    You can not delete any variable if is using in some queries.
    how to restrict:
    Srini<a href="http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a563fe09411d2acb90000e829fbfe/content.htm">Restricting Characteristics</a>

  • What's the difference between global variables and instance variables?

    hi im just a biginner,
    but what is the difference between these two?
    both i declare them above the constructor right.
    and both can access by any method in the class but my teacher said
    global variables are not permitted in java....
    but i don't know what that means....and i got started to confuse these two types,,
    im confusing.......
    and why my teacher said declaring global variables is not permitted,,,,,,
    why.....

    instance variables are kindof like Global variables. I'm not surprised you are confused.
    The difference is not in how they are declared, but rather in how they are used.
    There are two different "styles" of programming
    - procedural programming.
    - object oriented programming.
    Global variables are a term from Procedural programming.
    In this style of programming, you have only one class, and one "main" procedure. You only create one instance of the class, and then "run" it.
    There is one thread of control, which goes through various methods/procedures to accomplish your task.
    In this style of programming instance variables ARE "global" variables. They are accessible to all methods. There is only one instance of the class, and thus only one instance of the variables.
    Global variables are "bad" BECAUSE you can change them in any method you like. Even from places that shouldn't have to. Also if you use the same name as a global variable and a local variable, you can cause great trouble. This can lead to very subtle bugs, as the procedures interact in ways you don't expect.
    The preferred method in procedural programming is to pass the values as parameters to the methods, and only refer to the parameters, and local variables. This means that you can track exactly what your method is doing, and what it affects. It makes it simpler to understand. If you use global variables in your methods, it becomes harder to understand.
    So when are instance variables not global variables?
    When you are actually using the class as an Object, rather than just a program to run. If you are creating multiple instances of an object, all with different values for their instance variables, then they are not global variables. For instance you declare a Person object with an attribute "firstname". Your "main" program then creates many instances of the Person object, each with their own "firstname"
    I guess at the end of all this, it comes down to definitions.
    Certainly you can write procedural code in java. You can treat your instance variables, for all intents and purposes like global variables.
    I can only think to show a sort of example
    public class Test1
       User[] users;
       public void printUsers(){
         // loop through and print all the users
         // uses a global variable
          for(int i=0; i<users.length; i++){
            users.printUser();
    public void printUsers(User[] users){
    // preferred method - pass it the info it needs to do the job
    for(int i=0; i<users.length; i++){
    users[i].printUser();
    public Test1(){
    User u1 = new User("Tom", 20);
    User u2 = new User("Dick", 42);
    User u3 = new User("Harry", 69);
    users = new User[3];
    users[0] = u1;
    users[1] = u2;
    users[2] = u3;
    printUsers();
    printUsers(users);
    public static void main(String[] args)
    new Test1();
    class User{
    String firstName;
    int age;
    public User(String name, int age){
    this.firstName = name;
    this.age = age;
    public void printUser(){
    // here they are used as instance variables and not global variables
    System.out.println(firstName + " Age: " + age);
    Shit thats a lot of typing, and I'm not even sure I've explained it any good.
    Hope you can make some sense out of this drivel.
    Cheers,
    evnafets

  • How to add new row and update existing rows at a time form the upload file

    hi
    How to add new row and update existing rows at a time form the upload file
    example:ztable(existing table)
    bcent                      smh            nsmh         valid date
    0001112465      7.4                       26.06.2007
    0001112466      7.5                       26.06.2007
    000111801                      7.6                       26.06.2007
    1982                      7.8                       26.06.2007
    Flat file structure
    bcent                       nsmh         valid date
    0001112465     7.8     26.06.2007  ( update into above table in nsmh)
    0001112466     7.9     26.06.2007  ( update into above table in nsmh) 
    000111801                     7.6      26.06.2007 ( update into above table in nsmh
    1985                      11              26.06.2007   new row it should insert in table
    thanks,
    Sivagopal R

    Hi,
    First upload the file into an internal table. If you are using a file that is on application server. Use open dataset and close dataset.
    Then :
    Loop at it.
    *insert or modify as per your requirement.
    Endloop.
    Regards,
    Srilatha.

  • How to declare global variables using another global variable in ODI

    I am declaring a gloabal variable using another global variable.
    say for example:
    I have a global variable empid.
    I am decalaring another global variable empname in refreshing tab of global variables and the select statment is
    select empname from emp where empno = #GLOBAL.empid -------if i write like this i am getting error as invalid character.
    select empname from emp where empno = '#GLOBAL.empid'-------if i write like this i am getting error as invalid number.
    I have kept the datatype as numeric and action as non persistent
    Please help
    Thank you in advance.

    Hi,
    You cant test/refresh empname standalone.
    You need to create a new package drag and drop both variables and make them as refresh variable and execute that package and test.
    Flow,
    empid----> empname
    Thanks,
    Guru

  • How to ADD reference table and make a field as currency field in dictionary

    pls render some info on how to add refernce table and ref field if i want to make an added field as a currency or quantity field...

    Hi Kiran,
    It sounds like you are creating a "Z" table or structure and have defined a quantity (eg MENGE). But when you run the syntax check, the system is saying you need to define a reference table / field.
    Well when you are in SE11, click on the "Currency / Quantity Fields" tab. You will see 2 columns called "Reference Table" and "Reference Field". These 2 columns define the unit of measure for the currency / qty.
    If you have defined in your table MENGE and MEINS and the MEINS field is the unit of measure for the MENGE field you should define your fields as such (inthe Currency/Quantity Fields" tab:
    Table - ZVBAP
    MENGE MENGE_D QUAN ZVBAP MEINS
    MEINS MEINS   UNIT
    Hope this makes sense.
    Cheers,
    Pat.
    PS. Kindly assign Reward Points to the posts you find helpful.

  • How do I create variables and store them?

    How do I create variables and store them?

    As someone already said, we need to know a little more about what you want to do with these variables, but in general, APEX Items are probably what you want. You can create APEX Items at the Application or Page level. Once you set the value of an item, you can reference it anywhere else in the application. So, if you have an item on page 1 called P1_ENAME, you can reference it on page 32 using bind variable syntax :P1_ENAME. If you just want to store but not display some information, you can use either a hidden page item or an Application Level item. Take a look at the 2 Day Developers Guide for more info.
    Tyler

  • How to add a feild as key combination for existing condition table

    Hi all,
    please any body can inform me about how to add a feild as key combination for existing condition table ex 901 having the key combination of sales organisation and material
    for this cond. table,how  to add a new feild ex:price list
    iam unable to add it in change mode of v/03.(even after removing this 901 table from Acc.seq.)
    Edited by: rajendraprasad vasam on Apr 25, 2008 10:08 AM

    mr.Rajendra
         I you have the access key - you can copy the 901 table and create a new table along with your required field. v/03
    Or
    in the access sequence for the condition type - add 1 more step and add your field.
    ie 10 - 901
    and in 20 - your required field
    regards,
    Reshmi
    Edited by: reshmi bhaskar on Apr 25, 2008 10:21 AM

  • How to add global navigation to ui:insert and ui:include components?

    Hi,
    I'm new to JSF and trying to add global navigation rules to some imported UI: Components, while I've managed to add Global rules for the pages such as say index.xhtml and and contact.xhtml (which) is in a folder called content by i.e., adding the following in faces-config.xml
    <faces-config>
            <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                    <from-outcome>contact</from-outcome>
                    <to-view-id>/content/contact.xhtml</to-view-id>
                </navigation-case>
            </navigation-rule>
        </faces-config> which works fine and the page will off course be found from anywhere in the project how, I've also got a folder called components, which include the header and footer etc. to include in every file, and then want to be able to also create global navigation rules for each component and had also tried adding e.g., this to the faces-config.xml file......
    <faces-config>
            <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                    <from-outcome>header</from-outcome>
                    <to-view-id>/components/header.xhtml</to-view-id>
                </navigation-case>
            </navigation-rule>
        </faces-config>And then I would of had hoped and assumed that I would be possible to use the following anywhere to access the components from the components folder
    <ui:insert name="header" />
    or
    <ui:insert name="header"></ui:insert>
    however I can only still access the component with i.e.,
    <ui:insert name="header">
                <ui:include src="components/header.xhtml"/>
    </ui:insert> And this would be no good in the subfolders only from the outer index.xhtml could this be obtained, the project structure is as follows - hope someone can help please?
        Web Pages
               |
               |_____WEB-INF
               |
               |_____components-------header.xhtml etc.
               |
               |_____content-------contact.xhtml etc.
               |                              |------------images
               |_____resources----------------|------------js
               |                              |------------style ------style.css etc.
               |_____index.xhtml
         here's web.xml & faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
        <display-name>RenewableOptions.Org</display-name>
        <description>Simple Registration Application</description>
        <context-param>
            <description>
            </description>
            <param-name>javax.faces.PROJECT_STAGE</param-name>
            <param-value>Development</param-value>
        </context-param>
        <!-- Faces Servelet -->
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>/main/*</url-pattern>
        </servlet-mapping>
        <welcome-file-list>
            <welcome-file>main/index.xhtml</welcome-file>
        </welcome-file-list>
    </web-app>
    <faces-config version="2.0"
                  xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
        <faces-config>
            <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                    <from-outcome>index</from-outcome>
                    <to-view-id>/index.xhtml</to-view-id>
                </navigation-case>
            </navigation-rule>
        </faces-config>
        <faces-config>
            <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                    <from-outcome>footer</from-outcome>
                    <to-view-id>/components/footer.xhtml</to-view-id>
                </navigation-case>
            </navigation-rule>
        </faces-config>
        <faces-config>
            <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                    <from-outcome>header</from-outcome>
                    <to-view-id>/components/header.xhtml</to-view-id>
                </navigation-case>
            </navigation-rule>
        </faces-config>
        <faces-config>
            <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                    <from-outcome>leftCol</from-outcome>
                    <to-view-id>/components/leftCol.xhtml</to-view-id>
                </navigation-case>
            </navigation-rule>
        </faces-config>
        <faces-config>
            <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                    <from-outcome>navigation</from-outcome>
                    <to-view-id>/components/navigation.xhtml</to-view-id>
                </navigation-case>
            </navigation-rule>
        </faces-config>
        <faces-config>
            <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                    <from-outcome>rightCol</from-outcome>
                    <to-view-id>/components/rightCol.xhtml</to-view-id>
                </navigation-case>
            </navigation-rule>
        </faces-config>
        <faces-config>
            <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                    <from-outcome>blog</from-outcome>
                    <to-view-id>/content/blog.xhtml</to-view-id>
                </navigation-case>
            </navigation-rule>
        </faces-config>
        <faces-config>
            <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                    <from-outcome>contact</from-outcome>
                    <to-view-id>/content/contact.xhtml</to-view-id>
                </navigation-case>
            </navigation-rule>
        </faces-config>
    </faces-config>

    Found solution -
    just need to add ../componets/header.xhtml
    etc. when using the rule in the subfolders....

  • HOW TO ADD NEW VARIABLE DATAS ON ALV REPORT

    Hi gurus,
               I have cretaed one alv report using
    REUSE_ALV_GRID_DISPLAY.
    I HAVE CALCULATED SOME TOTALS AND STORED ON
    ONE VARIABLE .
    that variable name is 'toterror'.
    now i want to add  this variable on first line OF ALV REPORT.
    that is i should get LIKE THIS.
    PERNR   TEXT     ACTION  [ TITLES OF FIELDS ].THEN
    TOTAL ERROR RECORDS  '900'.
    THEN THE CORRESPONDING FIELDS DATA SHOULD BE DISPLAYED.
    HELP ME.
    THANKS IN ADVANCE.

    Hi
    Thanks Ajeet.
    The scenario is that I have to create a formula (contract end date-current date) and have to display the result using exeption to highlight the contracts ending in 30-60 days.
    The problem is that the info provider does not have any infoobject for date(only valid to and validity start date)
    I have created a formula variable on valid to date using replacement path. But dont have any variable to use for current date.
    The only time char in the cube is Fiscal yera variant.
    How should I go futher creating such formula? Shall I user customer exit variable? But I dont have any date char to create on.
    Can you shed some light on this problem
    Thanks

  • How to Decalre Global Variable in UDF

    Hi All,
    Can you please help me, how to declare a Global variable in UDF.
    I am using SAP PI 7.0.
    Regards,
    Manian.

    Hi manian,
    Have a look this thread:
    Global Variable - How to Set and Access
    Carlos

  • How to add environment variable programmatically??

    Hi all,
    I want to add TOMCAT_HOME environment variable programmatically. How can I do this?
    Is there any dos command to set an environment persistently?
    Pls help guys...
    Thanks in advance
    Mithunk

    The way environmental variables work is that they are passed to newly created tasks by the task that creates them. So, for example, when a command shell calls Java it passes a copy if it's current environmental variables, and if Java calls Runtime.exec it can override the set it passes on.
    The comands within a shell that set environmental variables can do so because they are part of the command shell, not separate programs run by it.
    In short a program run by a shell can't alter the environmental variables belonging to the shell. They move only from the calling task to the called.

Maybe you are looking for

  • Macbook Pro doesn't wake with external monitor

    I have a mid-2012 MBP that generally runs great. I recently bought a new external montior (samsung) and am currently running it with a VGA adapter.  When I put the computer to sleep using the command function, it's fine; however, if I shut the clamsh

  • Report Program on Warranty assignment/Reassignment for the VMS vehicle on different Actions.

    Hi Guru's, I have requirement on SD VMS and Warranty module, Need to assign/reassign the warranty based on the action of the vehicle which present in VLCHISTORY, BGMK BGM1 BGM2 BGM3 Need to create a report program on this requirement, help me with th

  • Cut/paste won't work

    I have DirectorMX2004 10.1. I'm using a Mac PPC, the last line of the G5s. The cut and paste features will not work no matter how I apply them, even on different files. Is this a bug that someone's aware of? Or are there settings that I could reset?

  • Oracle dveloper suit 10g r2 with db 11

    hello, i have installed Oracle Database 11 into my linux box and its working fine :) now after i downloaded oracle Developer suit 10g R2 , it does complain about the database version while installing ( it says it doesn;t work with DB 9 or higher ) so

  • KEDR COPA Derivation Step Conditions with Technical Fields?

    Greetings Experts, I want to create a KEDR derivation step to be used for redetermining KNDNR for freight cost documents coming from Transportation.  So I need to restrict it to documents whose record type (vrgar) = 'B' and reference transaction (cop