Application Development 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: 

Execute URL from ABAP (no gui session)

Former Member
0 Kudos
657

I have an RFC function module which I am calling from Visual Composer application. The function module is designed to execute and external URL using method cl_gui_frontend_services=>execute. However, I am getting an exception error NOT_SUPPORTED_BY_GUI because from Visual Composer there is no SAP gui session open. I have tried some other function modules like WF_WINDOWS_EXECUTE, PRGN_GENER_EXECUTE_URL, CALL_BROWSER...etc but they are all designed to work with gui session only.

Is there any other class or function module that I can use to resolve this issue (w/ example please)?

1 ACCEPTED SOLUTION

GrahamRobbo
Active Contributor
0 Kudos
158

Hi Ali,

it sounds like you want the SAP system to act as a HTTP client. Look [here|http://help.sap.com/saphelp_nw04/helpdata/en/1f/93163f9959a808e10000000a114084/frameset.htm] in the online help for details on how to do this - including sample code.

Cheers

Graham Robbo

2 REPLIES 2

GrahamRobbo
Active Contributor
0 Kudos
159

Hi Ali,

it sounds like you want the SAP system to act as a HTTP client. Look [here|http://help.sap.com/saphelp_nw04/helpdata/en/1f/93163f9959a808e10000000a114084/frameset.htm] in the online help for details on how to do this - including sample code.

Cheers

Graham Robbo

Former Member
0 Kudos
158

Hi,

For opening a url through ABAP,

Try using a sample code below:



 DATA: BEGIN OF URL_TABLE OCCURS 0,
         L(35),
       END OF URL_TABLE.

 url_table-l = 'http://www.abc.com'.

 APPEND url_table.

 CALL FUNCTION 'WS_EXECUTE'
   EXPORTING
     program        = 'C:\Program Files\Internet Explorer\IEXPLORE.EXE'
     commandline    = url_table
     inform         = ''
   EXCEPTIONS
     prog_not_found = 1.

 IF sy-subrc <> 0.
   WRITE:/ 'Cannot find program to open Internet'.
 ENDIF.

Hope it helps

Regards

Mansi