Using an int from one class in another class

I am a student writing a java program on renewable energy. Simply I have a power output which is a variable called PowerOutPut. declared as (public int PowerOutPut) I have another class which is a graphics class where I display the variable PowerOutPut on a graph, but i dont know how to call this variable in my graphics class.
if anyone can help, I would be very grateful.
Chris

But bear in mind that it is good practice to declare your variables private (unless you need otherwise) and to provide get and set methods to access and change them.
private int myVariable = 0;
public int getMyVariable(){
    return myVariable;
public void setMyVariable(int newValue){
    myVariable = newValue;
}Also, class names should start with upper case and variables should start with lower case.
Good luck.

Similar Messages

  • Using an audio from one video to another

    I am trying to make a documentary type film and I want to use an audio segment from one video to overlap another video's audio while using the second video just for the video. Here is an example of it.
    http://www.youtube.com/watch?v=9u7dJXDhOjc
    Im trying to acheive what they did for the first 15 seconds of this clip. I use movie 08.

    This is easy in iMovie 09.
    Here is [how to do it in iMovie 08|http://imovie08.blogspot.com/2007/08/how-to-extract-audio-from-clip.html]

  • Used Dc dependency from one Track to another Track

    Hi All,
    Can you give me some solution for my scenario.
    1) I have imported two tracks Track1 and Track2 from the server and created project locally from Inactive DCs.
    2) I have already existing DC1 from SC1->Track1 and also i have another track Track2-->SC2. In SC2 i have created new dc DC2.DC2 is still in both Inactive DCs only.
    3) I need to use DC1 as used dc in DC2.
    4) when i tried to do Used Dc from DC2, i cannot able to see Track1 SCs and DCs, only Track 2 is visible.
    Can you please provide some steps or documents for me to proceed further, it will be very helpful for me.
    Can you tell how can add Public Part and Used DC.
    Thanks & Regards,
    Suresh T

    To get this working you'll need to do the following after following Slava's steps: Set up a transport connection (in CMS Landscape Configurator) from Track 1 to Track 2, so that SC1 becomes available in Track 2. You can import SC1 into Track 2 after it has been Approved in Track 1.
    Note that the following step that Slava mentioned should not be done manually: "Add SC1 to Requirement components in SC2 track." After the Update CMS procedure, you should click the Synchronize SC Dependencies button in Track 2. This should automatically add SC1 to the Required Components table.

  • Just used migration assistant from one mac to another one.  When I restart the new mac, the old user boots up instead of my new user.  Have to log out then log in.

    Just got a new Imac.  I migrated from the old Imac.  When I boot the new Imac, the old user screen boots up.  I have to log out and then log into my new user on the new mac.  Whats up?
    Thanks.

    Thanks for your help. But the PowerBook has a Migration Assistant designed for the purpose of transfering files from the old Mac to the new Mac. The steps take me to the point where I'm instructed to restart the old Mac while holding down the "T" key. But nothing happens when I do that. It just restarts and the Migration Assistant on the new Mac still reads "waiting for old Mac to restart".
    There has to be a way to do this. I can't install the original applications on the PowerBook from scratch because they were meant to run on Classic. The PowerBook doesn't recognize any of the old Classic installation disks I have from previous Macs (Oddly, the PowerBook has capability to run Classic, but not the actual software-- and no Classic installation disk was provided, unlike the software provided for iBooks. And I can't install any of the System X upgrades because they need to recognize the original application already on the computer in order to upgrade.
    I just calculated that if I have to rebuy all the applications I need, I couldn't afford to do it (unless someone can-- or even wants to-- take the old versions off my hands to offset the cost of buying new ones).
    There must thousands of graphic designers like me who run a small business and can't afford to re-stock their entire software collection every time they upgrade to a new computer. Why would Apple diss the very people who have been supporting the company (actually keeping it alive) all these years? I don't think they would do that. I'll just have to keep looking for a solution.

  • How to restore a backup from one MBP to another using an external hardrive

    Hi. I was wondering how exactly can I restore backed up data using time machine from one MBP to another MBP since I purchased a new 2012 laptop due to replacing my old 2010.

    Everything you wanted to know about Time machine but were afraid to ask:
    http://pondini.org/OSX/Setup.html
    Ciao.

  • Import package from one project into another

    Hello everyone,
    I have some projects.
    An enterprise and war project created in netbeans.
    I would like to use some files from one project to another. when I import
    the package I get the error-
    'package x does not exist'
    I have added the package to the project but I still get the error.
    I have also added the project to import to my glasspath but still.
    E.g.
    set classpath
    .;c:\enterpriseA;
    My next idea is to create a war project into my enterprise project and copy the files
    from the war project into it in order to use it. But I'm sure there is a better way.
    THanking you in advance.
    eve
    Edited by: evepokua on Nov 22, 2009 1:44 PM

    One mistake I keep making is that I don't add the package to the
    Dependencies of the plugin I'm writing. You have to go to plugin.xml,
    and add the package you depend on to the Dependencies section. Maybe you
    didn't do this?
    Michael
    nasti wrote:
    > Hello everybody!
    > I am new user of osgi and eclipse. I tried to do some of Oscar examples
    > but I had some problems. Namely, the problem in import of package from
    > one project into another in Eclipse.
    > I add first project to the Build Path of the second one.
    > I add to the first project manifest line: Export-Package example2.service.
    > I add to the second project manifest line: Import-Package example2.service.
    > But when I tried to execute these bundles the
    > java.lang.NoClassDefFoundError was occurred. May be you will help me
    > with this problem.
    > Thanks....
    >
    >

  • RFC Call from one server to another

    Hi,
    Is it possible to use an rfc from one server to another on the same network?
    My Idea was that we can do so, however there's a little confusion about the same .
    Please clarify.
    Regards,
    Vikas

    Hi,
       call SE37 and search for RFC* with F4.
    Sending system side(SEND--800)
    Create function module by using Tcode SE37 or SE80
    goto attributes select remote function
    activate
    Receiving system side(RECE--000)
    goto Tcode SM59
    here select the R/3 Connections-->click on Create Button
    give RFC Desstination : TESTRFC
    Connection Type : 3 for Connecting two systems
    Description : Some meaningful Description
    Press enter
    give Target system Name : SEND
    Language : EN
    Client : 800
    user Name : sapuser
    Password : xxxxxx
    save this connections & click on test connections(f8)
    & Remote logon(f7)---> it will open a session
    with client 800 that is your sending system
    then only your RFC is correct
    create a report in SE38 Tcode
    data : c1 type i.
    data : itab like mara occurs 0 with header line.
    call function 'ZRFCFM' destination 'TESTRFC' --->Function Module 'ZRFCFM' your just create at Sending system
    exporting
    importing
    exceptions
    <b>Reward points</b>
    Regards

  • Problem in Navigation from one tab to another

    Hi All,
    In my forms, I have three tabs. In one tab, i have a set of records displayed(like table) in which all columns are bound to a table. I want to sort the records in the tab based on one column. So i wrote the following code in WHEN-TAB-PAGE-CHANGED trigger in form level. It works fine when i click on the particular tab. But when i try to navigate from one tab to another tab which i want to sort, the records in the tab are not sorted. The buton i used to navigate from one tab to another is tab in key board.
    DECLARE
    l_order_by VARCHAR2 (70) := '(select code from emp)';
    BEGIN
    IF (:SYSTEM.tab_new_page) = 'PAGE1' OR :SYSTEM.cursor_block = 'BLOCK1' THEN
    SET_BLOCK_PROPERTY ('BLOCK1', order_by, l_order_by);
    GO_BLOCK ('BLOCK1');
    EXECUTE_QUERY;
    END IF;
    END;
    please help asap.
    Thanks,
    Gopi.

    Gopi,
    Based on your sample code, the only data block that you are modifying the sort on is "BLOCK1". Rather than combine all of your logic into the When-Tab-Page-Changed (WTPC) trigger, I suggest you simply use the WTPC trigger to set the cursor to the block associated with the selected tab page and then set your block properties and query your block in the When-New-Block-Instance (WNBI) trigger for each block. For example:
    /* Sample When-Tab-Page-Changed trigger */
    DECLARE
       tp_nm    VARCHAR2(30);
    BEGIN
       tp_nm := :SYSTEM.TAB_NEW_PAGE;
       IF ( tp_nm = 'PAGE1' ) THEN
          Go_Block('BLOCK1');
       ELSIF ( tp_nm = 'PAGE2' ) THEN
          Go_Block('BLOCK2');
       ELSIF ( tp_nm = 'PAGE3' ) THEN
          Go_Block('BLOCK3');
       END IF;
    END;Bare in mind, that clicking on a Tab Page does not move the navigation cursor the block associated with the tab page displayed. You must manually perform the navigation as demonstrated above. Now, in your WNBI triggers you would write something like the following:
    /* Sample When-New-Block-Instance trigger */
    DECLARE
       l_order_by VARCHAR2 (70) := '(select code from emp)';
    BEGIN
       SET_BLOCK_PROPERTY ('BLOCK1', order_by, l_order_by);
       EXECUTE_QUERY;
    END;You could combine this code into the WTPC trigger if you don't want to seperate the code and orgainze it according to your data blocks. The key, however, is that cursor navigation doesn't occur when you click on a tab, you have to perform the navigation yourself.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Move from one environment to another

    how to move universe from development environment to testing and to production???
    which tool do we use to ove from one env to another???

    Hi,
    You can try like this.
    1) Login on LCM.
    2) in preference add server details for dev and qa.
    3) create new job and login on  source server cmc and destination.
    4) Click on create.
    5)  add objects in this job. like select the universe.
    6) Promote job.
    If you are not able to login on source or destination  then you need to open some ports between server. for the mean time you can use import wizard also.. if you are doing first time then read the import guide  and test with some objects first.
    Thanks,
    Amit

  • Which function module is used for transfering form one version to another

    HI
    COULD ANYBODY TEL ME
    WHICH FUNCTION MODULE IS USED FOR TRNASFORING FROM ONE VERSION TO ANOTHER VERSION.................

    Hi Chaithu,
    Go to SE37,enter your function module, click on where used list button on the application bar.
    All the program used your function module used is displayed.
    Regards,
    Venkat.

  • How to copy .gif files from one dir to another using runtime.exec

    hello sir/madem,
    i want to copy some gif and jepg files from one directory to another dir using swing.
    when i tried with using runtime.exec(String[]) i am getting the following error.
    anybody please tell me what is the problem in my program
    java.io.IOException: CreateProcess: ren c:/windows/desktop/copy.java c:/windows/
    cc.java error=0
    code:
    public class copy
         public static void main(String[] args)
              try{
                   String s[]=new String[3];
                        s[0]="ren";
    s[1]="c:/windows/desktop/copy.java";
    s[2]="c:/windows/cc.java";
              Runtime rt=Runtime.getRuntime();
    Process p=rt.exec(s);
              int i=p.waitFor();
              System.out.println("i is "+i);
              }catch(Exception e){System.out.println(e);}
    please mail me to [email protected]
    thanks in advance
    samba reddy
    india

    why use the Runtime? There are methods for this in the IO package ...

  • Passing a parameter from one class to another class in the same package

    Hi.
    I am trying to pass a parameter from one class to another class with in a package.And i am Getting the variable as null every time.In the code there is two classes.
    i. BugWatcherAction.java
    ii.BugWatcherRefreshAction.Java.
    We have implemented caching in the front-end level.But according to the business logic we need to clear the cache and again have to access the database after some actions are happened.There are another class file called BugwatcherPortletContent.java.
    So, we are dealing with three java files.The database interaction is taken care by the portletContent.java file.Below I am giving the code for the perticular function in the bugwatcherPortletContent.java:
    ==============================================================
    public Object loadContent() throws Exception {
    Hashtable htStore = new Hashtable();
    JetspeedRunData rundata = this.getInputData();
    String pId = this.getPorletId();
    PortalLogger.logDebug(" in the portlet content: "+pId);
    pId1=pId;//done by sraha
    htStore.put("PortletId", pId);
    htStore.put("BW_HOME_URL",CommonUtil.getMessage("BW.Home.Url"));
    htStore.put("BW_BUGVIEW_URL",CommonUtil.getMessage("BW.BugView.Url"));
    HttpServletRequest request = rundata.getRequest();
    PortalLogger.logDebug(
    "BugWatcherPortletContent:: build normal context");
    HttpSession session = null;
    int bugProfileId = 0;
    Hashtable bugProfiles = null;
    Hashtable bugData = null;
    boolean fetchProfiles = false;
    try {
    session = request.getSession(true);
    // Attempting to get the profiles from the session.
    //If the profiles are not present in the session, then they would have to be
    // obtained from the database.
    bugProfiles = (Hashtable) session.getAttribute("Profiles");
    //Getting the selected bug profile id.
    String bugProfileIdObj = request.getParameter("bugProfile" + pId);
    // Getting the logged in user
    String userId = request.getRemoteUser();
    if (bugProfiles == null) {
    fetchProfiles = true;
    if (bugProfileIdObj == null) {
    // setting the bugprofile id as -1 indicates "all profiles" is selected
    bugProfileIdObj =(String) session.getAttribute("bugProfileId" + pId);
    if (bugProfileIdObj == null) {
    bugProfileId = -1;
    else {
    bugProfileId = Integer.parseInt(bugProfileIdObj);
    else {
    bugProfileId = Integer.parseInt(bugProfileIdObj);
    session.setAttribute(
    ("bugProfileId" + pId),
    Integer.toString(bugProfileId));
    //fetching the bug list
    bugData =BugWatcherAPI.getbugList(userId, bugProfileId, fetchProfiles);
    PortalLogger.logDebug("BugWatcherPortletContent:: got bug data");
    if (bugData != null) {
    Hashtable htProfiles = (Hashtable) bugData.get("Profiles");
    } else {
    htStore.put("NoProfiles", "Y");
    } catch (CodedPortalException e) {
    htStore.put("Error", CommonUtil.getErrMessage(e.getMessage()));
    PortalLogger.logException
    ("BugWatcherPortletContent:: CodedPortalException!!",e);
    } catch (Exception e) {
    PortalLogger.logException(
    "BugWatcherPortletContent::Generic Exception!!",e);
    htStore.put(     "Error",CommonUtil.getErrMessage(ErrorConstantsI.GET_BUGLIST_FAILED));
    if (fetchProfiles) {
    bugProfiles = (Hashtable) bugData.get("Profiles");
    session.setAttribute("Profiles", bugProfiles);
    // putting the stuff in the context
    htStore.put("Profiles", bugProfiles);
    htStore.put("SelectedProfile", new Integer(bugProfileId));
    htStore.put("bugs", (ArrayList) bugData.get("Bugs"));
    return htStore;
    =============================================================
    And I am trying to call this function as it can capable of fetching the data from the database by "getbugProfiles".
    In the new class bugWatcherRefreshAction.java I have coded a part of code which actually clears the caching.Below I am giving the required part of the code:
    =============================================================
    public void doPerform(RunData rundata, Context context,String str) throws Exception {
    JetspeedRunData data = (JetspeedRunData) rundata;
    HttpServletRequest request = null;
    //PortletConfig pc = portlet.getPortletConfig();
    //String userId = request.getRemoteUser();
    /*String userId = ((JetspeedUser)rundata.getUser()).getUserName();//sraha on 1/4/05
    String pId = request.getParameter("PortletId");
    PortalLogger.logDebug("just after pId " +pId);  */
    //Calling the variable holding the value of portlet id from BugWatcherAction.java
    //We are getting the portlet id here , through a variable from BugWatcherAction.java
    /*BugWatcherPortletContent bgAct = new BugWatcherPortletContent();
    String portletID = bgAct.pId1;
    PortalLogger.logDebug("got the portlet ID in bugwatcherRefreshAction:---sraha"+portletID);*/
    // updating the bug groups
    Hashtable result = new Hashtable();
    try {
    request = data.getRequest();
    String userId = ((JetspeedUser)data.getUser()).getUserName();//sraha on 1/4/05
    //String pId = (String)request.getParameter("portletId");
    //String pId = pc.getPorletId();
    PortalLogger.logDebug("just after pId " +pId);
    PortalLogger.logDebug("after getting the pId-----sraha");
    result =BugWatcherAPI.getbugList(profileId, userId);
    PortalLogger.logDebug("select the new bug groups:: select is done ");
    context.put("SelectedbugGroups", profileId);
    //start clearing the cache
    ContentCacheContext cacheContext = getCacheContext(rundata);
    PortalLogger.logDebug("listBugWatcher Caching - removing markup content - before removecontent");
    // remove the markup content from cache.
    PortletContentCache.removeContent(cacheContext);
    PortalLogger.logDebug("listBugWatcher Caching-removing markup content - after removecontent");
    //remove the backend content from cache
    CacheablePortletData pdata =(CacheablePortletData) PortletCache.getCacheable(PortletCacheHelper.getUserHandle(((JetspeedUser)data.getUser()).getUserName()));
    PortalLogger.logDebug("listBugWatcher Caching User: " +((JetspeedUser)data.getUser()).getUserName());
    PortalLogger.logDebug("listBugWatcher Caching pId: " +pId);
    if (pdata != null)
    // User's data found in cache!
    PortalLogger.logDebug("listBugWatcher Caching -inside pdata!=null");
    pdata.removeObject(PortletCacheHelper.getUserPortletHandle(((JetspeedUser)data.getUser()).getUserName(),pId));
    PortalLogger.logDebug("listBugWatcher Caching -inside pdata!=null- after removeObject");
    PortalLogger.logDebug("listBugWatcher Caching -finish calling the remove content code");
    //end clearing the cache
    // after clearing the caching calling the data from the database taking a fn from the portletContent.java
    PortalLogger.logDebug("after clearing cache---sraha");
    BugWatcherPortletContent bugwatchportcont = new BugWatcherPortletContent();
    Hashtable httable= new Hashtable();
    httable=(Hashtable)bugwatchportcont.loadContent();
    PortalLogger.logDebug("after making the type casting-----sraha");
    Set storeKeySet = httable.keySet();
    Iterator itr = storeKeySet.iterator();
    while (itr.hasNext()) {
    String paramName = (String) itr.next();
    context.put(paramName, httable.get(paramName));
    PortalLogger.logDebug("after calling the databs data from hashtable---sraha");
    } catch (CodedPortalException e) {
    PortalLogger.logException("bugwatcherRefreshAction:: Exception- ",e);
    context.put("Error", CommonUtil.getErrMessage(e.getMessage()));
    catch (Exception e) {
    PortalLogger.logException("bugwatcherRefreshAction:: Exception- ",e);
    context.put(     "Error",CommonUtil.getErrMessage(ErrorConstantsI.EXCEPTION_CODE));
    try {
    ((JetspeedRunData) data).setCustomized(null);
    if (((JetspeedRunData) data).getCustomized() == null)
    ActionLoader.getInstance().exec(data,"controls.EndCustomize");
    catch (Exception e)
    PortalLogger.logException("bugwatcherRefreshAction", e);
    ===============================================================
    In the bugwatcher Action there is another function called PostLoadContent.java
    here though i have found the portlet Id but unable to fetch that in the bugWatcherRefreshAction.java . I am also giving the code of that function under the bugWatcherAction.Java
    ================================================
    // Get the PortletData object from intermediate store.
    CacheablePortletData pdata =(CacheablePortletData) PortletCache.getCacheable(PortletCacheHelper.getUserHandle(
    //rundata.getRequest().getRemoteUser()));
    ((JetspeedUser)rundata.getUser()).getUserName()));
    pId1 = (String)portlet.getID();
    PortalLogger.logDebug("in the bugwatcher action:"+pId1);
    try {
    Hashtable htStore = null;
    // if PortletData is available in store, get current portlet's data from it.
    if (pdata != null) {
    htStore =(Hashtable) pdata.getObject(     PortletCacheHelper.getUserPortletHandle(
    ((JetspeedUser)rundata.getUser()).getUserName(),portlet.getID()));
    //Loop through the hashtable and put its elements in context
    Set storeKeySet = htStore.keySet();
    Iterator itr = storeKeySet.iterator();
    while (itr.hasNext()) {
    String paramName = (String) itr.next();
    context.put(paramName, htStore.get(paramName));
    bugwatcherRefreshAction bRefAc = new bugwatcherRefreshAction();
    bRefAc.doPerform(pdata,context,pId1);
    =============================================================
    So this is the total scenario for the fetching the data , after clearing the cache and display that in the portal.I am unable to do that.Presently it is still fetching the data from the cache and it is not going to the database.Even the portlet Id is returning as null.
    I am unable to implement that thing.
    If you have any insight about this thing, that would be great .As it is very urgent a promt response will highly appreciated.Please send me any pointers or any issues for this I am unable to do that.
    Please let me know as early as possible.
    Thanks and regards,
    Santanu Raha.

    Have you run it in a debugger? That will show you exactly what is happening and why.

  • Porting varray data from one db to another remote db using queues and jms

    We are trying to port a varray from one db to another db using queues and java jms. The varray is embedded in an object type (necessary according to oracle docs). The varray, embed object, and the queues are identical between the 2 dbs. We have used the capabilities in jdeveloper to generate the necessary classes to access the embed object and its payload the varray.
    However, when we attempt this:
    public void publish( com.wgint.sql.EaiType payload )
    throws JMSException, SQLException
    Connection dbConnection = ((AQjmsSession)session).getDBConnection();
    AdtMessage message = ((AQjmsSession)session).createAdtMessage();
    message.setAdtPayload( payload );
    ( (AQjmsTopicPublisher) publisher ).publish( publisher.getTopic(),
    message,
    agents );
    we get a ora-00902 error, invalid datatype. I cannot find a single example on technet or the internet in which someone has done something similar. I do not know if it is feasible or not.
    Steve

    Do you really need JMS to do this? If not, just let the AQ layer propagate your messages from your local to your remote queue. See the online doc how to do this.

  • Exporting Item from One DB to another DB using SDK

    Dear Expert,
    I have tried to add / update the item master details from one DB to another Db through the SDK and it was working fine long time. But now i faced the error message "This entry already exists in the following tables (ODBC - 2035)" and not updating the items.
    below is my code.
    If any body have suggestion to resolve this issue let me know
    objMainRecset = objMainCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            objMainRecset.DoQuery("Select ItemCode from OITM where U_Action<>'N'")
            For intItemLoop As Integer = 0 To objMainRecset.RecordCount - 1
                FileName = System.Windows.Forms.Application.StartupPath & "\Item.xml"
                If File.Exists(FileName) Then
                    File.Delete(FileName)
                End If
                strItem = objMainRecset.Fields.Item(0).Value
                objMainItem = objMainCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)
                If objMainItem.GetByKey(strItem) Then
                    objRemoteItem = objRemoteCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)
                    If objRemoteItem.GetByKey(strItem) Then
                        strDflWhs = objRemoteItem.DefaultWarehouse
                        objMainCompany.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode
                        objMainItem.SaveXML(FileName)
                        objRemoteCompany.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode
                        objRemoteItem = objRemoteCompany.GetBusinessObjectFromXML(FileName, 0)
                        If objRemoteItem.Update() <> 0 Then
                            WriteErrorlog("Failed to Update item : " & objRemoteItem.ItemCode & ":" & objRemoteCompany.GetLastErrorDescription, sPath)
                        Else
                            WriteErrorlog("Item Code updated : " & objRemoteItem.ItemCode, sPath)
                            If objRemoteItem.GetByKey(strItem) Then
                                objRemoteItem.DefaultWarehouse = strDflWhs
                                objRemoteItem.Update()
                            End If
                        End If
                    Else
                        objMainCompany.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode
                        objMainItem.SaveXML(FileName)
                        objRemoteCompany.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode
                        objRemoteItem = objRemoteCompany.GetBusinessObjectFromXML(FileName, 0)
                        If objRemoteItem.Add() <> 0 Then
                            WriteErrorlog("Failed to create item : " & objRemoteCompany.GetLastErrorDescription, sPath)
                        Else
                            WriteErrorlog("New Item Created : " & objRemoteItem.ItemCode, sPath)
                        End If
                    End If
                End If
                objMainRecset.MoveNext()
            Next
    Thanks in Advance
    SenthilKumar

    I have the same problem with Business Partners Export/Import, here's my code:
      SAPbobsCOM.BusinessPartners BP = (SAPbobsCOM.BusinessPartners)compaFrom.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners);
      SAPbobsCOM.BusinessPartners BPDest = (SAPbobsCOM.BusinessPartners)compaTo.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners);
                                    BP.GetByKey(cardcode);
                                    compaFrom.Company.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode;
                                    compaTo.Company.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode;
                                        // Create a temp file to store the new XML file
                                    string xml = BP.GetAsXML();
                                    XmlDocument doc = new XmlDocument();
                                    doc.LoadXml(xml);
                                    doc.Save(sTempFileName);
                                    if (BPDest.GetByKey(cardcode) == true)
      BpDest = (SAPbobsCOM.BusinessPartners)compa_destinazione.Company.GetBusinessObjectFromXML(sTempFileName, 0);
                                            int ret=BPDest.Update();
    I always get, for every BP the error "This entry already exists in the following tables (ODBC - 2035)".
    I tried to copy all the properties manually and it works fine, but i don't understand why the xml is not working, i use xml for updating items and it works properly!
    I use SAP 8.81 PL 10

  • ADF: Passing parameters from one page to another using setPropertyListener

    Hi,
    I'm trying to find a simple way to pass a parameter from one page to another.
    On the first page I have a table, the second page is a history page, showing the change history of rows from the table on the first page.
    In the table on the first page there's a unique column (an order number), the value of which is never changed for a given row.
    What I would like is to be able to pass the order number from the currently selected row of the first page on to the history page, making the history page show only the history for the given order number.
    Using the task-flow for the history page, I've defined an input parameter (an order number), defined a criteria and so on. I've tested the functionality of this in the Application Module, and it seems to work.
    My problem is passing the order number from the first page to the second.
    I've created a Managed Bean, with a variable for the current order number, including accessors. On the table on the first page, I've created a contextMenu, and added an Item called "Show history" with an action that navigated from the first to the second page (a control flow I've defined in adfc-config). I've included a setPropertyListener in the "Show history" item. I've set the "From" property of the setPropertyListener to "#{row.ordernumber.attributeValue}" and the "To" property to point at the order variable in the Managed Bean. Finally, I created a new page for the history, dragged the history task flow onto this page as a region, using the Managed Bean order variable as input parameter.
    The result is this: When I bring up the context menu from a row in the table on the first page and select "Show history", I get this error: "The class 'java.lang.String' does not have the property 'attributeValue'."
    That's a bit puzzling to me, seeing as I used the Expression Builder to fill out the "From" property. I've tried using "inputValue" instead of "attributeValue", but that simply changes the error message to: "The class 'java.lang.String' does not have the property 'inputValue'."
    What am I doing wrong?
    Regards,
    Andreas

    Hi Timo and Puthanampatti,
    I actually tried something similar to what you have suggested before starting this thread, but still got an error. What I hadn't spent a lot of time investigating initially was that it gave a DIFFERENT error. But after reading Timo's suggestion, I went back to this other error and found out that it was connected to my Managed Bean. For some reason, I had made the mistake of giving the bean the same name (in adfc-config) as the actual java class. And this leads to a circular reference error (that I would only get to see when I didn't get the java.lang.String error first).
    Having fixed this, I can successfully pass my parameter from one page to another (with the "From" property of the setPropertyListener set to "#{row.ordernumber}").
    Thanks for your time,
    Andreas

Maybe you are looking for

  • Z77a-gd65 debug 60 - does not output video, keyboard and mouse don't light up

    Hello guys! I've had this motherboard since August 2012. It worked great until my street suffered from a power outage yesterday, and since it came back on I can't figure out what exactly is wrong with my mobo. The power up process occurs fine until d

  • Best practiceS for setting up Macs on Network

    Greetings. We have six Macs on our Windows Server network; three iMacs and three laptops. We have set up all the machines and they are joined to the Active Directory. In the past, we have always created local users on the machines and then "browsed"

  • Phone turned off on its own

    Hi, my Iphone 4s turned off on its own and I can't turn it on, even charging doesn't work. it just stopped working. I just found in the forum an answer: press for a while on and top buton. even this does not help Connected it to my mac not ditected b

  • How to backup ABAP code and dynpros?

    Hey, I wrote a program with dynpro (no web dynpro), modules and includes. I would like to save these objects. How to do this? I don't want to transport them to another system directly, but save them as file so that I have a backup. I figure out that

  • Why there is a border around the flash movies?

    I have a homepage with an embedded flash .swf object. It is perfect when viewed with IE/ flash player 8 in Win2000 environment, but when it is viewed with IE/flash player 8 in WinXP environment, there is a border around the flash .swf object when the