2010 Jun 02 7:25 AM
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
2010 Jun 06 9:50 AM
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.
2010 Aug 12 11:51 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |