Skip to Content
0
Jul 04, 2006 at 12:29 PM

How to open a web page from a BSP ? Or swap from the actual URL to another?

68 Views

Hi,

I have a BSP, executing some data loading. It works fine.

I am trying to enhance it by adding a call to another URL, at the end of the program.

The same code works when I execute it from transaction SE38. However, when this is executed from the BSP itself, the return code of the function CALL_BROWSER is 2.

I made som debugs, and the CALL_BROWSER function executes another function which is WS_QUERY. And there, SAP seems not being able to find wich system it is running on.

Has someone done that before?

Here is the code of my BSP (the same that works in SE38):

DATA : appname TYPE string,

ls_page_name TYPE string,

cb_true TYPE boolean,

cb_false TYPE boolean,

url TYPE string,

c_url(2054) TYPE c.

MOVE : 'ZPC_STKVTES' TO appname,

'zpc_stkvtes.htm' TO ls_page_name,

'X' TO cb_true,

'-' TO cb_false.

CALL FUNCTION 'UPWB_GET_APPLICATION_URL'

EXPORTING

application = appname

page = ls_page_name

ib_additional_params = cb_true

ib_in_subgui = cb_false

ic_preview_type = 'B'

IMPORTING

url = url.

CONCATENATE url '&bps-design_messages=X' INTO c_url.

CALL FUNCTION 'CALL_BROWSER'

EXPORTING

url = c_url

window_name = ' '

new_window = 'X'

EXCEPTIONS

frontend_not_supported = 1

frontend_error = 2

prog_not_found = 3

no_batch = 4

unspecified_error = 5

OTHERS = 6.

Regards

Laurent

Message was edited by: Laurent THIBERT