Using SDK objects(coded in VB) .dll

Hi Dukes,
I have to import & export data into Pastel using it's SDK objects that are written in VB. I've read all I can about JNI(tutorial) and went through most of the previous topics regarding this issue and found some usefull information, but nothing that is working so far. My questions are:
1. I only know the methods name and their paramaters, but not what they return. I got some sample code in VB that uses these methods, so do I have to convert this code into C before i can access it from my native methods. And would I call the VB methods that uses the SDK methods or do I call the SDK methods directly?
2. I read that I have to create a wrapper .dll.....How on earth do I do this :)
3. If after all this, I get it running, is it possible to query my database using Java then passing the array elements into VB where they will be used by the SDK objects to be passed into Pastel's database?
I've asked the same question at many other forums and allot of people read it but no one replied, I'm not sure why. If my questions are unclear please let me know then I will try to be more specific. Hope some of you genuises out there can help me. :)
Thanks in advance!!!

1. I only know the methods name and their paramaters,
but not what they return. I got some sample code in VB
that uses these methods, so do I have to convert this
code into C before i can access it from my native
methods. And would I call the VB methods that uses the
SDK methods or do I call the SDK methods directly?Your not going to be able to invoke the SDK methods directly from your Java class, you will have to write a C/C++ dll that calls the methods with the appropriate JNI elements built into it. Then you would load this dll through JNI in your Java class. In your Java class you will call a native method which is associated with the C/C++ dll method of the same name, which will in turn call that method in the C/C++ dll which will call the method in the VB dll. Not very neat but its all you got.
2. I read that I have to create a wrapper .dll.....How
on earth do I do this :)Read the JNI tutorial on this site, it has a step by step procedure on creating a C/C++ dll which calls native methods and how to use it with Java. I don't know the URL to the tutorial off hand but you shouldn't have too much trouble finding it.
3. If after all this, I get it running, is it possible
to query my database using Java then passing the array
elements into VB where they will be used by the SDK
objects to be passed into Pastel's database?I not even gonna touch that one.

Similar Messages

  • AP Invoice Object : Passing Customer Code instead of Vendor Code Using SDK

    Hi,
    Can i use customer code instead of the vendor code in AP Invoice SDK Object?
    i.e.I want only one code for Customer and Vendor in BP Master system.
    I know this is not possible in system then also if anybody knows the alternative solution Kindly suggest the same.
    Warm Regards,
    Mahendra

    Dear Mahendrakumar,
    You can not implement the required function by SDK also.
    Best Regards
    Jane Jing
    SAP Business One Forums team

  • How can I use sdk to create a dll?

    I would like to extract text with it's coordinates using Acrobat SDK (I think I can use PDEdit API).
    Can I use my plug-in like a dll?
    I want to use it from the external application.
    Thank you.
    Tanya

    How can I use java to create a shortcut on a surfers
    desktop?
    A surfer clicks on a link and it creates a shortcut
    back to a certain website and/or a shortcut is created
    on load
    thanks
    You have to sign your applet to create files... and thank god too. I hate it when web pages add shiite to my desktop.

  • Error in Printing Crystal Report Directly to Printer using SDK Code

    Hello ,
    I am trying to print a crystal report created in SAP Crystal Reports 2008 through SDk Code using one parameter
    as (Document Number).But While running the Code the Report is not getting printed and also the system is
    not able to fetch the correct data in the report using the supplied parameter .
    I am using Visual Studio 2005 Crystal Report dll s in my code :-
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Imports CrystalDecisions.CrystalReports
    Imports System
    Imports System.Data.SqlClient
    Imports System.IO
    For Clarification i am pasting my code below :-
                Dim oRpt As ReportDocument
                oRpt = New ReportDocument
                oRpt.Load(Path)
                With crConnectionInfo
                    .ServerName = Server
                    .DatabaseName = Database
                    .UserID = User
                    .Password = Password
                End With
                CrTables = oRpt.Database.Tables
                For Each CrTable In CrTables
                    crtableLogoninfo = CrTable.LogOnInfo
                    crtableLogoninfo.ConnectionInfo = crConnectionInfo
                    CrTable.ApplyLogOnInfo(crtableLogoninfo)
                Next
                oRpt.ParameterFields("Document Number").CurrentValues.AddValue(Parameter)
                If Printer <> "" Then
                    oRpt.PrintOptions.PrinterName = Printer
                End If
                oRpt.PrintToPrinter(Copies, False, 0, 1)
            Catch ex As Exception
                SBO_Application.MessageBox(ex.Message)
            End Try
    Please suggest me what i have to do in my code to print the report with correct data in report.
    Thanks & Regards,
    Amit

    k

  • How to Create AP Invoice from PO using SDK

    Hi,
    I want to create an A/P Invoice thru SDK for which already the Purchase Order has been entered thru the front-end. How to do it? Using SBO objects I am loading the particular PO. But after that how to transfer everything in the PO to AP Invoice.
    Thanx in advance.
    with regards,
    Ram.

    Hi Ram,
    Herewith an example:
            oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseInvoices)
            oPOrder.GetByKey(sOrder)
            oInvoice.CardCode = oPOrder.CardCode
            oInvoice.CardName = oPOrder.CardName
            oInvoice.Address = oPOrder.Address
            oInvoice.Address2 = oPOrder.Address2
            oInvoice.AgentCode = oPOrder.AgentCode
            oInvoice.Comments = oPOrder.Comments
            oInvoice.ContactPersonCode = oPOrder.ContactPersonCode
            oInvoice.DocDate = oPOrder.DocDate
            oInvoice.DocDueDate = oPOrder.DocDate
            oInvoice.FederalTaxID = oPOrder.FederalTaxID
            oInvoice.JournalMemo = "Based on Sales Order " & sOrder
            oInvoice.NumAtCard = oPOrder.NumAtCard
            oInvoice.Project = oPOrder.Project
            oInvoice.Reference1 = oPOrder.Reference1
            oInvoice.Reference2 = oPOrder.Reference2
            oInvoice.SalesPersonCode = oPOrder.SalesPersonCode
            oInvoice.SummeryType = oPOrder.SummeryType
            For i = 0 To oPOrder.Lines.Count - 1
                oPOrder.Lines.SetCurrentLine(i)
                If i > 0 Then
                    oInvoice.Lines.Add()
                End If
                oInvoice.Lines.BaseEntry = oPOrder.DocEntry
                oInvoice.Lines.BaseLine = oPOrder.Lines.LineNum
                oInvoice.Lines.BaseType = 22
            Next
            If oInvoice.Add() <> 0 Then
                oApplication.MessageBox("Error: " & oCompany.GetLastErrorDescription)
            End If
            System.Runtime.InteropServices.Marshal.ReleaseComObject(oInvoice)
    Hope it helps,
    Adele

  • How to show screen design in .srf (from Screen Painter) using SDK?

    How to show screen design in .srf (from Screen Painter) using SDK?

    You need to use the LoadBatchActions method of the Application object to load .SRF files.
    John.

  • How do I do validation using SDK.

    How do I do validation using SDK.
    We have created different warehouses for the client business operations.
    For eg:
    1. Inspection Stores
    2. Rejection Stores
    3. Main Stores
    In Goods Return & A/P Credit Memo, other than RejectionStores is
    selected, we want to generate a warning message.
    How do I do this through SDK.
    I need the code sample for the following activity:
    1. Reading the data available at each row of the current form (Goods
    Return/ A/P Credit memo)
    2. Validate the data with a paricular warehouse
    3. Generate warning message.
    I could not find any samples related to this.

    There is a method called MessageBox for the Application object. Have a look at
    the documentation, everything is there.

  • List header for alv grid using abap objects

    Hai all,
          I have displayed alv grid in container control using abap objects i.e. using method set_table_for_first_display.
    now i need to display list header for this alv grid.
    please help me how to create with a sample coding.
    Thanks and regards,
    Prabu S.

    Create a splitter using CL_GUI_EASY_SPLITTER_CONTAINER with a top and bottom half.  Put the alv grid in the bottom half.  Use cl_dd_document (documented in help.sap.com )  to build the header in the top half.  Use events on CL_GUI_ALV_GRID to handle the top-of-list printing.
    Or, if available, use CL_SALV_TABLE, and read the documentation on that.  When I needed a header for my report, that's what I did.  There's plenty of good documentation about if you'll search for it.
    matt

  • How use SDK to insert text in indesign using c++

    Hello All
    I want to  use Indesign CS5.5 SDK  in my  c++ project first to create Indesign Document then insert text in textframe.
    How include SDK in my project ?
    Is it right method to create indesign Application using SDK.
    #include "IApplication.h"
    #include "ISession.h"
    # include "IDocumentCommands.h"
    virtual IApplication *  QueryApplication()=0 ;
    ISession *  GetExecutionContextSession();
    IApplication application(GetExecutionContextSession()->QueryApplication());
    It required so many .h file, first I copy .h file from SDK and put in Project directory but it give some error after including these .h file in project.
    There are so many directory(source,build,docs, etc.) in SDK.How include and use this SDK in my project to create Indesign Document.
    How include so many  .h file in my project ?
    I have already included SDK path in VisualStudio2008 ->Tools->Option->ProjectSolutions->vc++Directories
    Thanks.

    Hi Jongware,
    This is not correct in C# you have type cast all the object to another Object and then only we can access it in required format
    for example
    if want to get font in active Document
    InDesign.Application myInDesign=  (InDesign.Application) COMCreateObject("InDesign.Application");
    InDesign myDocument = (InDesign.Document)myInDesign.ActiveDocument;
    InDesign.ParagraphStyles pStyles = (InDesign.ParagraphStyle)myDocument.ParagraphStyles
    InDesign.ParagraphStyle pSteyls = (InDesign.ParagraphStyle)myDocument.ParagraphStyle
    for(int i =0;i<pStyles.Count;i++)
         pStyle = (InDesign.ParagraphStyle)myDocument.ParagraphStyles[i];
    public static object COMCreateObject (string sProgID)
        // We get the type using just the ProgID
        Type oType = Type.GetTypeFromProgID (sProgID);
        if (oType != null)
            return Activator.CreateInstance( oType);
        return null;
    like above content
    for selection content u have to type cast selection object.
    InDesign.Selection = (InDesign.Selection).myDocument.Selection;
    Console.Writeline(InDesign.Selection.Contents);
    but it showing error....
    like this you have to type cast all things in C# and you cannot simply get selection contents like app.selection[0].contents
    pls help me
    Thank you for your reply....
    R. Thangaraj

  • Data mapping to SAP B1 using SDK

    is there any way around to do the data mapping from other system database to SAP B1
    database without using field to field mapping?
    ex: we want to migrate from other system to B1 we need to transfer their old data to a new one..and of course the database structure is not the same..and it would be a lot of task if we migrate their old PO to B1 (i'm thinking using field to field mapping so we must know the data structure from the old system and provide the information needed when we want migrate it to B1)
    is there any thoughts?
    hope u understand what i mean
    PS: all the migrate things is using SDK
    thanks,
    erick

    Hi Erick,
    I think, using DI API should be better.
    I know that, all data in the database is not supported.
    But, most simple idea is,
    1. Get objects from old company database
    2. review the data by SDK (validating and user field mapping)
    3. add modified objects to new company database
    This should be most same, and you can process many process automatically in process 2.
    Hope this helpful for you.
    Hyunil Choi.

  • How can i execute multiple database operations using multiple objects

    i have data in files which i need to read/parse and insert/update the database. can someone tell me how can i read multiple statements at a time and process using multiple objects.

    This doesn't seem like too much of a JDBC question or at least the answer as I see it isn't unique or specific to JDBC.
    If you want to run multiple processes within your single program then you need to use Java threads. I would recommend you read up on how to properly code Java threads and if you have questions unique to your multi-threaded JDBC implementation come back and ask those questions.
    You may also want tot take advantage of a transaction manager that includes a database connection pool that will handle most of the complexity for you. Depending on the flexibility of your architecture you may not have to do any thread coding at all when using a transaction manager.

  • Is it a good idea to use ABAP objects for reports?

    Hello Experts,
    Is it a good idea to use ABAP objects instead of the traditional ABAP for coding reports?

    Hi,
    Go throught Document it will Give you eight Reasons why OOABAP Should be used.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/37c5db90-0201-0010-3a9b-d0a5288f3c15
    Must go through
    Regards,
    Gurpreet

  • Using lock object

    HI ,
    I have tables which are updated from FM .
    the table have user context .
    my question is if i need to use lock object if i dont create maintenance view for the tables ?
    Or in other words when to use it and when not ?
    Regards
    JOy
    Edited by: Joy Stpr on Oct 18, 2009 8:29 AM

    Hi Joy,
    Well to be specific I had used Locking the object in HR module, so i would like to explain based on that.
    HR modules have many views in a transaction...and they display data from tables.
    now when we change data...at times it is necessary that the data must not be changed at all.
    in such scenarios, we lock the object, means no changes can be done.
    as 1 friend has rightly mentioned abt enqueue function.
    actually theres a function module for enqueue...when u need to make any changes to the data...
    u shud 1st enqueue that particular record, so that no one else can edit it, or work on it....after making necessary changes, u then dequeue it...so that it becomes accessible for editing.
    so, basically locks, as name suggest can be used to prevent editing.
    either temporarily till u r making changes to it....or for a long time...
    but the locks can also be removed by coding...
    Hope this information helps u
    Regards,
    Radhika

  • Error with executable using ActiveX object in ver 7

    I have a top-level VI (version 7 in WindowsXP) that contains an ActiveX control. This ActiveX object further calls several DLL’s, one of which controls the serial port. SubVIs in the top-level VI call this ActiveX object via Invoke Node and Property Node. Everything works in the LabVIEW development environment. The ActiveX object is registered using the “regsvr32” command and is made with Visual C++.
    When I try to build an application of the top-level VI, the executable doesn’t work (giving the error “The server threw an exception.” Error -2147417851). I’ve narrowed the problem down to the ActiveX calls. I’ve tried embedding the ActiveX object and the DLL’s in the executable as support files. I’ve also tried changing the Execution property of the top-level VI from “same as caller” (default) to “standard” (no change) and “user interface” (crashes executable). The application setting “Enable ActiveX server” is checked. I still get the error. Any suggestions?

    I'm not exactly sure what is going wrong, but I have some information that might help. As has been mentioned in some of the referenced posts, Windows has completely different ways of finding DLLs depending on the technology being used.
    When dealing with a COM library, LabVIEW calls CoCreateInstance - a COM method provided by Microsoft to create the object. This method looks in the registery to find the absolute path to the ActiveX DLL. Thus it doesn't matter where your DLL (versus your LV application) is located.
    HOWEVER - If that ActiveX DLL then uses other DLLs via a normal C interface, the rules change. If the ActiveX DLL just links normally (using a .LIB) with these dependent DLLs, then that ActiveX DLL relies on the PATH environment variable to find the DLLs (which typically includes the current directory - and is probably how Chris' app started working). The ActiveX DLL can also call LoadLibrary() directly, and thus can provide an absolute or relative path - raising all sorts of possibilities.
    ACTION ITEM
    Here is my suggestion. Go to www.sysinternals.com and download the File Monitor (http://www.sysinternals.com/Utilities/Filemon.html). Set the filter on the monitor to the name of the EXE (either LabVIEW.exe or your built application). Then run the app. You'll see a lot of entries, but you can then search for the various DLLs in question. Don't be surprised to see FILE_NOT_FOUND errors, you'll get that as Windows probes around the various directories trying to find the DLLs.
    You can do this in both LV and your built app and see the difference in how it searches. That should give you some idea as to what is going wrong. Please feel free to post a follow-up with more questions once you've done this.
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • Add-On Development using SDK Tools

    Hi,
    I am new in this type of development! i.e. using SDK Tools to enhance my SAP B1 functionality.
    I have developed many solution using Oracle Forms Developer
    Forms are highly integrated with Database and we have to just put our business logic in triggers!
    Now what I have found using B1DE
    Forms can be made easily using VS.Net Platform.
    We can Insert data, Updated Date, Find Data ( Very Easy using B1DE )
    The Problem is using SDK Tools B1DE
    How can I create relationship with Tables like
    I am designing a form with includes input of Items
    1*** I need integrity constraints in my form e.g. with Itemcode from OITM Table
    2*** Also I want to select these Items from List (using Tab functionality) not from Formatted search
    3*** Also I want to add some additional fields i.e. not Database Fields
    I haven't found any help from the SDN for these issues
    Or
    I have to do all things manually from the code of VS.Net
    I have viewed third party add-ons i.e. Payroll which have all these functionalities
    Like SAP B1 basic forms.
    which tools they are using i.e. ( Manual coding using UI API, May be ABAP or something else or Axel Windows Components )
    Or should I develop my forms in VS.Net using Axel Windows Components
    I am so confused which path should I select!
    Looking for your response!
    Best Regards,
    Umer Nasim

    Umer Nasim,
    My suggestion is that you take the SAP Business One SDK eLearning training that is located here on SDN at ...
    https://www.sdn.sap.com/irj/scn/elearn?rid=/webcontent/uuid/0039e82a-fcd7-2a10-c380-b17f1e02b543 [original link is broken]
    ... specifically the DI and UI API's.
    Eddy

Maybe you are looking for