Update an object

Post Author: kctraceys
CA Forum: Administration
I have two copies of a report.  One that is on the server and another that has been modified and it is now ready to be put into production.  I have two issues.
1)  I don't see anywhere that I can just update the object to include the modified report.
2)  If I remove the object and try to create a new one it tells me I can't because it already exists?

There is a bit of code missing from you example that would help me determine what you are trying to do. I suspect you are trying to do something like this:
List objects=sess.readAllObjects(clazz);
o = objects.get(i); // where i is the index of the object I am interested in
o.setBlah(...);
update(o, sess);
The Object must be modified after it has been registered with the Unit Of Work. Registering the object with the Unit Of Work is like begining an object level transaction, giving you a transactional copy of the object to work on. Something like:
List objects=sess.readAllObjects(clazz);
unitOfWork = session.acquireUnitOfWork();
o = (Cast)unitOfWork.registerObject(objects.get(i));
o.setBlah(...);
unitOfWork.commit();
Note how I am not using the mergeClone(..) api that you were using. That API is for use when the object is serialized (or otherwise copied) between the session read and the registration with the unit of work.
Peter

Similar Messages

  • How can I update an object and its nested collection- Agengy, SMP 3.0

    Hello Gurus,
    I have two objects: PurchaseOrders and PurchaseItems. 1 PurchaseOrder has more than 1 PurchaseItems. In my Java code, I create a Item array in PurchaseOrder object to store the PurchaseItems.
    What I want to do is to update the PurchaseOrder object. There are 2 things I have to do:
    Update PurchaseOrder object.
    Update an existing PurchaseItem of the PurchaseOrder and/or create a new PurchaseItem of that PurchaseOrder?
    I already created a Bapi Java class to edit a selected PO and every Item of that PO on my device.
    What should I do next with the Agentry? Any help is appreciated.. Thank you very much.

    The process is virtually identical.  The only difference will be in your BAPI logic which you have already written.  You will connect it just like you are doing for the Add scenario.  Once you get that working this should follow a very similar pattern.
    --Bill

  • Unable to update this object because the following attributes associated with this object have values that may already be associated with another object in your local directory services

    Getting this error from DirSync
    Unable to update this object because the following attributes associated with this object have values that may already be associated with another object in your local directory services: [UserPrincipalName
    [email protected];].  Correct or remove the duplicate values in your local directory.  Please refer to
    http://support.microsoft.com/kb/2647098 for more information on identifying objects with duplicate attribute values.
    Quick eyeball and couldn't see the cause in the user account so used the script here:
    http://gallery.technet.microsoft.com/office/Fix-Duplicate-User-d92215ef
    And got these outputs:
    PS C:\Windows\System32\WindowsPowerShell\v1.0> Export-OSCADUserPrincipalName -UserPrincipalName "[email protected]" -Path .\outputs.csv
    WARNING: Cannot find objects with specified duplicate user principal name
    [email protected]
    Found 0 user(s) with duplicate user principal name.
    Where to from here?
    Richard P

    Hi,
    Did you talk about the Microsoft Azure Active Directory Sync tool ?
    If yes, this issue occurs if one or more of the following conditions are true:
    An object in the on-premises Active Directory has an SMTP address that's the same as the SMTP address of the object that's reporting the problem.
    An object in the on-premises Active Directory has a mail attribute that's identical to the object that's reporting the problem.
    An object already exists in your organizational account and has the same SMTP address or mail attribute as the object in the on-premises Active Directory
    More detail information, please refer to:
    http://support.microsoft.com/kb/2520976/en-us
    [Troubleshooting] Unable to update this object because the following attributes associated with this object
    http://blogs.technet.com/b/aadsyncsupport/archive/2014/05/20/troubleshooting-unable-to-update-this-object-because-the-following-attributes-associated-with-this-object.aspx
    Regards.
    Vivian Wang

  • Re: Update Cache Objects in Delta Process Dosn't work

    Hi All,
    Re: Update Cache Objects in Delta Process doesn't work.
    BI 7 - SP 17
    This is the scenario I am working on, am running a bex query on a Cube(via a multi) with bunch aggregates.
    The daily extraction & Aggregate rollup is correct, but when I run a Bex Query it display incorrect keyfigure values as compared to what we see in LISTCUBE for the infocube.
    So when I ran the same query in RSRT with "Do not use Cache", it gave correct results and then when I ran the Bex Query again it fixed itself and it displayed correctly.
    InfoCube - standard & No compression for requests
    Query Properties are
    Read Mode - H
    Req Status  - 1
    Cache - Main Memory Cache Without swaping
    Update Cache Objects in Delta Process (Flag selected)
    SP grouping - 1
    This problem occurs once in couple of weeks and my question is there a permanant fix for it??
    OR should we turn the cache off??
    Can anyone please help.
    Thanking You.
    Rao

    Hi Kevin/Rao,
    We are currently experiencing problems with the 'Update Cache Objects in Delta' process.  Did either of you manage to resolve your issues, and if so, how?

  • How to update an object property located in an array of objects

    Hello all,
    I have a script that creates custom objects and populates them and saves them into an array. This array of objects is later converted to a CSV file for reuse later on. On a subsequent need to run the script and to save time and avoid recollecting
    data I have previously amassed, I read in the contents of the csv file and put this data into an arryOfObjects.
    I need to manipulate the data in specific objects but I can't figure out how to accomplish that task.
    I can identify the correct object within the array with the following command. I have been trying to pipe that result into either set-variable or set-itemproperty without success.
    $arrayOfObjects | select-object | where HostName -like $_.'name'
    This works, I can see my desired object and the data fields contained within it.
    I now need to modify one of the property fields. (Alias).
    I have been trying the following as a line of thought, but so far without success. It doesn't fail/error out, but it doesn't update the data either.
    $arrayOfObjects | select-object | where HostName -like $_.'name' | set-itemproperty -name Alias -value "newAlias"
    I'm wondering if I need to specify something for the -path argument, but since the array is in memory and not a registry location or a file I am not sure what I should use, if this is the problem at all.
    Any suggestions would be appreciated.
    Thanks
    Smitty

    yes, I have redacted things, and obscured other things because I can not go around posting critical infrastructure information out on the internet.
    Here is the first three lines of my .csv file
    "OrigIP","AL_HostName","AL_Found","AL_Enabled","AL_Status","N_HostName","InREDACTED","N_Found","Delta","IsStale","Ping","InDNS","InAD","Location","Alias","IsServer","HostType","OS","ApplianceName","FQDN","ChatterValue"
    "10.24.11.4","ABCD","yes","yes","never","abcd.domain.com","yes","yes","*","*","Y","Y","N","TEST","*","*","eventlog","","","ABCD.DOMAIN.COM","*"
    "10.24.12.18","EFGH","yes","yes","Dec 30 2014 09:15:00","efgh.domain.com","yes","yes","-25","No","Y","Y","Y","TEST","*","yes","eventlog","xxxxxx","","EFGH.DOMAIN.COM","*"
    When I import this file I create a new custom object (objectCurrent) which I populate with the data from the csv file. I then store this object into an array of objects (objectCollection).
    All of the data is present.
    I then read in a new csv file that would contain most of the same hosts, but possibly additional new ones. upon importing the second csv file I loop through the entries.
     I have a conditional statement that checks to see if the host name from the second csv file, if it isn't then treat it like a new object and go fill in all of the details of the object using my various functions, etc.
    Import-CSV$currentALReport-Delimiter","|ForEach-Object
         if($objectCollection.N_HostName
    -notcontains$_.'name')
            # then create a new currentObject and go populate the properties of the object 
         elseif ($objectCollection.N_HostName -contains $_.'name') {
              # copy this object and update the object's AL_Status (which is the last reported message date info)
                  # send that to the function that will parse it, compare Julian dates and see if it falls within my
                  # criteria as being stale.  if so set the IsStale property to Yes, but reguardless set the AL_Status
                  # newest last reported message data
    JRV states that "The "select object" does nothing at all unless you have a column in your CSV called "object".  The where clause will do nothing because it is syntatctically wrong and illogical. "
    I beg to differ.  Using the above command :   with the script running and the current focus ($_.'name') equals "abcd.domain.com"
     $arrayOfObjects | select-object | where N_HostName -like $_.'name'
    It obtain a single object within my array of objects similar to this:
    IP: 1.2.3.4
    N_HostName: abcd.domain.com
    IsStale: No
    LastMsgDate: Dec 30 2014 09:15:00
    Delta: 1
    Ping: Yes
    InDNS: Yes
    InAD: Yes
    Alias: *
    (other fields omitted for brevity) I could get any of my existing objects if I match the hostname
    If I used only the command "  $objectCollection | Select-Object "    it returns every object in my array.
    So to narrow down the selection to a single object I add the " | where N_HostName -like $_.'name'  "
    which gives me the exact object I am searching for.
    My only question is how can I modify the contents of the object that I have specified within the array of object???

  • Urgent - BDC program to update technical objects using transaction VA42

    Hi,
    Currently my program updates technical objects details at item level as well as BOM header level.
    But my client insists on updating at contract level i.e when u go to va42 transaction and without selecting any item, we need to go to menu,technical objects where the client  wants all the items to be displayed.
    How to do this way?, is it possible, please advise on this regard.
    Very urgent!
    Thanks in advance
    Anandh.B

    I went into va42 and tried to extras->technical objects but it saying to select the item. Without selecting any item it is not going into technical objects.
    You can only do BDC if is possible manually, since its not possible you cannot do BDC for that.
    Cheers,
    Satya

  • PARTY. CAN NOT UPDATE UNVERSIONABLE OBJECT IN A VALIDATED CONFIGURATION.

    Hi B2B gurus,
    While validating our host trading partner, I am getting below error. Could you please help me in resolving this issue. Please do the needful.
    We are using two versions of EDI
    4010(5.0) and 5020(1.0) versions
    An error occurred during validation.
    Error -: AIP-11052: Writing following objects: Trading Partner failed due to following constraint violation: PARTY. CAN NOT UPDATE UNVERSIONABLE OBJECT IN A VALIDATED CONFIGURATION.
    Regards
    Srinivas

    Hi Srinivas,
    Make sure there is no agreement in deployed state. Retire and purge all existing configurations and make sure there is no agreement in validated state.
    Regards,
    Anuj

  • Process Chain problem related to Update ODS Object Data (Further Update)

    In the process chain, the data is loaded to an ODS first then feed to an InfoCube by kind of data mart load.  But when checking the process chain, getting yellow warning msg:
    A type "Update ODS Object Data (Further Update)" process has to follow process "Activate ODS Object Data" var.our_infopackage_name in the chain
    Message no. RSMPC016
    If we add the variant "Update ODS Object Data (Further Update) after the activation of the ODS and before the InfoPackage to feed data to the cube, then another yellow warning shows up for the InfoPackage of loading data to the InfoCube that says the Update variant can not be before the loading to this Cube and etc.
    What should we do to have the problem resolved?
    Thanks

    hey Dinesh,
    How to have a wait time for the load to the cube?
    I've given you "Very helpful" rewarding points and after you give the answer to the above, I will give you the "Solve problem" rewarding points.
    Thanks

  • Doubt about Scan and Update Catalog Objects That Require Updates link

    Hi,
    I have a doubt about 'Scan and Update Catalog Objects That Require Updates' link in Administration,
    how can I know how many objects that required upgrading before I click this link???
    in doc.
    http://docs.oracle.com/cd/E28280_01/bi.1111/e10541/prescatadmin.htm#BIESG3750
    section 17.2.4 Updating Catalog Objects
    It is said 'You can confirm the need to update by viewing the metrics in Fusion Middleware Control. In the Catalog folder, find a metric called "Reads Needing Upgrade" with description "The number of objects read that required upgrading." '
    but I don't find it . my OBIEE version :11.1.1.6.2
    conld you pleae help me ??
    thank you in advance.

    That link should be there in 6 version.
    I've verified in 11g6 version doc the same is existing
    ref: http://docs.oracle.com/cd/E23943_01/bi.1111/e10541/prescatadmin.htm#BAJDDFFI
    BTW:
    http://docs.oracle.com/cd/E28280_01/bi.1111/e10541/prescatadmin.htm#BIESG3750is 11g7 version
    Thanks,
    http://cool-bi.com

  • Updating Connection object HOUSE_NUM1 in the system

    Hi,
    I need to update Connection object HOUSE_NUM1 IN THE SYSTEM.
    Can you suggest me  a function modjule fkor the same.
    The standard function module ISU_S_CONNOBJ_CHANGE says coding for no dialog will be included if required.
    Regards,
    Jyothsna

    Hi Jyothsna
    I was a little bit surprised as well to see this comment instead of the necessary code for background processing.
    However, it is not overly difficult to create your own function to do so (if you don't want to change the classification).
    First have a good look through ISU_S_CONNOBJ_CREATE and create the new function with following calls:
    ISU_O_CONNOBJ_OPEN
    Here you have to populate the structures ADRC_STRUC and EHAU
    ADDR_ACCEPT_REG_DATA_ERROR  (optional)
    ISU_CONNOBJ_CHECK
    ISU_O_CONNOBJ_PREPARE_CLOSE
    ISU_O_CONNOBJ_ACTION
    ISU_O_CONNOBJ_CLOSE
    If you only want to change address information you could use functions from the central address management, of course.
    Yep
    Jürgen

  • Updating an object that is a synonym

    hi
    As the user apps, I tried to update the object ap_invoice_distributions_all but no rows were updated.
    Then I tried select object_type from dba_objects and realised it was a synonym. I did query the owner and there are two of them - apps and ap.
    So, we did the following : update ap.ap_invoice_distributions_all, and this time the table was updated.
    But which table? Is the ap.ap_invoice_distributions_all and ap_invoice_distributions_all the same table? What is the purpose of using synonyms?
    As I understand, a synonym is - as the name suggests - exactly the same as the object it represents.
    from drop tables // sqlplus scripts comments // synonyms :
    We can create Synonym only for giving alternative name for tables, view, sequence, procedure, stored function, package etc..
    Synonyms are used to hide the name and owner of an object and for providing location transparency for remote objects.
    But why bother with this synonym? If I update the synonym, I am also updating the object it is synonymous with?
    Thanks,
    DA
    Edited by: Dan A on Apr 21, 2009 2:36 AM
    Edited by: Dan A on Apr 21, 2009 2:36 AM

    Synonym is just like an alias name. It does not stores anything. It just refers to an existing object thats all.
    This is well documented read it.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/schema.htm#CNCPT711

  • User dont have permission to update this object

    Dear Experts,
    I have exported a from into OIM and tried to give permissions of some groups via "object permission" tab. but I am getting an error message "user dont have permission to update this object". Then I looked into (Business rule definition)Data Object Manager tab to look for permissions on my custom form but there was no system administrator group having permissions of insert, update or delete. Please suggest how to add groups to this form and provide permissions.
    Regards,
    Sidharth

    Go to your System Administrator group within OIM. On the Data Object Permissions, add the user to your form with all permissions. The entry will have the name of your form's Description. Once System Administrators is on the form, you should be able to modify however you'd like. If all else fails, you can always modify your XML file to include the System Administrators as having permission and then import again.
    -Kevin

  • Updating a object subclass

    I am new to Object Relational databases and I am just experimenting. Im trying to update a object table but i want to update subclass attributes. I can update a object table with the following code with no problems
    UPDATE table_objtab p
    SET p.col1 = 'updated value'
    WHERE p.col1 = 'current value;I cant however update the attributes that are in the subclass. Can any one help me?
    Im sorry if i have not provided enough information, if you require the object type and subclass type us ask =) any help would be appreciated.
    Thanks in Advance,
    -Ben

    See Re: Implementing ORDBMS
    ... This works - UPDATE inline wiew:
    UPDATE (SELECT TREAT (address AS address_sub_t).street address_street
              FROM users_tab
             WHERE user_id = 2
       SET address_street = 'STREET 2';or
    UPDATE (SELECT user_id,
                   TREAT (address AS address_sub_t).street address_street
              FROM users_tab
       SET address_street = 'STREET 2'
    WHERE user_id = 2;Regards

  • Update existing object with parsers

    Hi,
    I'seen on the Developer guide of IFS that :
    "Parsers cannot be used to update existing objects" (page 76 of the pdf file)
    I've also seen on the same document that :
    "The aplication can use postOperation() to access the repository object that was created or updated by the parser" (page 91 of the pdf file)
    I'm sorry, I don't understand if updating objects in the repository is possible or not with parsers.
    does anyone know ?

    Hi,
    You have to remember that you are writing SQL building blocks, not code...
    Also when you use @select(), yes that will only pull the contents of the Select box of that object.
    To get the contents of the Where box, you need @Where().
    These are separate because typically you are either building a select part (normal objects) OR a where part (filters).
    So think out of the box and decide how you would write it in a sql statement if you did not have a universe,
    then break it in pieces that make sense.
    I'm not 100% sure of what it is you are trying to achieve, but you can do something like:
    case @where(object2) when TRUE then @select(object2) end
    Off course writing this in one go is just as valid, you don't have to reuse, only with big chunks or @prompt() stuff it makes sense to prevent typo's
    Hope this helps,
    Marianne

  • Updating Connection Object Address

    Hi all,
    Is there any  FM/BPAI to update Connection object address.
    with regards,
    Sumanth

    Hi all,
    I am facing an issue while using the FM: ISU_S_CONNOBJ_CHANGE to update a connection object address in the following manner:
    CALL FUNCTION 'ISU_S_CONNOBJ_CHANGE'
          EXPORTING
            x_haus         = wa_conobj_update-tplnr
            X_UPD_ONLINE   = co_flagged
            x_no_dialog    = co_flagged
            x_auto         = lwa_address
            X_OBJ          = lwa_object
          IMPORTING
            y_db_update    = lwa_update
    I am filling the values in the structures: lwa_address-addr_data & lwa_object-addr1_data_new. (Just filling 6 fields: CITY1, POST_CODE1, HOUSE_NUM1, HOUSE_NUM2, STREET & COUNTRY).
    I am also using COMMIT WORK (at sy-subrc = 0). Still this FM is not updating the values.

Maybe you are looking for