Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Calling Visual Basic Program

Former Member
0 Likes
722

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

6 REPLIES 6
Read only

Former Member
0 Likes
687

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

Read only

Former Member
0 Likes
687

cl_gui_frontend_services=>execute

use this method, pass the application name and parameter

Read only

Former Member
0 Likes
687

Thanks for replies.

how can we pass the internal table to that application.

regards

Malik

Read only

0 Likes
687

does the application takes tables as input???

Read only

0 Likes
687

Thanks for prompt reply.

let me check that is Visual Basic program allowing us to put a table as input?

or if you have any idea tell me.

regards

Malik

Read only

Former Member
0 Likes
687

a