Developing Addons

Hi all,
If we want to add new form in sap b1,how we can do this.
we dn't knnow how to develop add ons.
help us
Thanks,
Neetu

Hi Neetu,
Ther are lot of sample programs available.u try this.It will be available in
C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET.
Let us try this sample code:
'//  SAP MANAGE UI API 2005 SDK Sample
'//  File:      HelloWorld.vb
'//  Copyright (c) SAP MANAGE
'// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
'// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
'// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
'// PARTICULAR PURPOSE.
Option Strict Off
Option Explicit On
'// BEFORE STARTING:
'// 1. Add reference to the "SAP Business One UI API"
'// 2. Insert the development connection string to the "Command line argument"
'// 1.
'//    a. Project->Add Reference...
'//    b. select the "SAP Business One UI API 2005" From the COM folder
'// 2.
'//     a. Project->Properties...
'//     b. choose Configuration Properties folder (place the arrow on Debugging)
'//     c. place the following connection string in the 'Command line arguments' field
'// 0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056
Friend Class HelloWorld
    '// This parameter will use us to manipulate the
    '// SAP Business One Application
    Private WithEvents SBO_Application As SAPbouiCOM.Application
    Private Sub SetApplication()
        '// Use an SboGuiApi object to establish connection
        '// with the SAP Business One application and return an
        '// initialized appliction object
        Dim SboGuiApi As SAPbouiCOM.SboGuiApi
        Dim sConnectionString As String
        SboGuiApi = New SAPbouiCOM.SboGuiApi
        '// by following the steps specified above, the following
        '// statment should be suficient for either development or run mode
        sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
        '// connect to a running SBO Application
        SboGuiApi.Connect(sConnectionString)
        '// get an initialized application object
        SBO_Application = SboGuiApi.GetApplication()
    End Sub
    Public Sub New()
        MyBase.New()
        '// set SBO_Application with an initialized application object
        SetApplication()
        '// send an "hello world" message
        SBO_Application.MessageBox("Hello World")
    End Sub
End Class
Regards
Mohana

Similar Messages

  • Addon may be corrupted...When I develop extension for firefox

    I develop addon and during installation it show the error :-
    Unable to install addon may be corrupted.
    Is there any way to debug the addon. Or any specific reason that may I am missing during the building the addons.

    i read another discussion for this problem there a guy says that UNmount the USB while using bootcamp,i did but after doing so i can't see the iso file in the USB.
    Again aftert mounting when i select the file and again unmount i am unable to click on the Continue button.

  • AddOn\Development that imitates B1 approval procedure.

    Hello
    AddOn\Development that imitates B1 approval procedure.
    Our customer needs to use the approval procedure B1 core behavior provides. However, he also needs the possibility to update lined at documents that were processed through the approval process.
    Is anyone familiar with such development\Addon?
    Thanks in advance
    Revital

    Hi Revital,
    I apologize. You are correct. Using the approval procedure, you can only change the values of SOME header fields, and not the row fields. I'm sorry to have mislead you.
    Regards,
    Vítor Vieira

  • Steps to Create Addon

    Dear Experts,
    I am using SAP 8.8 & patch level 10.
    can anybody plz gives me steps of creating addon.
    Regards,
    Pravin

    We Business one is installed you could install the sdk and there it gives code example to develop add on. Also use the B1DE to develop addons.

  • AddOn O.S. error after updating new release and/or patches

    I have had some problems after installing new release or patches on existing SAP B1 installation.
    A system error message is shown while attempting to starting SAP B1 AddOns.
    The problem occurs on several clients but not with a specific rule.
    Some SAP B1 clients continue working well like i expected.
    In order to fix this error i have already tried:
    - to reinstall DI API
    - to reinstall third party components required by my AddOn
    - to reinstall AddOn
    - to reinstall SAP B1 Client
    - to delete/rename SM_OBS_DLL folder in local temporary folder
    - hope and pray
    I have the same problems with VB6 and VB.NET AddOns, using UI and DI API.
    This error has been issued since SAP B1 2005 SP01 PL09 installation.
    Thanks in advance for any kind of help provided.

    Thank you for your help.
    I solved the problem with VB6 AddOn using only a DI.
    Next days I will be able to try with VB.NET 2003 projecy using both DI and UI API.
    I hope i won't have any further problem...
    Here is a newer question:
    Is it possible i have to recompile the AddOn every time i install new patches on existing installation on which i have already developed AddOns?
    This is not a good news because there are several patches issued and if i have to recompile the program i must generate new ARD file and install the new AddOn release...
    I hope this error won't be shown with next release or patch even if you gave me a very helpful solution.
    Many thanks
    Marcello Bordiga

  • Timed Out Error with ADDON

    Hi,
    When i am running application it works properly.
    But when i am developing ADDON . ADDON gets installed but <b>while installation it display Timed-Out Error.</b>
    I tried increasing installation time but it do not work.
    (i am using B1DE for developing ADDON)
    Plz help to work this out.
    Regards,
    Ganesh

    Hi ,
         Marc Roussel
      I have placed this question in portal.Ihave got solution also . Change i did was
    my previous code of <b>setconnection()</b> contained following line
    <u>sConnectionString =  "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056"
    </u>
    which was changed to
    <u>sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
    </u>
    and have placed connection string
    0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056
    to project propertie`s window of commandlineargument.
    And it worked properly.
    I am using SAP B1 2004.B and DOT NET 2005 version.
    Hope it works.Do not forget to reply if problem solves.
    Regards ,
    Ganesh

  • Development databases

    Hi!
    I'm new to SAP B1 and now I'm setting up a development environment that shall allow me to develop addons for different customers with different B1 versions and patch levels.
    My intention was to have ONE sql2005 server containing all our customers company databases. Then we will have one VMware client per customer that contains the client, SDK and VS2005/8.
    But I don't understand the architecture with the SBOcommon database and the company database. Is it possible to have different versions/patch levels on the same database server? If not, I have to look for another solution.
    I got trouble with the database when I started to work with customer no 2.
    Customer no 1 is running 2005A PL 41. Hence the database and SBOcommon are upgraded to PL 41. Customer no 2 is running 2005A Pl 16 and its company database is PL 16. When upgrading I should not try to upgrade the common database, since it already is PL 41? If I do, the upgrade is just hanging and will not be completed. When starting the client it seems that it will be upgraded to PL 41 since the common db is PL 41, but I only wanted PL 16. Is this correct, is this how B1 is working?
    Please, are there anyone out there having a good working development environment for different customers? Please let me know!
    Regards
    Lars Jönson
    Sweden

    Hi!
    Yes of course it's a solution to have a sqlserver in every virtual machine. But it's not a nice way as it consumes a lot of disk.
    It is a stupid architecture having one SBO-common that only can handle one version/patch level, it should be on a per database level instead. Why is it not?
    Thanks anyway David!
    Are there any more suggestions for an effective and nice development environment? Or info about the sbo-common that can help?
    Regards
    Lars Jönson

  • 450Mb in an addon, how is it possible??

    Hi.
    I have a big problem developing addons.
    When my addons starts, occupies 80mb RAM memory.
    When user uses addon 3 or 4 hours my addon occupies 400 or 450Mb RAM memory.
    I'm developing with VB.NET, it has 2 propierties very important
    1. object's life is the block wich contain object. Ex:
            If pVal.ItemUID = "btnimport" Then
                If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
                    If Not pVal.BeforeAction Then
                        Try
                            Dim oBP As SAPbobsCOM.BusinessPartners = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners)
                        Catch ex As Exception
                            SBOApp.MessageBox(ex.Message)
                        End Try
              '-> oBP doesn't exists because try block is end
                    End If
                End If
            End If
    2. VB.NET has an utility named "<i>Garbage Collector</i>" wich is running during program life and it clean all objects wich aren't used.
    So VB.NET optimizes RAM memory.
    Why my addon has 450Mb???
    Shall it be because Company object is overloaded and doesn't release memory???
    Exists any method for releasing Company memory??
    Do you know some reasons for this wild growth???
    SAP Spain said me "addons are addons"
    Any comments will be thankful
    Thnkx

    Hello,
    I have the same problem.
    I have an addon that only access to the database (only DI objects) to create user Table & Fields.
    This addon creates about 70 tables and about 900 fields.
    This creation takes more than 2 hours to be done.
    when I start it, it is about 100Mo, but then it grows up and can be also about 400 to 500 Mo.
    at the beginning, it takes less than 1 second to create a userfields, but then it can take more than 3-4 seconds, I don't even know at the end because I kill the process before.
    the add On call the funtcion Add or update of the UserfeldsMD object only if it needs to be done. If the database is correct, these function are not called.
    Once all the fields are created, it takes less than 2 minutes to check if all the fields are OK.
    I do release every single object after I use them.
    I downloaded this program, but it didin't really help me.
    http://www.red-gate.com/products/ants_profiler/index.htm
    The addOn memory used (as it can be seen in the task manager) is always a lot higher than the memory defined in the result of the program.
    I'm also looking for a way to reduce the size, and I check a lot of time, I don't see any memory leak in this small program.
    Sebastien

  • Help needed: My first AddOn experiences.

    Hi all,
    I try to develop a special AddOn for our Item-Management (Better Item-Description, Item-Images, Cross-Selling, and so on...).
    I don't have many experiences in DI/UI-API, UDO/UDF and User Tables, nevertheless I want to develop the AddOn.
    For demonstration purposes, I developed the whole system using Java and MySQL and now its time make this work in SAP Business One.
    Of course I read the documentations and Help-Files how to create User Tables, UDF and UDO and I made some practices (e. g. connecting to the companies database using DI with several languages (VB, C# and the of course the JCO-DI-API).
    So far, and now to my problem:
    I need several special Tables. Nearly all with an auto-incremented ID Field. Is this possible? If not, is it ok to work directly inside the MS-SQL Database using the Management-Studio? And how can I link tables, if there is no identifier?
    Are there other ways to develop AddOns, than using the internal user-defined methods?
    And last but not least: Is there a way to communicate in my mother-language (german), are there some german-places? In most cases, it is much easier for me to explain problems in german. Have you seen "Babel" with Brat Pitt
    Ok that's it! Thanks for your help.
    Regards, David

    Hi David
    >I need several special Tables. Nearly all with an auto-incremented ID Field. Is this possible?
    This is not possible.. You will need to create some auto-number code for the Code/Name fields in the UDTs
    You can use code like this to do so, but drawback is of cause that it is slower than Autonumbers
    DECLARE @next VARCHAR(8)
    SET @next = (SELECT CAST(CAST(MAX(CODE) AS INT)+1 AS VARCHAR) FROM [@BOY_B1P_AFVIGELSER])
    WHILE(DATALENGTH(@next)) <8
    BEGIN
      SET @next = '0'+@next
    END
    SELECT @next
    >If not, is it ok to work directly inside the MS-SQL Database using the Management-Studio? And how can I link tables, if >there is no identifier?
    No, this is not permitted by SAP Support
    >Are there other ways to develop AddOns, than using the internal user-defined methods?
    I know a few of the older add-ons have created their own tables but this is actually not allowed and you wil not be able to get your addon certified. Alternative you could create your own database along side the SAP database to hold all your tables, but it give a lot of additional work and does not work with Userdefined Objects
    >And last but not least: Is there a way to communicate in my mother-language (german).
    I think you are "stuck" in here... Pretty much all SDK related things are at the SDN

  • ADDON in B1DE

    Hi,
    I have developed one form and called it in ADDON using B1DE tool.Now i want to add some new controls and events to my existing form.so what should be the procedure followed by me ?
    While developing ADDON in wizard it is possible to add as many as events but once wizard is finished and then i want to add events to my addon i can i work it out ?
    Regards ,
    Ganesh

    Of course you can do this and you can do it on VS.NET.
    If you want to add a new component (i.e. a new form or
    item or menu) you should click on File / Add New Item
    / C# B1 AddOn Component. That will generate for you a
    class in your project for the selected component.
    If you want to add a new listener in a class you should
    click on File / Add New Item / C# B1 AddOn Listener. That
    will generate for you an appropriate listener in your
    class. Of course you can also add listeners by coding
    them.
    Note that ALL OF THIS is documented in the documentation
    attached to the download.

  • Company dependent ADDON

    Private Function DI_Connection()
            ' Define variables.
            oCompany = New SAPbobsCOM.Company
            Dim lRetCode, lErrCode As Long
            Dim sErrMsg As String
            oCompany.Server = "192.168.1.45"    
            oCompany.CompanyDB = "SGWIL_CRP"
            oCompany.UserName = "manager"
            oCompany.Password = "manager"
            oCompany.language = SAPbobsCOM.BoSuppLangs.ln_English             'Enter the logon language
            oCompany.UseTrusted = True
            lRetCode = oCompany.Connect
            If lRetCode <> 0 Then
                oCompany.GetLastError(lErrCode, sErrMsg)      
            End If
        End Function
    I used this code to connect one company in my ADDON.
    Every thing works fine.I developed addon and deployed it on client side.
    Now my big problem is that if one ot this changes by SAP B1
    1.oCompany.Server = "192.168.1.45"    
    2.oCompany.CompanyDB = "SUNCITY_CRP"
    3.oCompany.Password = "man"
    i.e if user changes machins Server IP OR
                changes machins companyDB name OR
                changes machins password for SAP B1
    Then my addon will not connect with company.
    in such situation what should i do ?
    Again going to code and changing is solution.
    But doing it always is bad practice.
    if i am keeping all above info. in text file but next problem is in ADDON only 2 files are present i.e .exe and .ard so where to keep text file.
    if any idea for developing generic addon plz forward to me.
    Regards ,
    Ganesh

    Hi...
    In UI addons, you retrieve the Company connection from Application ...
    see help files, and search for something like as:
        Set goCompany = Nothing
        Set goCompany = New SAPbobsCOM.Company
        '// Acquire the connection context cookie from the DI API.
        sCookie = goCompany.GetContextCookie
        '// Retrieve the connection context string from the UI API using the
        '// acquired cookie.
        sConnectionContext = goApplication.Company.GetConnectionContext(sCookie)
        '// before setting the SBO Login Context make sure the company ' is not connected
        If goCompany.Connected = True Then
            goCompany.DisConnect
        End If
        '// Set the connection context information to the DI API.
        gsErrText2 = "Set the connection context information to the DI API"
        lResult = goCompany.SetSboLoginContext(sConnectionContext)
        '// if lResult is 0, you've connected to the Company
    Regards,
    Jaro
    PS: if you're not using the UI, and only have standalone programm, which connects to the SBO database via DI API, make a window with fields, where user can fill in server name, user, password, and can choose company ... or make it as parameters entered after .exe file in command, and get them from there ... or make an .ini file ... or something ...

  • License for my addon.

    Hi,
    I have developed ADDON which works fine.Now i read lot about license key generation.
    can i develop license key for my addon ?
    if yes can u give me link which shows how to develop license key for my addon ?
    Regards ,
    Ganesh

    Hi Ganesh,
    Herewith a link that will tell you everything about licensing you need to know.
    SAP Business One SDK Licensing [original link is broken]
    Hope it helps,
    Adele

  • Fixed Asset Opening Balance

    Hi,
    Any idea to do (by import and manual create) the opening balance for fixed asset Mmaster data? Tried to search SAP notes or guide, only can find related topic on Import FA Master Data and not manual create of FA Master Data, and how to import the FA Master Data with belong to same Asset Type (same life-span) but due to purchase at different timing, now having different remaining life span).
    Thank you.

    Hello,
    I am sorry for unclear answer. I did not mean that you have to develop addon.
    after checking our client database, I see that one asset class will have same useful life and depreciation type which it means that different asset class can only the way to have different useful life (UL), and of course it will be different in depreciation type (DT).
    For example : machine A : UL : 96, DT : SL12.5
                         land        B ; UL 250  DT : SL25.
    Hope you also could discuss with SAP support about this.
    Rgds,

  • Crystal Report Preview

    Hello All,
    I have developed AddOn application which includes crystal report files created with Crystal Report 2008.i wants to able load the report and preview them within my AddOn application.Which Crytsal report 2008 Components do i need to import to enable me preview the report.
    Thanks

    Hi,
    There are two ways for you to include a crystal report in your addon.
    1. You manage the CR execution in your own program.
    2. You upload the CR into SBO and let SBO handle the execution of the report.
    for the first solution, in every user's PC, you need to install the correct version of crystal report runtime matching the version of Crystal Report DLL you are referencing in your program. In this case, to answer your question, you need to tell us which Crystal Report DLL version you are referencing.
    for the second solution, since when SBO client is installed, a CR runtime will also get installed to the user PC, you dont need to deploy any runtime anymore.
    Regards
    Edy

  • Regularly auto creation of sales order

    Hi All,
    Is it possible to define or set auto creation of sales order ? e.g. there 2000 customers that every biweekly Monday will have sales orders created automatically by system, so the user just only see and copy to delivery or A/R invoice. TIA
    Rgd,
    Mark

    This can be performed if you use activity management and set sales quotation as a linked document. use one sales quotation but contains multiples row line of items that have different delivery dates can make it possible, but only as reminder, to create sales order,.although manually, you just use copy to and the add the SO. You could also develop addon to make SBO auto creation of sales order.
    Rgds,

Maybe you are looking for

  • How to get values from a stored package variable of type record ?

    Sir, In my JClient form, I need to get values from a database stored package variable of type record. And the values are retained in the JClient form for the whole session. The values are copied only once when the form is started. What is the best wa

  • Interactive report from PL/SQL function

    Hello All, i have a pl/sql function that dynamically builds up a sql query and returns it as a varchar2. when i create a new report then i can use this function in the report like return f_function(param1,param2,v('APP_ID'), v('APP_SESSION')); and th

  • CLIENT-CERT - UserNameMapper problem

    Hi, I have a client, wich sends a soap-message, containing a username, to a webservice, that responds with "hello, <username>". The communication is over ssl. The webservice is running in a weblogic server 7.0 sp1. I have 2-way ssl working. Now I'm t

  • WBS element changed into an account assignment element

    Hi Gurus, Please let me know that how to get WBS element changed into an account assignment element. regards mohan

  • Sap hr global roll out UK

    Hi, Our Company is implementing SAP HR in US and they want me to assit in roll out of SAP HR into UK. Could some one tell me what are the neccessary steps that  needs to be taken into consideration. Ex: Do i need to prepare a separate template with d