Monday, December 20, 2010
REPORT ztest_notepad.
DATA: url TYPE string,
l_appl TYPE string,
l_page TYPE string,
l_params TYPE LINE OF tihttpnvp,
params TYPE tihttpnvp.

l_appl = 'HTMLB_samples'.
l_page = 'about.htm'.

*l_params-name = 'text'.
*l_params-value = 'pour le moment test'.
*APPEND l_params TO params.

CALL METHOD cl_http_ext_webapp=>create_url_for_bsp_application
EXPORTING
bsp_application      = l_appl
bsp_start_page       = l_page
bsp_start_parameters = params
IMPORTING
abs_url              = url.
DATA: url_1 TYPE bxmnodes-url.
url_1 = url.
DATA: generated_url LIKE bxurlg-gen_url.
DATA:p_target_system LIKE bxmnodes-target_sys.
CALL FUNCTION 'PRGN_START_GENERATE_MODULE'
EXPORTING
url_type      = 'BSP_APPLICATION'
url           = url_1
target_system = p_target_system
IMPORTING
generated_url = generated_url.
PERFORM call_standard_browser USING generated_url.
*&---------------------------------------------------------------------*
*&      Form  call_standard_browser
*&---------------------------------------------------------------------*
FORM call_standard_browser USING p_generated_url LIKE bxurlg-gen_url.
CALL FUNCTION 'CALL_BROWSER'
EXPORTING
url                    = p_generated_url
*     BROWSER_TYPE           =
*     CONTEXTSTRING          =
EXCEPTIONS
frontend_not_supported = 1
frontend_error         = 2
prog_not_found         = 3
no_batch               = 4
unspecified_error      = 5
OTHERS                 =  6.
CASE sy-subrc.
WHEN 1.
MESSAGE i393(s#).                " WITH 'FRONTEND_NOT_SUPPORTED'.
WHEN 2.
MESSAGE i381(s#).                " WITH 'FRONTEND_ERROR'.
WHEN 3.
MESSAGE i394(s#).                " WITH 'PROG_NOT_FOUND'.
WHEN 4.
MESSAGE i381(s#) WITH 'NO_BATCH'.
WHEN 5.
MESSAGE i381(s#) WITH 'UNSPECIFIED_ERROR'.
ENDCASE.
ENDFORM.                    "CALL_STANDARD_BROWSER

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.