Sap business one sdk

in sap business one sdk how DI API is connect.

hi
threre  r two method for  connection
1. single sign one connection
2 seprate connection
In the single sign one  connection we connect to  UI api  nd DI api ,
    In the seprate connection we r connect  seprate  DI api nd UI api ,
  This is single sign one code. connect to di api
  private SAPbobsCOM.Company oCompany;
        private void SetApplication() {
            // // Use an SboGuiApi object to establish connection
            // // with the SAP Business One application and return an
            // // initialized appliction object
            SAPbouiCOM.SboGuiApi SboGuiApi = null;
            string sConnectionString = null;
            SboGuiApi = new SAPbouiCOM.SboGuiApi();
            // // by following the steps specified above, the following
            // // statment should be suficient for either development or run mode
            sConnectionString = System.Convert.ToString( Environment.GetCommandLineArgs().GetValue( 1 ) );
            // // connect to a running SBO Application
            SboGuiApi.Connect( sConnectionString );
            // // get an initialized application object
            SBO_Application = SboGuiApi.GetApplication( -1 );
        private int SetConnectionContext() {
            int setConnectionContextReturn = 0;
            string sCookie = null;
            string sConnectionContext = null;
            int lRetCode = 0;
            // // First initialize the Company object
            oCompany = new SAPbobsCOM.Company();
            // // Acquire the connection context cookie from the DI API.
            sCookie = oCompany.GetContextCookie();
            // // Retrieve the connection context string from the UI API using the
            // // acquired cookie.
            sConnectionContext = SBO_Application.Company.GetConnectionContext( sCookie );
            // // before setting the SBO Login Context make sure the company is not
            // // connected
            if ( oCompany.Connected == true ) {
                oCompany.Disconnect();
            // // Set the connection context information to the DI API.
            setConnectionContextReturn = oCompany.SetSboLoginContext( sConnectionContext );
            return setConnectionContextReturn;
        private int ConnectToCompany() {
            int connectToCompanyReturn = 0;
            // // Establish the connection to the company database.
            connectToCompanyReturn = oCompany.Connect();
            return connectToCompanyReturn;
.................this is code for cneect ui api nd di api..............
...........................................////////........................................this is code for connect for di api seprate.....................................................
Dim oCompany As SAPBobsCOM.Company
Dim lRetCode, lErrCode As Long
Dim sErrMsg as String
'Instanciate a Company object
oCompany = New SAPBobsCOM.Company
oCompany.Server      = "(local)"     
oCompany.CompanyDB      = "SBODemo_US"
oCompany.UserName      = "manager"
oCompany.Password      = "manager"
oCompany.Language      = ln_English
‘Sample: Use Windows Auth. to SQL Server
oCompany.UseTrusted     = True
‘Set AddOn identifier (new in 2004)
oCompany.AddOnIdentifier     = “Your Add-On Identifier”
lRetCode = oCompany.connect
'Check Return Code
If lRetCode <> 0 Then
  oCompany.GetLastError lErrCode, sErrMsg
End If
.applay  any one code  for coonection tp di api....
if u have any problem replay me ,
  nd if   u r satisfied than give me rewards point.

Similar Messages

  • Creation of datasource  form combo box in SAP Business One SDK

    Hi,
    How to create  the  user datasource for  combo box in SAP Business One SDK.
    Regards,
    Y.

    Hello freind
    yu can used following code for userdatasource when form loaded
                Dim Branch  As SAPbouiCOM.ComboBox
                oform.DataSources.UserDataSources.Add("Ebranch", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 25)
                Branch = oform.Items.Item("3").Specific
                Branch.DataBind.SetBound(True, "", "Ebranch")

  • SAP Business One SDK help center

    Hi,
       Can any one give me a copy of SAP Business One SDK help center.
    thanks

    Hi Toto,
    You can download a copy of the latest 2007A help center from here:
    SAP Business One - SAP Developer Network
    It's the main news article at the moment.
    Kind Regards,
    Owen

  • SAP Business One SDK DI API

    Hi,
    well, i am pretty new in this SAP Business one thing, my company (Laboratorios Chontalpa in Mexico) recently has purchase the SAP Bussines One, and i need to interface my LIS (Laboratory Information System), right now i use xml to pass the information between my LIS and SAP, but i was reading a little bit about SDK DI API, and i would now if i can use this API to comunicate mi LIS directly to the DB of SAP, and eliminate the XML thing.
    In my laboratory we have 60 remote office where there use my LIS, and i would like to comunicate that remote offices with my LIS using the DI API to comunicate with SAP, but i dont now if i need one licence pro of SAP per office to do that???
    anyone can help me with this question
    thanxs
    regards

    One user license is necessary for one named user. With one licence cannot work 60 users, you need 60 licenses. Thats in case that the offices will work with B1 application.
    When you will have some own application using DI Api, which will comunicate with LIS and is it no necessary to run SBO there, one license (user) for all offices is enough.
    hope it helps
    Petr

  • How to script to Print a document from SAP Business One SDK

    I have created a project using UDO, Form and User table using B1DE2005.
    I wonder how can i program to print a document from my screen. something like Sales Order, where user can click on Print Preview button and it will print the sales order confirmation preview..
    KC

    Where do you want to execute this print/print preview?  Inside Sales Order?
    If that is the case use the print event, now if you have your own form and is separate of any of the SAP B1 system forms, then you will have to use the menu event and evaluate when they have press the print button (which you also probably will have to make sure that is active).
    WB

  • Crystal Reports background processing for SAP Business One 8.8

    Dear Partners,
    I have an SDK program developed in SAP Business One SDK that works in 2007, it calls crystal reports externally and can be executed as a background task using the windows schedular or from the command prompt.
    My problem is it does not work under SAP Business One SDK 2008 PL18 with SQL Server 2008, Visual Studio 2008.
    I receive the following message after this line in my code,"oReport.PrintToPrinter(CopyNo, False, 0, 0)".
    'CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.
    Error in File XX_Report_Ver_0.01 {1A6620A2-5D73-49D2-9347-32ED068AA64E}.rpt:
    Unable to connect: incorrect log on parameters. ---> System.Runtime.InteropServices.COMException (0x8004100F): Logon failed.
    Error in File XX_Report_Ver_0.01 {1A6620A2-5D73-49D2-9347-32ED068AA64E}.rpt:
    Unable to connect: incorrect log on parameters.
       at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.GetLastPageNumber(RequestContext pRequestContext)
       at CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext)
       --- End of inner exception stack trace ---
       at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
       at CrystalDecisions.ReportSource.EromReportSourceBase.
       at CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)
       at BGProductionRpt.ECR_Common.ECR_PrintReport(Int32 CopyNo) in C:\SDK Development\8.8\test\XX_Rpt\ECR_Common.vb:line 485'
    My Question is what Crystal Reports libraries or other method should I be using ?
    Crystal Reports 2008 for SAP Business One eg. 51038978.zip - downloaded from portal obviously dosn't contain the CrystalDecisions libraries.
    Crystall Reports 2008 - cr2008_sp3_fullbuild, cr2008fp33.exe, cr2008fp33_mm, cr2008fp33_clickonce - also download from the portal, the cr2008_sp3_fullbuild does contain the crystal decisions libraries.
    Finally other choices are crystal reports included with the visual studio 2008 and crystal reports full version direct from Business Objects.
    I have tried different versions of crystal decision libraries- eg, 12.0110 or 12.02 but still no joy.
    Also if I manage to get the report to fire what should the client be running eg, if they have the Crystal Reports 2008 for Business One do they also need to install the Crystal Reports Run time - cr2008fp33_clickonce.
    Any help would be appreciated.
    Thanks.

    Hi John
    Since the SDK works in 2007 it will be using the OLD DB access method.
    Change the Crystal report to use an OLE DB datasource rather than the SAP Business One data source.
    Regards
    Rob

  • Print layout design - AR invoice - SAP business one 2005B

    I designed AR invoiced in this,
    1. I have invoiced for one line item,But in print preview  the 1st Lineitem get repeated 2 times,Since i fetched taxes like Excise duty,cess & Sales tax in repetetive area ?
    2. I fetched taxes like Excise duty,Cess,Sales tax directly from table(INV4),
    How i can display Excise duty amount in words?
    3. I know the table for customer TNGST & CST #
    Which is CRD7,how to fetch the data's with reference to AR Invoice number?
    Kindly advise me.
    Jeyakanthan

    Jeyakanthan,
    You have posted your question in the SAP Business One Integration Technology forum.  Your question seems to be related to the SAP Business One SDK.  You need to post your question in the SAP Business One SDK Discussion Forum.
    Thank you,
    Eddy

  • How to integrate with java connnector in sap business one 2005

    hai,
    i have small doubt,
    how to integrate with java connnector in sap business one 2005
    thankig
    anand

    Anand,
    I am not sure of your exact question, but the SAP Business One SDK Help Center documentation contains all the information that you should need with respect to using the SAP Business One JCO connector.  You should read this documentation.
    Eddy

  • How to create Add-On program for SAP Business One 2007

    Hi,
    When I create my Add-On into SBO I have some issues.
    Which program do I use to create an Add-On into SBO?
    Is there a URL or Path where I find the program?
    I am using a 2003 program which is built by my colleague.
    I assume SAP provide the Add-On program for SAP Business One 2007
    Thank you,
    Rune

    Rune,
    At a high level ...
    1) VS2005
    2) Compile your program
    3) Generate and Add-on Identifier
    4) Create a registration datafile
    5) Create the setup program consisting of your .EXE and the .ARD file
    6) Add-On is created and running in SBO
    Again ... the details on deploying and packaging your add-on can be found in the SAP Business One SDK Help Center Documentation and the SDK eLearning.
    Also, you can use B1DE using the Simple Installer or Professional Installer will do most of the work for you after you have coded the add-on.
    Eddy
    Edited by: Edward Neveux on Jan 30, 2008 9:11 PM

  • Stock transfer Invoice - SAP business one 2005

    From which table I can retreive Warehouse addressess
    (i.e) (Consigner,Consignee address) in stock transfer invoice?
    Expecting your forum members esteemed reply.
    A.Jeyakanthan

    Jeyakanthan,
    You have posted your question in the SAP Business One Integration Technology forum. Your question seems to be related to the SAP Business One SDK. You need to post your question in the SAP Business One SDK Discussion Forum.
    Thank you,
    Eddy

  • Basics that are reqd for Business One SDK

    Hello Eveyone,
    I am new to this technology. I am working on Dot Net technologies from past 3 yrs.
    I came to know that b1 sdk is on dot net.
    So, i have decided to learn this SAP course.
    So, Can anyone suggest me the road map for learning the SAP b1 SDK..
    Thanks In Advance.....

    Sishir,
    To learn the SAP Business One SDK, I suggest that you start with the SAP Business One SDK Help Center Documentation that comes with the SDK when you install it as well as reviewing the SDK eLearning here ...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/6207e283-0a01-0010-6c84-bacd2745c33f [original link is broken]
    Once you understand the SDK ... you can also reveiw the SDK Tools available to you at ...
    SAP Business One Tools [original link is broken]
    HTH,
    Eddy

  • SAP Business One Tutorial

    Hi
    I am new to Business One. Can anyone tell me the link where i can learn B1? I tried on goolge but could not find a proper link where i can learn to develop reports in B1.
    regards,
    ramakanth

    Hi,
    If u want to design reports then Standard SQL and Crystals would do. And u can know about the Table structures from  the DB reference help file which can be found at the following location.
    C:\Program Files\SAP\SAP Business One SDK\Help
    Hope it helps,
    Vasu Natari.

  • Synchronisation of contacts from Outlook to SAP Business One

    Dear all,
    i have installed the Outlook Integration Add-On and want to synchronize Contacts from SAP Business One to Outlook and this worked fine. Now I also wanted to synchronize contacts from Outlook to SAP Business One (changes and new Contacts) and I activated the check box for this in the settings. But after I run the synchronisation nothing happened, even the contact folder has been selected in the Contacts - MS Outlook Criteria settings. Do I have to do something else?

    David,
    The forum you have posted your question in is for questions related to the SAP Business One SDK.  You may want to post your question in the SAP Business One Discussion Forum as your question is application related.
    http://cpsn-channel.sap.com/businessoneforum
    Eddy

  • SAP Business One 8.8 Developer License

    Hi,
    I am relatively new to SAP but has years of experience has a developer. I would like to develop competencies on SAP Business One 8.8 (or the latest version) to enable me deploy, consult and develop add ons for the platform.
    I would like to aquire a single developer's license that would enable me install the solution and the SDK on my laptop and also download the solutions.
    I do not have a SAP business Partner account or access to the market place. I am also interested in books on the subject but I only got a book on SAP Business One 2005 edition.
    I would appreciate any advise or assistance on this.
    Regards
    Debola

    Hi, I'm just new here in sap community. I read some of your post and i know you can provide an answer.
    I have a Laptop, corei3, 4gb ram 500gb  and win 7pro. Im planning to install the sap B1 8.8 pl 10 for training purposes only.
    Is it possible to run SAP B1 on my laptop?Do I need to add ram?  I don't have other hardware to use. If it is possible please provide me the step by step procedure on how to install it.
    Thank you and Im hoping for your responce.. Tc

  • Minor Release SAP Business One 8.81 Now in Unrestricted Shipment

    Minor release SAP Business One 8.81 is the successor release of major release SAP Business One 8.8.
    SAP Business One 8.81 delivers significant value in:
    - Improved business processes and enhanced business control
    Request for quotation, Recurring transactions, Tax code determination, Purchase confirmation wizard, Cost accounting, SEPA payment method
    - Enhanced reporting and embedded analytics
    International Financial Reporting Standard support, Report filtering based on UDFs, Reference fields enhancements
    - Partner enablement
    SDK enhancements (UI/DI API), Electronic File Manager, Crystal Reports for Add-ons
    - End-to-end integration and collaboration
    One product u2013 Dashboard caching mechanism, B1&B1iC integration (shipped as one package with B1 product or upgrade, integration with installation and upgrade wizards)
    Note that with the unrestricted shipment of SAP Business One 8.81, no more patches will be delivered for SAP Business One 8.8 after April 30. Learn more on the [SAP Business One 8.8 Release Family Central Information page  |http://channel.sap.com/sbo/88] on Channel Partner Portal (for channel partners only)

    Hi Ashish,
    as always, the SAP Business One software can be downloaded by Partners only from the SAP Business One Software Center at [http://service.sap.com/sbo-swcenter] . You will then need to navigate to "SAP Business One Products" and then to either "installations" or "updates", depending if this is a new installation or if you want to upgrade to SAP Business One 8.81.
    Cheers, Marie-Laurence

Maybe you are looking for

  • Magic Mouse Disconnects and Trackpad Unusable

    When the battery gets low on the mouse I turn it off, replace them but it doesn't reconnect. I use the MacBook Pro in clamshell mode with the LED Apple screen, so I open it up to use the trackpad... then I go into the Bluetooth settings and it says t

  • How to make text document more interesting quickly for use via the web?

    what Adobe applications are the best for making a .pdf text document more interesting (quickly) for use via the web?

  • 8.1.1 - spinning beach ball when I try to open

    I SHOULD KNOW BETTER and wait until all the complaints have died down. I can't even open it! It's getting stuck while it's trying to access the apple store. How can I just go back to the older (non 8.1) version until they figure this out? I have no t

  • Sync error code (-54)

    I get the following error code when attempting to sync my 5s on my HP computer running Win 8: -The iPhone 5s cannot be synced.  An unknown error occurred (-54). I purchased AppleCare when I bought this phone and after multiple phone calls with AppleC

  • Macbook connecting to apple IP address

    I have just recently been teaching myself about network security and as such have been playing around with netstat. Upon using the utility immediately I noticed that I had 2 established connections to apple IP addresses on very high port numbers as s