UDO implementation DLL: Add base method

Does anyone have any sample code on how to add data to object using the Add base method of the cSBOBusinessObject in C++?
Message was edited by: Frank Moebius
...made the subject "a bit"  more specific...

SBOErr  CLogisticsMasterDataObject::OnAdd ()
  /*e.g. call OnAdd of base class first (could do it later though...)*/
  SBOErr sboErr = CSboBusinessObject::OnAdd();
  if (sboErr != noErr)
    return sboErr;
  /* "FOM_UDO2" is the 2nd UDO here... - type Master Data*/
  CSboBusinessObject *pObject = CSboBusinessObject::CreateBusinessObject (_T("FOM_UDO2"));
  pObject->SetValue((_bstr_t)"Code", (_bstr_t)"4");
  pObject->SetValue((_bstr_t)"Name", (_bstr_t)"4");
  /* Add the new record for the 2nd UDO... */
  sboErr = pObject->Add(); 
  if (sboErr != noErr)
    return sboErr;
  /* "SM_BLK" is the 3rd UDO here... - type Document*/
  CSboBusinessObject *pObject = CSboBusinessObject::CreateBusinessObject (_T("SM_BLK"));
  /* no key required since generated automatically (remember that this is a Document!*/
  /* "Add()" would be just enough ;-) */
  /*//pObject->SetValue((_bstr_t)"U_BPCode", (_bstr_t)"C20000");*/
  /*//pObject->SetValue((_bstr_t)"U_BPName", (_bstr_t)"Customer with Blanket Agreement");*/
  /* Add the new record for the 3rd UDO...*/
  sboErr = pObject->Add();
  return sboErr;
"error"
As said in the reply before:
"Please note that the entire OnAdd runs inside a global transaction (like you do it in DI API with StartTransaction/EndTransaction)..."
Please take a look at the E-learning material:
https://www.sdn.sap.com/irj/sdn/businessone-elearning
This flashbook should answer your question - even though it is focussing on DI API...:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d4f9bdf9-0901-0010-d798-ac79d485348e
HTH
Message was edited by: Frank Moebius

Similar Messages

  • Implementation DLL Name (Linking business logic implementation)

    Dear Sirs,
    The 'User-Defined Object Registration Wizard' requires the "Implementation DLL Name" file.
    Would appreciate it very much if someone could kindly advice where I can find relevant information or provide me with how-to generate the DLL file.
    Best Regards,
    Kunitomo - Tokyo

    Hi Kunimoto,
    Do you have access to the SDK Help Center now?
    It is also available on the SDN for download under:
    > SAP Business One > Versions > SAP Business One 2007
    > [SAP Business One 2007 SDK Help Center|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9039f9c0-b9f1-2a10-27bd-b08d4bd9d48c]
    Notice that this is not the latest version available at the moment it should be updated soon. From there you all the information required as Niall said under
    > Customization Tools > User-Defined Objects (UDOs) > Creating a UDO
    Should you have any more specific questions let us know.
    Kind Regards,
    Friederike Mundt
    SAP Business One Forums Team

  • The type must implement the inherited abstract method???

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.ActiveEvent;
    import java.applet.*;
    public class MoveIt extends Applet implements ActionListener
         private Image cup;
         private Panel keyPad;
         public int yaxis = 15;
         public int xaxis = 15;
         private Button keysArray[];
         public void init()
              cup = getImage(getDocumentBase(), "cup.gif");
              Canvas myCanvas = new Canvas();
              setBackground(Color.blue);
              setLayout(new BorderLayout());
              Button up = new Button("Up");
              Button down = new Button("Down");
              Button right = new Button("Right");
              Button left = new Button("Left");
              Button center = new Button("Center");
              add(myCanvas, BorderLayout.NORTH);
              add(keyPad, BorderLayout.SOUTH);
              keyPad.add(up, BorderLayout.NORTH);
              up.addActionListener(this);
              keyPad.add(down, BorderLayout.SOUTH);
              down.addActionListener(this);
              keyPad.add(right, BorderLayout.EAST);
              right.addActionListener(this);
              keyPad.add(left, BorderLayout.WEST);
              left.addActionListener(this);
              keyPad.add(center, BorderLayout.CENTER);
              center.addActionListener(this);
         public void paint( Graphics g )
              g.drawImage( cup, xaxis, yaxis, this );
         public void ActionPerformed(ActionEvent e)
              String action = e.getActionCommand();
              if(action.equals("Up"))
                   yaxis = yaxis - 15;
              if(action.equals("Down"))
                   yaxis = yaxis + 15;
              if(action.equals("Left"))
                   xaxis = xaxis - 15;
              if(action.equals("Right"))
                   xaxis = xaxis + 15;
              if(action.equals("Center"))
                   xaxis = 125;
                   yaxis = 60;
    }How come there is an error:
    The type MoveIt must implement the inherited abstract method
    ActionListener.actionPerformed(ActionEvent)
    What the hell does that mean?

    A class that implements an interface must define the methods of the interface. Your applet (or the one you borrowed) states at the top that it implements the ActionListener interface. If you go to the API, you'll see that this interface declares a method "actionPerformed", and so this class must have a method that matches the one in the interface. I see that your applet will have some Buttons. You'll need an actionPerformed method if you want the buttons to use your class (this) as their action listener.
    Edit: I see that you already have an "ActionPerformed" method, but note that case matters, and this is not the same as "actionPerformed". Change one letter and you're on your way.
    Edited by: Encephalopathic on Jan 15, 2008 8:44 PM

  • About implementing the "add'" function in web dynpro

    hi guyes,
    now i want to implement the "add" function in the webdynpro. i bind a model node to the inputfields. and then i call the webservice ,but it does not work . the webservice is good . what happened to my project on earth? can anybody tell me what i should pay attention to in my code? my node structure is below:
    AddTicketworkhour==
       ticketworkhourbean
           name
           remark
       userId
    the root node is AddTicketworkhour ,it contains ticketworkhourbean and userId,    ticketworkhourbean contains name and remark.
    Thanks A Lot !

    public onActionSave(  ){
    wdContext.currentAddWorkscheduleBeanElement().setConsultantName("qinlei");
        wdContext.currentAddWorkscheduleBeanElement().setDistrictName(wdContext.currentDisplayElement().getName());
        wdContext.currentAddWorkscheduleBeanElement().setRowId(123456789);
        wdContext.currentAddWorkscheduleBeanElement().setLocation(wdContext.currentDisplayElement().getRowId());
        wdContext.currentAddWorkscheduleBeanElement().setWorkerId(12345678);
        wdContext.currentAddWorkscheduleBeanElement().setWorkDate(new Timestamp(wdContext.currentContextElement().getWorkDate().getTime()));
         wdContext.currentAddWorkscheduleElement().setUserId(100);
        boolean result = wdThis.wdGetMyWorkscheduleUICompController().addWorkschedule();
    wdDoInit( ){
    MyWorkscheduleAddModel addModel = new MyWorkscheduleAddModel();
                    AddWorkschedule addWorkschedule = new AddWorkschedule(addModel);
                    WorkscheduleBean addBean = new WorkscheduleBean(addModel);
                    addWorkschedule.setBean(addBean);
                    IAddWorkscheduleElement addWorkscheduleElement = wdContext.createAddWorkscheduleElement(addWorkschedule);
                    wdContext.nodeAddWorkschedule().bind(addWorkscheduleElement);
    Is there anywrong with my wdDoIt( )?
    谢谢!

  • How to add payment methods in infotype Bank Details

    Hi to all, could someone help me in this question: i want to add payment methods in infotype 9..how i can to that?
    i have clue that is going to this view: V_T042ZL and also i dont know what options i have to choose...can anyone help me??
    regards
    Mário

    Hello Mio,
    Please try the below IMG node.
    PERSONAL MANAGEMENT---> Personal Administration >Personal Data-> Bank details--->Define payment methods.
    This will make it a bit simpler.
    But you are at the right place.
    Best Regards.
    Karan.

  • How to add your method in photoshop plugin & call it from javascript?

    pls help me i have to add a method in photoshop sample plugin & call it through any script like javascript?don't have to use any listener like script listener?

    You create the plugin, so you defined the terminology for the plugin.
    So there should be no reason to use the listener because you already know the terminology needed.

  • Base method and base value

    Dear forum,
    I would like to seek advice on the above.
    I do not sure what is the difference between base method and base value in multilevel method.
    What is the difference between these 2 base?
    Thanks

    Hi,
    If you go ti AFAMA nd chosse a depr, key you can see the base Method as one component of the key.
    Here is defined:
    - Type of depreciation
    - Dep. method and
    - Treatment of end of depreciaion
    If you take a look at the "multilevel method (also in AFAMA) you can see the base value.
    The value used as the basis for the calculation of depreciation.
    Regards Bernhard

  • Implementing Cash Flow (Indirect Method)

    Hi,
    Does anyone know what's required to implement Cash Flow (Indirect Method)? (T-code:S_ALR_87012272)
    Thanks,
    CW

    Hi Dan,
    Very interesting! Though, I didn't get the answer. Think it would be very favorable for everybody, if you explain in more details.
    AFAIK, data is stored in BCS periodically. So, do you imply that it's possible to create cash flow for any set of data in the system (because of periodicity)?
    Talk about ttypes and breakdown categories are also not very clear for me.
    Anyway, I'd like to talk functional, not SAP (or some other IT) language.
    Here we go.
    Did you say that you used to create the cash flow report on the fly, by using some calculations in BEx?
    And the same for eliminations in cash flow?
    Did you do eliminations in CF?
    If yes, then I would suggest that you were lucky, having local and group currency the same, USD?
    As BCS consultant knows, the indirect cash flow report consists of 3 parts: net cash flows from operating activities, finance and investing ones.
    NCF from operating activities is usually calculated as net profit (before or after taxes) with some corrections that are calculated as differences in reported-beginning balances on some accounts. Would you calculate them in local or group currency? Taking into account that there might be no real movement in cash (local currency), but currency rate has changed?
    Financial & investing activities MUST BE PROVIDED in direct sense, like: dividends received, interests paid for credits and loans etc. There is, usually, no such information, only some netted activities. You need to get them additionally. How did you get them?
    So, the main question is:
    how would you calculate the CONSOLIDATED INDIRECT cash flow report
    having different local currencies (and a different group currency), with some intergroup activities?
    Everybody will appreciate your input on this subject.

  • Implementation of the hasProperties() method of the Node class

    The following snippet of code prints:
    false
    true
    which seems to be a bug.
    TextField nameField = new TextField();
    System.out.println(nameField.hasProperties());
    ObservableMap<Object, Object> props = nameField.getProperties();
    System.out.println(nameField.hasProperties());The implementation of the hasProperties() method in the Node class returns true, if the ObservableMap object for storing properties has been created. That is not what is expected from this method. I think, this method should also check if the ObservableMap has any properties.
    Can someone confirm that it is a bug?
    Thanks
    Kishori

    You can log it at http://javafx-jira.kenai.com and then, if the developers want to keep it the way it is (which they may for API compatibility purposes), they can at least document it so that a user would know what to expect without writing a test or making a potentially invalid assumption.

  • What are the several layers to implement Business Add-Ins?

    Hi,
    What are the several layers to implement Business Add-Ins?
    BTE enhancement take place only on  three levels (SAP - partners - customers).

    Hi Vishnu,
    I am just going through the below link for BTE stuff.
    confused at the word 'software layers' in the same..
    Link:
    http://help.sap.com/saphelp_nw04s/helpdata/en/eb/3e7ceb940e11d295df0000e82de14a/content.htm

  • Base Method 004 - Ordinary: Decl balance over total life (Japan)

    Dear Forum,
    Could any one help in explianing what is the logic behind Base Method 004 Ordinary: Decl balance over total life Japan.
    We notice in one of the Depreciation Keys, this method has been used.
    Thanks for help.
    Regards

    Hi,
    This is the combination of declining balance (written down balance) and useful life method.
    For eg.
    APC: 1000,  Scrap value: 10% and Useful life: 10 years
    Depreciation percentage rate will be
    1 - ((1000/10000) whole power 1/10 ) = 20 %
    Best Regards,
    Madhu

  • Difference between base methods

    What is the difference between base methods 07: Percentage from life (after end of life) and 011 ( % from useful life).
    Thank you in advance.

    Hi
    011 (% from useful life) - Here we derive the depreciation from the total useful life of the Asset. The rate of depreciation remains same for each year.
    07 - In this case the system calculates the depreciation even after the Useful life of the Asset. We depreciate an Asset until the Net Book value is reached Zero. If the Net Book value of the Asset doesn't reach zero then we can depreciate the Asset beyond the Planned Useful life.  We use this in such circumstances.
    Regards,
    Giridhar
    Assign points if useful.

  • What is the difference between base method 0002 and 0011

    Hi,
    could you please explain what is the difference between base method 0002 and 0011?
    0002: Ordinary: no automatic depreciation
    0011: Ordinary: percentage from useful life
    if we assing base method: 0002 in dep. key? what will happen in future?
    if we assing base method: 0011 in dep. key? what will happen in future?
    please clarify my doubt.?
    Thanks
    Indu

    Let me clear, I have bought WinSL 8.1 SNGL OLP NL Acdmc Legalization GetGenuine (part
    No - 4HR-00400). It means my machine has legal OS and I can use it and I dont need to buy WinPro
    8.1 SNGL Upgrd OLP NL Acdmc (Part no. - FQC-08173).
    is it?
    I believe that is correct. There should be no reason to buy both licenses for one machine. You should verify this with your reseller or MS.
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • Base method

    Hi consultant,
    1 May I know what is the purpose of base method (Asset IMG -> Depreciation -> Valuation Methods -> Depreciation Key -> Calculation Methods ->)
    2 what is the difference between 007 and 001?
    007 Ordinary: percentage from life (after end of life)
    011 Ordinary: percentage from useful life
    thanks

    Read the SAP help.
    dif between 007 en 011 one is stopping after the use full live (max 100% depreciation) the other one don't stop after use full live,  The other one don't stop you can have more the 100% depreciation.
    First look to the dpereciation rules you need, In the most cases they are standard available in SAP. When not search on this forum or make a message in detail with the depreciation rule you need.
    The steps are always first make a blue print what you need, look if it is standard avaiable in SAP. It is not to look in config. 80% you don't use or need to set-up

  • [BUG] jp2iexp.dll add-on for IE is registered with a wrong name/version

    jp2iexp.dll add-on for IE is registered with a wrong name/version. The name is Java Plug-in 1.6.0_07 but the version is +6.0.150.3+:
    Nome Java Plug-in *1.6.0_07*
    Autore Sun Microsystems, Inc.
    Tipo Controllo ActiveX
    Data file Oggi 5 agosto 2009, 27 minuti fa
    File jp2iexp.dll
    Versione *6.0.150.3*
    look this screenshot: http://img156.imageshack.us/img156/1707/jp2iexpdll.png

    Hello Amy.
    You may be having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?
    Whenever you have a problem with Firefox, whatever it is, you should make sure it's not coming from one of your installed add-ons, be it an extension, a theme or a plugin. To do that easily and cleanly, run Firefox in [http://support.mozilla.com/en-US/kb/Safe+Mode safe mode] and select ''Disable all add-ons''. If the problem disappears, you know it's from an add-on. Disable them all in normal mode, and enable them one at a time until you find the source of the problem. See [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes this article] for information about troubleshooting extensions and theme. You can troubleshoot plugins the same way.
    If you want support for one of your add-ons, you'll need to contact its author.

Maybe you are looking for

  • IPod found under diagnostics but not in iTunes

    I have a reoccuring problem using iTunes 7.02.16 From time to time the iPod is not visible in iTunes, but when I choose "help" and "iPod diagnostics" there are 4 green buttons. "iPod connection" status green. Usualy this problem is fixed by reinstall

  • Full Text not Displaying in table

    Hi Experts I am displaying Long text in Text elements in table But  It is not displaying full Text only Half of text is displaying. How to overcome this? Is there any length limitation for text elements in table. and Variable type is STRING i am conc

  • Concept of Commit Unit in OWB

    Hi All, Asking this question again. How does OWB cope with the concept of a commit unit? In PL/SQL, you have rollback, and savepoint. What happens if you have to insert child records and rollback the changes. - Jojo

  • Keylogger on my macbook?

    Hi All, I simply can´t think about another way than that my ex installed a keylogger on my macbook - he knows every step I make, emails, simply much too much without being here anymore. Looking this up I´ve found the following thread: I believe that

  • Thanks to iOS 6 ! Now my phone get slower n buggy ,bugs everywhere !!

    After open Genius in AppStore, it crash !!!