Calling Visual Basic Program

Dear Friends,
How can we call a vb program and pass some parameter and internal table from a ABAP Program.
Any help highly appricated.
regards
Malik

Hi Malik, try this.
parameters: lp_file type rlgrap-filename default
  'C:\somepath\someVBS.vbs' obligatory lower case.
data: gv_file_string type string.
at selection-screen on value-request for lp_file.
  call function 'F4_FILENAME'
    importing
      file_name = lp_file.
start-of-selection.
  gv_file_string = lp_file.
  call method cl_gui_frontend_services=>execute
    exporting
      application            = gv_file_string
    exceptions
      cntl_error             = 1
      error_no_gui           = 2
      bad_parameter          = 3
      file_not_found         = 4
      path_not_found         = 5
      file_extension_unknown = 6
      error_execute_failed   = 7
      synchronous_failed     = 8
      not_supported_by_gui   = 9
      others                 = 10.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
               with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  else.
    message id 'NC' type 'I' number '058'.
  endif.
Kevin

Similar Messages

  • Communicate with a USB port, DLL in Visual Basic, program in LabVIEW

    Hello !
    I have to write a program in LabVIEW (I'm a novice in this language) to communicate with an interferometer via an USB port. The drivers and DLL for the USB port are written in Visual Basic.
    -I don't know if it's possible to use them just so, or if I need to adapt them to LabVIEW.
    -And how to do to call a particular function of my DLL ?
    Thank you for your answer...
    Gaelle

    Nakaose,
    You should refer to these links:
    Tutorial: Sharing code with VB:
    ==>  http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&5F9B8F1FF859549186256E5C0005457D
    Tutorial: Can LabVIEW C?:
    ==> http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&FD4B480C24A159BD86256E60005B0120
    Best regards,
    JPR
    NIF

  • How to call Visual Basic Component's method (DLL)in Java

    Hi people ,
    I need to make calls to methods from a dll . Why ? because the main project is in java and I am a java developer . This dll is the API of an other system that we need to access .
    I have searched this on google as you normally do . I found Jacob and some examples using javah . But all the references are old . The latest file I downloaded (version 1.5) was written in 2004 .
    Like wise all the results I get on google are old like from 2000 and even 2001 . What are standard practices for this now a days . The dll is written in Visual Basic .
    Any help will be appreciated .

    mycoffee wrote:
    Shahzeb wrote:
    Hi people ,
    I need to make calls to methods from a dll . Why ? because the main project is in java and I am a java developer . This dll is the API of an other system that we need to access .
    I have searched this on google as you normally do . I found Jacob and some examples using javah . But all the references are old . The latest file I downloaded (version 1.5) was written in 2004 .
    Like wise all the results I get on google are old like from 2000 and even 2001 . What are standard practices for this now a days . The dll is written in Visual Basic .
    Any help will be appreciated .That is history
    Why do you need a method in VB? everything vb can do, java can do better :JK
    Need more information to know what are you going to doWell that's an invain argument but I agree in principle .
    That DLL is not my code , it is api for some other application that we need to access . A system written by some other company whose API is exposed to us in a DLL . I need to use that simple as that .

  • Call visual prolog program from java

    Hi friends,
    is there someone help me to call ( run) prolog program from java.
    i write a parser with Javacc parser generator and stored parsed information in prolog database and I want create some query in java that work in the prolog file.
    how can i combine java and prolog programs. i used visual prolog.
    Can someone help me?
    Thanks you in advance.
    yours sincerely,
    ksu

    Since visual prolog can produce dll's, you can use JNI:
    http://java.sun.com/j2se/1.4.2/docs/guide/jni/index.html

  • How to call visual basic exe file from LABVIEW 7.1

    Hi all,
    I would like to call a visual basic 6.0 application(executable file) from labview 7.1 kindly anyone is having code or papers send me.
    Thanks and Regards
    rajesh

    Hi all,
    i would like to run a visual basic programme from labview , i have attached my file , even though iam executing the programme iam not able execute the vb file , kindly suggest me ,
    Regards
    rajesh
    Attachments:
    active x.vi ‏18 KB

  • How to call Visual basic MACRO code in ABAP

    Hi all,
    I created one MACRO in Microsoft office and now i want to call this macro in my ABAP program.
    How to do this can anyone provide me the logic for this....
    Regards.

    What Office application/document has the macro?  What the other poster was referring to is that you can open any type of Office document, E-mail editor, PDF document, simply by executing the filename or appropriate shell command.  By opening the Office document that has the embedded macro, you would trigger that macro to execute.  Is that what you need?
    Here is a simple example (with a hard-coded filename):
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
      EXPORTING
        DOCUMENT               = 'C:\temp\mydoc.doc'
      EXCEPTIONS
        CNTL_ERROR             = 1
        ERROR_NO_GUI           = 2
        BAD_PARAMETER          = 3
        FILE_NOT_FOUND         = 4
        PATH_NOT_FOUND         = 5
        FILE_EXTENSION_UNKNOWN = 6
        ERROR_EXECUTE_FAILED   = 7
        SYNCHRONOUS_FAILED     = 8
        NOT_SUPPORTED_BY_GUI   = 9
        OTHERS                 = 10.
    As I mentioned, this is also useful for triggering other applications, such as your resident e-mail editor, based on a click of an e-mail address in a GUI screen:
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
        EXPORTING
          DOCUMENT               = 'mailto:(put address here)'
        EXCEPTIONS
          CNTL_ERROR             = 1
          ERROR_NO_GUI           = 2
          BAD_PARAMETER          = 3
          FILE_NOT_FOUND         = 4
          PATH_NOT_FOUND         = 5
          FILE_EXTENSION_UNKNOWN = 6
          ERROR_EXECUTE_FAILED   = 7
          SYNCHRONOUS_FAILED     = 8
          NOT_SUPPORTED_BY_GUI   = 9
          OTHERS                 = 10.

  • HT3775 how can i write visual basic programs on my mac? and what IDE do i use? My mac runs on OS X mavericks.

    please help

    Install MS Windows as a Virtual Machine guest operating system on your Mac.  You will want a minimum of 8GB memory. Popular VM are VirtualBox, Parallels, and VMware. Once this is done, you can download the Microsoft Visual Studio 2013 development environment into WIndows 7 in the VM, and use it there.

  • API Files for Visual Basic Program?

     

    is there any software I need to install to get the EB32.BAS file?I am able to see API under server information.thanks ALL

  • 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

  • Unable to load gpib-32.dll when running the visual basic 2008 program

    I installed NI-488.2 into my PC, window 7 64 bit OS.
    In the program >> project> add reference>.NET, I successfully add the NI.4882  into my visual basic  program.
    By the way, this program worked well in another window 7 32 bit PC.
    But when I run the program at ildev(BDINDEX,.........), error comes up as "unable load DLL gpib-32.dll".
    So when I looked at c:\windows\system32, I can not fine gpib-32.dll.
    Doesn't  NI-488.2 driver install gpib-32.dll?
    How can I install gpib-32.dll?

    SeongCho wrote:
    Nyc, thank you for your reply.
    By the way, I think I did all the link explained.
    So I have no problem in  adding  NI488.2 to my program's reference using "add reference".
    The problem is GPIB statement like ildev() looks for "gpib-32.dll".
    But there was no gpib-32.dll installed in "c:\windows\system32" so error comes up with "unable to load gpib-32.dll".
    I did the same procedure in my another PC(window 7 32 bit OS,my current PC is window 7 64 bit OS), and in that PC I can see the gpib-32.dll in that directory and program run without problem.
    I do not know how gpib-32.dll was installed in my previous PC.
    Thanks
    Seong
    Have you looked at the example programs for .NET that install with NI-488.2?
    You need to start thinking in terms of .NET 

  • Strange axbridge issue with Visual Basic

    I started having a very strange problem with my axbridge wrapped bean around the time I switched to JDK 1.5. Problem is, I can't seem to get rid of it by rolling back to earlier versions.
    Here's what happens: I create a very simple non-visual bean:
    package pack;
    public class Bean1 {
    public Bean1()
    System.out.println("Constructor");
    public boolean someMethod ()
    System.out.println("1");
    return false;
    I then create Bean1.dll using the packager.exe provided with the JDK, and register it as part of the packaging process.
    Then, I go into Visual Basic 6 and enter this code:
    Private Sub Command1_Click()
    Dim xx As Object
    xx = CreateObject("Bean1.Bean.1")
    End Sub
    On the CreateObject call, Visual Basic gives me the error "Object variable or With block variable not set", which isn't helpful.
    In the Java console with level 5 tracing turned on, I see this:
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@17ba38f, refcount=1
    basic: Registered modality listener
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter@9ffe3f
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    basic: Stopping applet ...
    basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@9ffe3f
    basic: Finding information ...
    basic: Releasing classloader: sun.plugin.ClassLoaderInfo@17ba38f, refcount=0
    basic: Caching classloader: sun.plugin.ClassLoaderInfo@17ba38f
    basic: Current classloader cache size: 1
    basic: Done ...
    basic: Joining applet thread ...
    basic: Destroying applet ...
    basic: Disposing applet ...
    basic: Quiting applet ...
    java.lang.NullPointerException
         at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    basic: Exception: java.lang.NullPointerException
    java.lang.NullPointerException
         at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    basic: Modality pushed
    basic: Joined applet thread ...
    basic: Unregistered modality listener
    The only thing I've found in the bug database that seems even remotely related to this is bug 6391104, which is related to plugins somehow.
    I do not understand why applets are involved in this at all.
    When I try to instantiate the COM object from a C++ program, everything works fine. My problem only seems to occur with Visual Basic (version 6, not .NET).
    This problem seems so fundamental that it seems impossible that no one else has run into it, but there 's nothing about it on any forum or buglist that I've seen. So, I figured there must be something very obscure wrong with my setup. However, I tried installing this on a brand new machine using my trivial case, and I still have the problem. I'm really at my wits' end. Anyone have any ideas?

    You definately want to go to CR 2008. I'd recommed that you call 866-681-3435 and ask about the possibility of getting a 30 day eval.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Receiving very large amounts of data via ibrd in Visual Basic

    I am trying to read anything from a single byte up to 2Mb of data back into a Visual Basic program. Until now I have been using something like
    Dim Response as string * 60000
    ibrda hDevice, Response
    which works fine up to the magic 65536ish string size limit, but I want more!
    Ideally reading into a very large byte array would suffice, e.g.
    Dim ByteBuffer(0 To 2000000 - 1) As Byte
    ibrd hDevice, ByteBuffer
    But I cannot find a way to get the gpib-32.dll to accept the ByteBuffer as a destination in Visual Basic, even though ibrd32 is declared in vbib-32.bas as accepting Any type as a destination, and a Long as a count, implying the the 65536 limit doesn't apply for that call.
    It may be possibl
    e to use repeated ibrd calls until one such call fails to fill the buffer, concatenating the results each time, but this seems a crude solution when the DLL would appear to be able to do the job in one go.
    Using ibrdf may work, but would rather not use a file as intermediate storage.
    TIA

    I'm wondering if that # 65536 is a VB cap for string type. Refering to the lang intf,
    Declare Function ibrd32 Lib "Gpib-32.dll" Alias "ibrd" (ByVal ud As Long, sstr As Any, ByVal cnt As Long) As Long
    Sub ibrd(ByVal ud As Integer, buf As String) <---
    Dim cnt As Long
    cnt = CLng(Len(buf))
    Call ibrd32(ud, ByVal buf, cnt)
    isn't buf a string type?

  • Alternative of Microsoft visual basic power packs

    Hello there,
    Is there any alternate to Microsoft visual basic power packs??
    Now i am using visual basic power packs for displaying email details in proper manner like sender name,subject,date & time in one particular row. So is there any other option for doing such things apart from Microsoft visual basic power packs?? 
    Thank in advance.

    The AutoCad Tutorial in the below link says you can use Visual Studio Express
    Jesus Espiga. For 2010 Visual Studio for Visual Basic express version was called Visual Basic 2010 Express.
    Autodesk - My First Plug-in Training
    You don't provide a link to the Tutorial you are using which of course makes it difficult to know much about the issues you may be having.
    Maybe the Tutorial is using a different year of Visual Studio Express or Visual Studio in the video Tutorial. So of course the Visual Studio IDE (GUI, whatever) would appear different, the controls and other things may be different than the Visual Basic
    Express 2010 IDE.
    That doesn't mean Visual Basic 2010 Express can not do what you need to do. Mostly it means you are probably unfamiliar with Visual Basic programming and therefore do not understand how to implement the desired capabilities shown in the tutorial on one version
    of Visual Studio with the version of Visual Studio you are using.
    So unless you can explain in more detail why you are having issues I will guess it is because you can't follow along due to differences in the Visual Studio used in the tutorial and the Visual Basic 2010 Express you are using with regard to limited knowledge
    on your part of using Visual Basic 2010 Express in the first place. Therefore unable to transfer what is going on in the video to what you need to be doing in Visual Studio.
    La vida loca

  • How do I use the Oracle Developer Reporting Control in Visual Basic 6.0?

    I was wondering how to use the Oracle Developer Reporting Control componant in Visual Basic 6.0 to generate reports in Oracle Reports? Any help would be appreciated.

    Hi Rohit,
    Would like to ask you some questions about the oracle report with Visual Basic.
    1. I have a report built in oracle report. Currently there is a Visual Basic program want to pass some parameter to this report. Can Visual Basic program pass the parameter to this oracel report?
    2. Based on yr answer, do i have to installed the oracle report? or just copy and register the Rwsxa60.ocx (i'm using oracle report 6i) in the PC? So can i use this activeX control.
    3. Is this activeX control similar to Crystal report object which can found in VB?
    4. Is there an example/guide on how the Visual Basic pass the parameter to oracel form?
    Your answer will be much appreciated.
    Thanks.
    Regards,
    Hock Leong

  • How to install visual basic 6.0 in windows 8

    Hi microsoft team,
     I recently download the visual basic 6.0 in my windows 8 laptop. But it is not working properly in my system.
    When i was run the visual basic program it will show "visual basic has stopped working window is checking solution for the problem"like this.
    My program is not running. Please tell me the remedy for this kind of problem.
    Thank you

    Hello Vijayalakshmi,
    First of all, please make sure that you run the installer with elevated permissions (run as an administrator).
    Also please take a look at the
    Install Visual Basic 6 in Windows 8 guide. It describes all the required steps for installing VB6:
    1. Right click on setup.exe of your VB6 install and check Run as Administrator with XP SP 3 compatibility pack. I tried Windows 7 compatibility, it also worked.
    2. During the setup, go to components and select everything you want to install except for "Data Access". If "Data Access" is selected, the install will hang even though everything will be installed. Disabling "Data Access"
    ensures that the install completes and restarts your computer to finalize the install. Why this hangs the system is beyond me. LOL.
    3. I am using a 64bit machine, this is not supported by Microsoft and will not be supported as VB6 is 32 bit and should be hosted in 32 bit system. Thus some controls in my system didn't work. I found my listview control didn't want to burge at all.
    4. Download and install VB6 Service Pack (SP6) Runtime Extended (what??) from http://support.microsoft.com/kb/957924?wa=wsignin1.0
    5. Now you can start vb6 ide and code, everything should be mnca!
    6. Step 1 done, now to code and install my VB6 app in some WinXp, Vista and & 7 machine!!
    crossing fingers
    Finally, you may also find the
    Visual Basic 6 on Windows 8 article helpful.

Maybe you are looking for