How to update Business Object,  rather than doing a final commit?

Hello experts,
I have the following <u>java web dynpro</u> code:
What I am trying to do is to access a business object through my code. The business object has got a root node and a child node called 'version'. And the association is 1:n. I want to create 1 root node and corresponding to that, I want to create few child nodes. But the code dumps at the place where i do the child node navigation. Here is the code.
IPatternTransaction transaction = IExternalITransaction.WD.cast(patternRtApi.
                 getSingleton(IPatternRtApi.TRANSACTION).getInterfaceController()).getApi();
IServiceFacade serviceFacade =   (IServiceFacade)transaction.getConnectionFacade();
IESRName esrName2 = ESRNameFactory.createESRName(<boName>,<namespace>);
IBOModel model2 = getMyServiceFacade().getBOModel(esrName2);
IQuery executeQuery2 = model2.createQuery(<node>,<query>);
executeQuery2.execute();
IBONode doNode = executeQuery2.getResultBONode();
IBONodeElement ne1 = doNode.createBONodeElement();
ne1.setAttributeValue(<attributeName>,new CctCode("E",null,null,null,null,null));
<b>IBONode doVer = ne1.getAssociatedBONode("Version");</b>
The last line of the code, I'm getting an error message saying that navigation is not allowed using local key. I know the reason for the error. The reason is when we just create the node element 'ne1', it doesn't create the 'UUID' for the record and record with UUID only allows to navigation to child node, say 'Version' node here. UUID gets generated only when you do an update or save. But I don't want to use the save function since i don't want a final commit on the transcation. But I want the UUID to get generated. Is there any method just to update the record in the backend Business Object and generate the UUID without doing a final commit.
I tried functions like refresh, check, isdirty available on 'ne1' and 'doNode'; but that didn't solve the problem. I even tried flush() function provided by the service facade, which generates only a local IKey and not the UUID. But I want the UUID to be generated somehow not doing a final commit.
Any kind of help is highly appeciated.
NB: Mega bonus points for any helpful answers.
Regards,
Sudeep.

Hello experts,
I have the following <u>java web dynpro</u> code:
What I am trying to do is to access a business object through my code. The business object has got a root node and a child node called 'version'. And the association is 1:n. I want to create 1 root node and corresponding to that, I want to create few child nodes. But the code dumps at the place where i do the child node navigation. Here is the code.
IPatternTransaction transaction = IExternalITransaction.WD.cast(patternRtApi.
                 getSingleton(IPatternRtApi.TRANSACTION).getInterfaceController()).getApi();
IServiceFacade serviceFacade =   (IServiceFacade)transaction.getConnectionFacade();
IESRName esrName2 = ESRNameFactory.createESRName(<boName>,<namespace>);
IBOModel model2 = getMyServiceFacade().getBOModel(esrName2);
IQuery executeQuery2 = model2.createQuery(<node>,<query>);
executeQuery2.execute();
IBONode doNode = executeQuery2.getResultBONode();
IBONodeElement ne1 = doNode.createBONodeElement();
ne1.setAttributeValue(<attributeName>,new CctCode("E",null,null,null,null,null));
<b>IBONode doVer = ne1.getAssociatedBONode("Version");</b>
The last line of the code, I'm getting an error message saying that navigation is not allowed using local key. I know the reason for the error. The reason is when we just create the node element 'ne1', it doesn't create the 'UUID' for the record and record with UUID only allows to navigation to child node, say 'Version' node here. UUID gets generated only when you do an update or save. But I don't want to use the save function since i don't want a final commit on the transcation. But I want the UUID to get generated. Is there any method just to update the record in the backend Business Object and generate the UUID without doing a final commit.
I tried functions like refresh, check, isdirty available on 'ne1' and 'doNode'; but that didn't solve the problem. I even tried flush() function provided by the service facade, which generates only a local IKey and not the UUID. But I want the UUID to be generated somehow not doing a final commit.
Any kind of help is highly appeciated.
NB: Mega bonus points for any helpful answers.
Regards,
Sudeep.

Similar Messages

  • How to access Business Objects Explorer?

    I am new to Business Objects and would like to know how to access Business Objects Explorer from my local system. I have Business Objects XI 3.1 installed on my system.
    I would like to know if BO explorer requires a separate installation package? If yes, how can I acquire it?
    If No, what are the steps to integrate the BO Server with the BO explorer?
    Edited by: Bhavani I on Jan 28, 2010 11:23 AM

    Hi,
      You can refer to the below link for more details on BO EXplorer,
    https://cw.sdn.sap.com/cw/servlet/JiveServlet/previewBody/119973-102-1-220562/BO%20Explorer%20Implementation%20checklist.pdf
    Regards,
    Balajee
    Edited by: Balajee Sivakumar on Apr 27, 2011 6:30 PM

  • How to register Business Object Portlet in Oacle Portal

    Hi Gurus,
    Could anybody give me an idea How to register Business Object Portlet in Oacle Portal.
    Thanks & Regards
    Vikram

    Hi
    I am also looking into BO portlets but maybe I am one step behind you as I am still trying to find where to download the provider from.
    Could you tell me where to got the portlet from.
    I recently went to the Business objects web site and could only find a java portal integration kit for JSR 168 platforms (10g included in the list)
    at http://www.businessobjects.com/products/downloadcenter/boepik.asp

  • How to use  Business Object like Vendor or PurchasingInfo

    Hi,
    How to use Business Object ( like Vendor or PurchasingInfo ) from my Object?
    For example:
    CLASS myEntity DEFINITION.
              PUBLIC SECTION.
                   METHODS: getVendor EXPORTING pVendor TYPE Vendor.
               PRIVATE SECTION.
               DATA: aVendor TYPE REF TO Vendor.
    ENDCLASS.
    CLASS myEntity IMPLEMENTATION.
    METHOD getVendor
               pVendor = aVendor .
    ENDMETHOD.
    ENDCLASS

    Hi,
    I am giving u a demo Program for ur doubt.
    REPORT demo_class_counter .
    CLASS counter DEFINITION.
      PUBLIC SECTION.
        METHODS: set IMPORTING value(set_value) TYPE i,
                 increment,
                 get EXPORTING value(get_value) TYPE i.
      PRIVATE SECTION.
        DATA count TYPE i.
    ENDCLASS.
    CLASS counter IMPLEMENTATION.
      METHOD set.
        count = set_value.
      ENDMETHOD.
      METHOD increment.
        ADD 1 TO count.
      ENDMETHOD.
      METHOD get.
        get_value = count.
      ENDMETHOD.
    ENDCLASS.
    DATA number TYPE i VALUE 5.
    DATA cnt TYPE REF TO counter.
    START-OF-SELECTION.
      CREATE OBJECT cnt.
      CALL METHOD cnt->set EXPORTING set_value = number.
      DO 3 TIMES.
        CALL METHOD cnt->increment.
      ENDDO.
      CALL METHOD cnt->get IMPORTING get_value = number.
      WRITE number.
    For more demo programs type 'abapdocu' in the command field
    U will be getting some demo programs.
    There select the abap objects.
    Regards,
    Jagadish

  • How to update Business place & Section Code for posted Documents

    Hi,
    I want to update business place and section code in existing documents, How to update business place and section code in the posted Documents. Is there any validation to check business place and section code while posting Document.
    Thanks in advance
    Best Regards
    Raj

    Hi Raynaju,
    Business place is an organizational unit and  it below company code level that is primarily used for reporting taxes on sales/purchases.
    For that no need to go for validation.Go to the field status and give the Business place & Section Code as required fields.
    There is a option in SAP as Document change rules.There give the company code,field name and account type
    Now you can change the fileds in posted document itself.
    May be this information is useful to you
    If you have any doubt feel free to ask
    Regards
    Aneesh
    Edited by: Aneesh kumarA on Jul 22, 2009 12:45 PM

  • How to Update Business Place & Sec.Code Field in Posted Document

    Dear All,
    Pls suggest how to update Business Place & Section Code field in documents which are posted without entering Business Place & Section Code. Pls tell me how to achieve this without using Validations & Substitutions. Any table entries can be maintained for this? Kindly guide.
    Regards
    Abhijeet

    Hi,
         Thanks for sending the replay,
         I had already update the Material document through the J1INPP T. code. but it not use for update FI
         Document and i want to update Business Place & Section Code in FI document.
         Please suggest,
    Regards
    Abhijeet

  • HT4623 how about updating an older ipod which does not offer "software update" as a choice when one taps on General under Settings?

    how about updating an older ipod which does not offer "software update" as a choice when one taps on General under Settings?

    http://support.apple.com/kb/HT4972
    Unless you have a 2nd generation iPod Touch, in which case 4.2.1 is the highest possible.

  • Can i change imported RGB colours to specified CMYK colours quickly in Indesign rather than doing ea

    Can i change imported RGB colours from a word doc to specified CMYK (already in the swatch panel) colours quickly in Indesign rather than doing each one manually?
    Is there a script so you can allocate rgb colours to cmyk colours?

    oh yeah, I see... You definitely need a script, so you better post this request in script forum. Since it quite scriptable (I believe), you need to know exactly (tell to the script) what colors to find and change to what. So it would work only on the specific pre-defined list of colors. I'm using something very similar regarding the fonts (I get regularly files where I need to change bunch of fonts to their alternatives). Not sure if it's possible to modify it for colors - I see some essential differences here. I'm not a scripter...

  • How to Update Business Area Field in Posted Document?

    Dear All,
    Pls tell me how to update Business Area in documents which are posted without entering Business Area field. Pls tell me how to achieve this without using Validations & Substitutions. Any table entries can be maintained for this? Kindly guide.
    Regards
    Abhijeet

    Hi,
    I think, you need to post mannually if you have the list of documents posted with out business area.
    ex:
    1.Before posting of accounting entry as below, you should deactivate business area component in OB65 againest your co.code
    2.Post accounting entry as below
    40   123456    without business area     100
    50   123456    with business area ABC  100
    3. Goto T.Code: OB65 activate the business area component.
    4. After posting of accounting entry like above you should run transaction F.5D and F.5E again, make sure that above entry not come again while executing F.5D.
    First you can try this process in dev client, if you are comfort with this process then follow the same in quality and production.
    Note: You can do this transactions in production client, only when there were no users working on the system.
    all the best
    Regards,
    Prasad

  • How to Find Business Objects for any Tranaction .

    Hi Abapers,
                        How to find Business objects for any transcation.....  and how to connect the Work flow to  any  Trancation  so that for example any body changes the date of Birth ...... so that the work flow should trigger .
    Thanks & Regards
    Bhaskar Rao.M

    Hi Bhaskar,
    For finding business object,you can try transaction SWO4 and by checking the documentation in it you can find your required business object.
    Another method is:
    1) Go to Trx SWE4 and switch on the event trace.
    2) Run your transaction which you want to use for triggering your workflow.
    3) Run transaction SWEL and find your Business Object and related event in it.
    For connnecting your WF to your transaction you have to create a start event in your WF in SWDD,where in you specify the Business Object and start event which you find using above method.
    Eg.You want your WF to be triggered whenever you have an error in your idoc.For this your BO will be IDOCAPPL and your event will be (inputErrorOccurred).This you will give in header data in SWDD.
    Neerja

  • How do I merge contacts rather than replace them during sync conflicts?

    I just got my iPhone 4 a few days ago, and the Verizon sales associate transferred the contacts from my previous phone.
    Now, when attempting to sync via iTunes 10.4 (80), I'm given only three options after a sync conflict notification regarding contacts synchronizing: Sync Now, Sync Later, Review changes (or something like that): Rather than merge pre-existing Address Book contacts, it wants to override them, regardless of whatever information I already have in the Address Book, assigning the iPhone info priority (so any Address Book entries would just be overwritten).
    Why is it doing this? It doesn't strike me as well-designed at all, especially since merging contacts seems a fairly common thing these days. An apparent work-around would be manually editing the ~30 contacts in Address Book, and then deleting each off my iPhone, but surely there's a better and faster way? Please help!
    Thanks for reading.

    Try linking cards:
    Open any contact you want to merge, tap on Edit and look at the bottom part of it.  You'll find 'Link Cards' and from there you may select the contact you want to link with the one you're looking at. So if you have:
    Contact 1: John A (job)
    Contact 2:  Business Name (who is also John A but you saved it as a different contact)
    Contact 3: Something else that's also John A
    You can link all three cards into one.  If you choose to, you may unlink them at any time, just tap Edit and then the red circle. Your contacts won't be deleted, but they won't appear under the same ID anymore.

  • How to call business objects in BO part from a servlet in lean-webapp

    Hi Gurus,
    for oci-implementation (and as it has been suggested here: http://scn.sap.com/thread/3340669) we want to implement a servlet that calls certain actions in a business object. The servlet resides inside the leanwebapp-DC. The business object is in the bo-part of our own custom module. Our problem is to find a way for the servlet to call the business logic. Our first thought was to go via the moduleAccess. However, we could not figure out how to access the module of the leanwebapp.
    Any suggestions?
    Best regards,
    Christian

    Hey Wolfgang,
    thank you very much for your quick and accurate answer.
    After struggling a little bit with our project setup we implemented your solution and it worked immediately.
    However, we now have the problem to declare the module dependency between the leanwebapp and the bo-part of our module. The Development-and-Extension-Guide for WCEM 3.0 tells us (page 39) to do this in the metadata.xml of the calling module (which would be the leanwebapp). Unfortunately, the leanwebapp does not have a metadata.xml.
    Declaring the dependency in the .dcdef of the leanwebapp-DC leads to either:
    a runtime exception while calling ModuleAccess moduleAccess = wecSession.getModuleAccess("oci"); in the servlet (com.sap.wec.tc.core.modulemgmt.metadata.exceptions.ModuleRuntimeException: Module access of module 'oci' cannot be created. It is not part of the current application.) or
    a runtime time exception while accessing the servlet:
    Caused by: com.sap.wec.tc.core.common.init.InitializeException: Error initializing 'com.sap.wec.tc.core.modulemgmt.metadata.ModuleMetaDataDeploymentModel' com.sap.wec.tc.core.modulemgmt.metadata.exceptions.ModuleRuntimeException: The deployment unit contains multiple JAR files or folders which declare the same part/namespace combination. Module: 'oci', part: 'bo', namespace: 'xxx', JAR/Folder 1: 'D:\usr\sap\DE2\J02\j2ee\cluster\apps\xxx.com\xxx~oci~dpu\app_libraries_container\xxx.com~xxx~oci~bo~assembly.jar', JAR/Folder 2: 'D:\usr\sap\DE2\J02\j2ee\cluster\apps\xxx.com\demo-leanapp\servlet_jsp\demo\root\WEB-INF\lib\xxx.com~xxx~oci~bo~assembly.jar'
    Do you have any hints on how to declare the dependeny properly?
    Best regards,
    Christian

  • How to print Cell Formula rather than its Result?

    Hi,
    I work with data that includes lots of multiple fractions, and print reports showing results of various calculations based on the fractions. The fractions themselves can be important, so I need to be able to display them when used in a formula.
    For example, in one cell (cell A1) I need to enter "1/3 * 13/21"; I need to display this formula when I print. Cell A2 would contain a specific number, like "141.5". Cell A3 needs to calculate A1 * A2.
    In order to provide a number that A3 can use, I need to enter "=1/3 * 13/21", but when printing this displays "206349". I can format A1 as text, but then A3 won't calculate it. I tried using "Value(A1)*Value(A2)" in A3, but it looks like Value will only accept a decimal number.
    So, is there any way to format some cells in a sheet (but not all cells) to display the cell contents rather than the result? Or a way to enter a fraction as text and have another cell evaluate the fraction or formula?
    Thanks for any help or advice.
    Tom

    Yvan,
    Merci for the reply.
    Unfortunately, that option does not work for my purposes. Below is a row that Numbers will allow me to print.
    0.07968198 | 1/6 | 23.58333 | 0.01463667 | 0.03333333 | 141.500
    Next is the row as I desire to print it (but have not figured out how to print):
    1/5 - (80/141.5 * 1/5) - (5.125/141.5 * 1/5) | 1/6 | 23.58333 | 0.01463667 | 0.03333333 | 141.500
    Next is the row as it appears if I follow your suggestion:
    =1/5 - (80/141.5 * 1/5) - (5.125/141.5 * 1/5) | =1/6 | =ROUND(D41*H41,5) | =ROUND(G41*H41/322.25,8) | =ROUND(C41*D41,8) | 141.5
    So in other words, I only want the first cell in the row to print as text. My clients need to see the equation in the first cell, not its calculated result. But for each following cell, they need to see the result; if I print the functions and cell references, as in the 3rd example, my report won't make any sense at all to my clients.
    Quattro Pro on Windows allowed me to do this easily. I switched to Mac and Excel 2008, and found a difficult workaround solution to accomplish this; but Excel is a dog of a program, with many bugs still. I'd much prefer to work with Numbers, but unless I can do something about the printing issue, I'll have to stick with Excel, or run Quattro under VMWare Fusion.
    Thanks a lot,
    Tom

  • 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???

  • How to create business object...

    hi gurus ,
    kindly help me on how to create a custom business object..i need the step by step or the detailed procedure.
    please help...

    Hi Krisha,
    have a look at this link.
    This will explain u how to create customized BO.
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/bobj/businessObjectDelegation
    If u dont want to delegate then just follow steps...from 1 to 11th point.
    In any issue/doubt pl. revert back.
    Hope it helps u!
    Regards,
    Mamta

Maybe you are looking for

  • Page size and lettering to large,and want to reduce.have zoomed out and in but still now change.

    the page and lettering size is too large and i want to reduce...cant remember how i got it this way but , i do remember that it was tricky to begin with...i have tried to zoom in and zoom out , but that is not what is wrong..thank you for your help..

  • ORA-22275 inserting into the CLOB column using ODBC input parameters

    Hi all, I'm having problem with INSERT into the CLOB column via bound input parameters. After calling SQLExecDirect() I'm getting following error: [Oracle][ODBC][Ora]ORA-22275: invalid LOB locator specified Adding defaults to the table definitions do

  • Probelm in printing tabspace in barcode thro smartforms

    Hi Friends, I want to print the Barcode label thro smartforms. My code is as follows, I want to use TABSPACE separation in between fields instead of SPACE how do i do this pls guide me for the same. I  am using SAP ECC 5.0 version. So i tried using S

  • Skip a record at Infopackage level

    Hi all I need to skip a record at infopackage level due to a problem in processchains and we dont wont this to be repeated again, could someone help me with the code for this Will  definetely assign points Chris

  • Document link within PDF

    I have made a PDF that has a link to the other Word or PDF document within my harddrive.  However, when try to burn all the files to CD-RW, many of the links get inactivated. I would like to know those links still be active even after everything is b