Trouble Calling InspectionLot.GetDetail from Visual Basic 6.0

I am having difficulty trying to retrieve data from the InspectionLot object in SAP using VB and the SAP ActiveX Control.  We are on SAP ECC6.  I've successfully called the InspectionLot.GetList BAPI, but am struggeling with the GetDetail.
Here is my code after I have successfully logged into SAP.  My problem seems to revolve around the Dimas method.
Dim oBAPICtrl As Object
Dim objInspLotDetail As Object
Dim objUsageDecisionData As Object
Dim objSystemStatus As Object
Set oBAPICtrl = CreateObject("SAP.BAPI.1")
Set objInspLotDetail = oBAPICtrl.GetSAPObject("InspectionLot", "090000093993")
After calling this DimAs function objUsageDecisionData is equal to Error 0
Set objUsageDecisionData = oBAPICtrl.DimAs(objInspLotDetail, "GetDetail", "UsageDecisionData")
After calling this DimAs function objSystemStatus is equal to a data structure as expected
Set objSystemStatus = oBAPICtrl.DimAs(objInspLotDetail, "GetDetail", "SystemStatus")
The next call returns 4 rows into the objSystemStatus data structure, but obviously nothing into objUsageDecisionData
objInspLotDetail.GetDetail UsageDecisionData:=objUsageDecisionData, _
                           SystemStatus:=objSystemStatus
'Note: I can see in the BAPI Explorer that the UsageDecisionData is not marked as a table, but it returns fields in a table like structure.  How do I get these values?
Thank you for any assistance you can provide.
Regards,
Paul
p.s. Is this the correct forum to post this question?
Edited by: Paul Murray on Oct 15, 2009 10:13 PM
Edited by: Paul Murray on Oct 16, 2009 7:20 PM

My mistake, it was returning a structure, just a different type that I couldn't read with the VB IDE Variable Watch utility.

Similar Messages

  • Type Mismatch error while calling a Java Function from Visual Basic 6.0...

    Hi,
    I'm having a problem in calling the Java Applet's Function from Visual Basic. First, I'm getting the handle of the Java Applet and components of it using "Document.Applets(n)" which is a HTML function. I'm calling this function from Visual Basic. My code is something like this...
    ' // Web1 is IE Browser in my Form.
    Dim Ap,Comp
    Dim Bol as Boolean
    Bol = true
    Ap = Web1.Document.Applets(0).getWindow() ' \\ Gets the Parent Window.
    Ap.setTitle("My Java Applet") ' \\ Sets the Title of the window.
    msgbox Ap.getVisibility() ' \\ This will return a Java boolean ( true or false )
    Ap.setVisibility(Bol) ' \\ Function Syntax is : void setVisibility(boolean b)
    Here in my code , i'm able to call any function that which accepts Integer or String but not boolean. So, i m facing problem with Ap.setVisibility() function. It gives me a "Type mismatch error" while executing it. Can you please tell me a way to do this from Visual Basic !
    I'm using Visual Basic 6.0, Windows 2000 , J2SDK 1.4.2_05.
    Please help me Friends.
    Thanks and Regards,
    Srinivas Annam.

    Hi
    I am not sure about this solution. try this
    Declare a variable as variant and store the boolean value in that variable and then use in ur method.
    Post ur reply in this forum.
    bye for now
    sat

  • Calling a dll created with vision 7.0 from visual basic doesn't work

    I created a dll using some vision 7.0 functions and Labview 7.0 environment. I call this dll from visual basic. The dll will work fine as long as I don't stop the visual basic program execution. As soon as I stop the program execution the dll will no longer work. I must reload the visual basic environment and the call to the dll will start working again. I created the exact same dll but I created it with vision 6.0 in Labview 6i environment. It works great and has no issues.
    Attachments:
    Test.vi ‏36 KB

    Roberto N. wrote:
    Thank you Jordan, I'm using Labview 7.1.
    Anyway I've resolved the problem by adding the "lvanlys.dll" file (present in "..\Labview 7.1\resource\lvanlys.dll" path) as support file in the building process. Now the DLL containing the analysis functions works correctly.
    Natalino Roberto
    Ok, you probably got lucky since the lvanlys.dll seems to implement that function directly. However most Advanced Analysis functions are just redirected by lvanlys.dll to the Intel Math Kerneal Library that gets installed with LabVIEW 7.1 and higher. The only way to get that properly installed with your LabVIEW executable or DLL is to create a LabVIEW installer in your Application Builder and make sure to select under "Installer Settings->Advanced" the "LabVIEW Run-Time Engine" and the "Analyze VIs Support". Then use that installer to install your DLL on another computer.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Creating a DLL in Labview 8.6 and calling it from Visual Basic 6.0

    Dear friends,
    I need to create a DLL in Labview 8.6 and call it from Visual Basic 6.0. The system works as follows:
    I made an application using Labview 8.6 + Vision Assistant 8.6 where I can obtain the x,y coordinates of a template in an certain image being captured by an USB camera. The template coordinates change every time it moves and Visual Basic 6.0 must read these x,y values in real time. I found some information in the link http://zone.ni.com/devzone/cda/tut/p/id/3925, but it works for version 6.x of Labview and 8.6 version is different. Am I in the right path? If you have an updated tutorial like the one in the link above but for Labview 8.6 It would be very nice. Please help me.
    Kind regards.
    João Júnior

    Hello Osvaldo,
    I analysed the updated tutorial you sent me, but the thing is that it doen't show how to create the DLL in LV 8.6 but only show how to accessing the DLL from VB6. My problem is really HOW TO CREATE THE DLL IN LV8.6. In the link http://zone.ni.com/devzone/cda/tut/p/id/3063 there is detailed information about how to do this in LV6.x, the problem is that I don't find the path Tools»Build Application or Shared Library (DLL) in LV8.6, I think the procedure in LV8.6 is a little bit different. Don´t you have an updated tutorial on how to build a dll in LV8.6?How could you help me?
    Kind regards.
    João Júnior

  • How can I get the version of the GPIB driver from Visual Basic ?

    I want to readout from visual Basic which version of GPIB-Driver is installed on the PC. I must change some parameters for my application when GPIB 2.0 runs instead of 1.7.
    Thanks for any solution...

    Hi,
    The driver should create a key in registry depending on the driver version. Check for the existance of HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\NI-488.2M\ (In my case I had a folder called 2.00).
    Hope this helps out.
    Best Regards,
    Aaron K.
    Application Engineer
    National Instruments

  • How to set the password encrytacion a database. Accdb from Visual Basic 2010 for a report. Rpl

    I want to know how to set the password encrytacion a database. Accdb from Visual Basic 2010 for a report. Rpl

    You have to connect via ODBC, then use code along the lines of what is described here:
    http://scn.sap.com/thread/3526924
    by me on March 28 and Jan on March 29.
    Also see KBA: 1686419 - SAP Crystal Reports designer does not recognize Access *.accdb file
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • How to connect to oracle database from visual basic 2010 express edition

    I have installed visual basic 2010 express edition on windows xp. But visual basic 2010 express edition supports Microsoft sql server database file,Microsoft sql server compact 3.5, Microsoft access database file. I want to connect to oracle database from visual basic 2010 express edition. So what drivers are required and how to do connectivity?

    Hello,
    I wasn't clear on what you were using to make the connection. I had a look in Visual Studio 2010 (don't have express to test sorry).
    I think you mean the Data Sources available under the menu Data-> Datasources. this seems to match the description you give when I
    look at the list of datasource options.
    In here you can make ODBC connections via the Microsoft .net Data Provider .
    If you select ODBC as a datasource you can see listed the DSN's you created - for example I see 2 which use the Oracle ODBC driver.
    This assumes you installed an Oracle Client + the oracle version of the ODBC driver (comes with the oracle client).
    Once you created a server connection then you should see it in the server explorer.
    You can also download the Oracle Developer Tools for Visual Studio which is an add on for VS.
    ** I suspect this is only for VS 2010 and I didn't see that Express was supported.
    http://www.oracle.com/technetwork/developer-tools/visual-studio/overview/index-097110.html
    Let me know if that helps.
    John

  • Can anyone help i want to call java class using visual basic

    I want to call java class using visual basic and send some arguments to the main class

    Hi,
    I don't know VB, but you can surely launch a command line like :
    javaw.exe mypackage.MyMainClass myArgument1
    Regards

  • ActiveMovie Control,Translating ActiveX calls from Visual Basic into Labview

    Hello,
    I want to use DirectX to display a movie. In the attached file is a Visual Basic example
    which I tried to translate into Labview.
    To play the movie IMediaControl from ActiveMovie control type library Version 1.0 C:\WINDOWS\system32\Quartz.dll) is used.
    To display the current Position I tried to wire the IMediaPostion. But I have no idea how to implement this in the Block Diagram.
    After opening it the following message is shown.
    Error 3005 occurred at Automation Open: Object specified is not creatable in Play Movie Current Possition.vi
    Attachments:
    Play_Movie_Current_Possition.vi ‏48 KB

    Hello Joe,
    the Windows Media Player has a lot of overhead. I also found it difficult to deal with the different Versions.
    I want to display data in a graph and show the connected video frame in a separate window.
    I used the QuartzTypeLib because it is on every Windows Computer and is easy to code in VB.
    With one call I can start the video in Labview., but I find no way to wire the current position. I do not really understand how ActiveX is implemented in Labview. I attached a LV 7.0 vi. I hope you can open it.
    Tiemo
    Attachments:
    Play_Movie_Current_Position.vi ‏63 KB

  • Help me plz: Connect to tuxedo from visual basic 6.0 client application

    Hello everyone,
    i have a big problem
    i try to connect my visual basic application 6.0 to the tuxedo, but i dont know how to use tpinit and tpcall in vb environnement.
    that my code:
    Private Declare Function tpinit Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" _
    (ByVal vlTpInfo As Long) As Integer
    Private Declare Function TpTerm Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" Alias "tpterm" () As Integer
    Private Declare Function TpCall Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" Alias "tpcall" _
    (ByVal vsServiceName As String, ByVal vlBufPtr As Long, ByVal vlBufLen As Long, _
    ByRef rlReplyBufPtr As Long, ByRef rlReplyBufLen As Long, ByVal vlFlags As Long) As Integer
    Private Declare Function TpAlloc Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" Alias "tpalloc" _
    (ByVal vsTpType As String, ByVal vsTpSubType As String, ByVal vlSize As Long) As Long
    Private Declare Sub TpFree Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" Alias "tpfree" (ByVal vlBufPtr As Long)
    Option Explicit
    Type tpinfo_type
    username As String
    cltname As String
    passwd As String
    flags As Long
    datalen As Long
    data As String
    End Type
    Dim tpinfo As tpinfo_type
    tpinfo.username = "cajat05"
    tpinfo.passwd = "cajat05"
    tpinfo.cltname = "VB6"
    tpinfo.flags = 110
    tpinfo.data = "NMLRS 55502022"
    tpinfo.datalen = 14
    Dim ret_init As Integer
    Dim ret_tpalloc As Long
    ret_tpalloc = TpAlloc("tpinfo", "", 9000)
    MsgBox "ret_tpalloc = " & ret_tpalloc
    'ret_init = tpinit(900)
    'MsgBox "ret_init = " & ret_init
    Dim s As String
    If ret_init = 0 Then
    msgbox "good"
    Else
    msgbox "not good"
    End If
    Can any one send me the code he made for a similar case ?
    Thank you in advance.
    Edited by: user3465258 on 2 août 2010 14:57
    Edited by: user3465258 on 2 août 2010 15:44
    Edited by: user3465258 on 2 août 2010 18:00

    As an alternative you may want to consider writing a "C" DLL that is callable from VB. The DLL would make the Tuxedo "tp" calls and check all the return codes and the functions defined in the DLL would simplify the interface to VB. I have done this successfully in the past.
    Harvey

  • Can not select the VISA library (visa32.dl​l) as a reference from Visual Basic.

    I have a copy of Labview base package version 5.1.1 and Microsoft Visual Basic 6.0 in my PII 333 128M PC. I like to use the NI-VISA feature to develope my own testing program by using Visual Basic. However, the NI-VISA library (i.e. visa32.dll) can not be found from the Visual Basic reference library.

    Go PROJECT | REFERENCES menu. In the list, look for "VISA library".
    If the list does not show it, then BROWSE the visa32.dll located in the
    WinNT\SYSTEM32 folder.
    If the VISA library is earlier than V2.x, there is no TypeLib supported.
    Makoto
    "rfan99" wrote in message
    news:506500000008000000B6180000-984882144000@quiq.​com...
    > I have a copy of Labview base package version 5.1.1 and Microsoft
    > Visual Basic 6.0 in my PII 333 128M PC. I like to use the NI-VISA
    > feature to develope my own testing program by using Visual Basic.
    > However, the NI-VISA library (i.e. visa32.dll) can not be found from
    > the Visual Basic reference library.

  • How to call a BAPI from Visual Composer

    hi,
       I am new to Visual composer. can some body give me step by step information of calling a bapi or RFC from VC.
    Thanks in advance,
    Gopi

    Hi Gopi,
    Steps involed for calling RFC/BAPI from VC
    1. Choose Model->Select Data Services.
    (Alternatively, click the Data button in the task panel toolbar.)
    2. In the Portal field at the right end of the main toolbar, enter the URL of the portal from
    which you can access the back-end system used by the iView.
    For example, you could enter: http://<yourportal>:50000/..
    3. Click the traffic light icon to the right of the Portal field. The portal Welcome screen
    appears.
    4. Log on to the portal as a user that exists in the connected back-end system, or which is
    mapped to a user of that system. Click OK.
    Once a connection to the portal is established, a list of system aliases defined in the
    portal system landscape appears in the System drop-down
    list.
    From the System drop-down list, choose the SAP system that contains the function module.
    6. Under Search SAP System, click the Search tab and in the Name field, enter the search string: <RFC/BAPI name>. Then click Search (at the bottom).
    5. A list of function modules matching the search string is displayed.
    7. Drag the function module/bapi from the Data task panel into the
    workspace: The data service is added to your model.
    8. Periodically save your work. To do so, choose File->Save Model.
    Finally test the iview in VC.
    In the workspace, drag your mouse from the Input port of the data service, <inputform> and dragn your mouse from the outut port from the data service <tabelview and etc..>
    or
    Go through the this documentation...
    http://help.sap.com/download/netweaver/nw04/visualcomposer/VC_60_UserGuide_v1_1.pdf
    Thanks,
    Suriya.

  • Can WEBUTIL_C_API call dll coded in visual basic

    Hi all
    I wonder if WEBUTIL_C_API supports calling methods in a dll coded in Visual Basic? Or it only supports C, C++ and Visual C++?
    Thank you

    Hi
    I am wondering because in webutil documentation I found this:
    The WebUtil_C_API is a comprehensive API which allows you to call into C libraries on the client. The API only supports Win32 Clients.
    Thank you

  • Call stored procedure in Visual Basic 6.0 and datatype CLOB

    Hi
    Has somebody a Visual Basic 6.0 Sample Code which can call the following example procedure.
    test_package.getTestdata(
    pPeid IN NUMBER,
    pReturn OUT NUMBER,
    pData OUT CLOB
    Many Thanks in advance.
    Best regards
    Martin

    hi,
    give these links a try:
    http://help.sap.com/saphelp_nw04/helpdata/en/7f/c6dc63c54811d194af00a0c94260a5/frameset.htm
    and further:
    http://help.sap.com/saphelp_nw04/helpdata/en/72/90fd343603c95ee10000009b38f844/frameset.htm

  • Migrating Application FROM Visual Basic

    Hi Everyone,
    I have an application written in Visual Basic (Front End) and SQL Server as the Back End. Now this application should run on the web i.e need to web enable the application.I have coded in Java for sometime now,but I do not have any prior knowledge as to build a Web application from scratch.Can anyone let me know
    how to procced.I would like to use open source like JDK for development.Eclipse for IDE.
    Thanks,
    Supriya.

    First off let's get VB specific -- Are you using Access as a local database and container for your queries? If you are then read on, otherwise, the information already give is excellent and complete enough to get you well on your way.
    1 - You are going to have to conver all of your queries either to SQL and store them in a business layer, or create stored procedures for them on the server. I strongly recomend the stored procedure route to hide any detail of your dataserver as much as possible and supply tighter security for table access.
    2 - Your web server is going to be a significant ralleying point for your data and return HTML generation, you should take that into consideration with your IT staff and how it will affect other applications on that server. (It will probably not have sufficient impact, unless you already have your own dedicated server for this application)
    3 - As mentioned by the others, the Applet/Servlet or JSP/Servlet configuation will serve you very well for your application.

Maybe you are looking for

  • After record insertion error!! Help please!!

    I get this error after I insert fields into database. Error Executing Database Query. Syntax error in INSERT INTO statement. The error occurred in D:\Hosting\derekwit\more.cfm: line 100 98 : <cfelse> 99 : NULL 100 : </cfif> 101 : ) 102 : </cfquery> S

  • Windows 8.1 explorer.exe error, on shutdown

    Hello I am experiencing a problem, after I upgrade to Window 8.1, i get "explorer.exe - Application Error" dialog every shutdown. Which reads The instruction at 0x42e93cd9 referenced memory at 0x00000000. The memory could not be read. It then only gi

  • How to make ECC subcon delivery NOT MRP relevant?

    Experts, need help to make the ECC subcontracting delivery (LB) that moves components from plant to vendor to be MRP irrelevant so it doesn't go to APO. Any idea?

  • Show Track Volume button missing

    I'm trying to edit clip volumes in the timeline and I have no 'Show Track Volume' button. The button is simply not there. Do I need to enable this button or the the software corrupt? Cheers!

  • Icon behavior in Jbuttons

    Hi, I'm a new programmer in java and I need help. I have to do one JButton matrix and I have to set one Icon to each JButton.The problem is that, I don't know how I can do to set more Icons to the same JButton and changing the Icon by click. I have t