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 multiple URL in call browser

Former Member
0 Likes
814

hi

i am having internal table having a multiple Url . each row consists of different URl.

i am calling the call browser functional module in Inside the Loop .

what i am geting is , when the first record ( URL) gets generated . it will call the Browser . sms sent and its not calling the second record even though its in loop.

what has to do. any parallel processing / asynchronous processing posible

hi

i am having internal table having a multiple Url . each row consists of different URl.

i am calling the call browser functional module in Inside the Loop .

what i am geting is , when the first record ( URL) gets generated . it will call the Browser . sms sent and its not calling the second record even though its in loop.

what has to do. any parallel processing / asynchronous processing posible

2 REPLIES 2
Read only

Rashid_Javed
Contributor
0 Likes
598

I was browsing forums and your problem seem to be stuck in my brain. It keeps coming back again and again :-).

Anyways, I find out that instead of using CALL_BROWSER, if you can use the execute method of cl_gui_frontend_services, it will work. Just pass internet explorer exe file path in 'APPLICATION' parameter and you url in 'PARAMETER' parameter.

However there is one problem and that is how to get the filepath for internet explorer exe file. On most PCs it will be like C:\Program files\Internet Explorer\iexplore.exe' , so you can hare code this. OR you can read it from registry as per the following

DATA: kstr TYPE string, vstr TYPE string,
      convstr TYPE string.

kstr = 'SOFTWARE\Classes\Applications\iexplore.exe\shell\open\command'.
CALL METHOD cl_gui_frontend_services=>registry_get_value
  EXPORTING
    root                 = cl_gui_frontend_services=>hkey_local_machine
    key                  = kstr
  IMPORTING
    reg_value            = vstr
  EXCEPTIONS
    get_regvalue_failed  = 1
    cntl_error           = 2
    error_no_gui         = 3
    not_supported_by_gui = 4
    OTHERS               = 5 .
IF sy-subrc <> 0.
  WRITE:/ 'registry read error subrc=', sy-subrc.
  EXIT.
ELSE.
  TRANSLATE vstr USING '% 1 '.
  CONDENSE vstr.
ENDIF. 

Once you have explorer file path in VSTR, can can call the execute method as following.

Assumption: ITAB-STR is of type string and contains url like 'http://www'google.com' etc.

LOOP AT itab.
  CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
       application            = vstr
       parameter              = itab-str
    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.
    WRITE:/ 'Error in EXECUTE, subrc =', sy-subrc.
  ENDIF.
ENDLOOP.

RJv
Read only

Former Member
0 Likes
598

answered