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: 

calling browser from abap

Former Member
0 Kudos

Hello,

I need to show some html code witch I have in string

in a browser.

I know how to call a browser, f.e.

-> call function ''call_browser'

-> call method cl_gui_frontend_services=>execute

but I don't know can I? and how? to pass my html code

to the browser to show the page...???

please help if anyone know

regards

3 REPLIES 3

former_member181962
Active Contributor
0 Kudos

If you have a URL, you can pass that to exporting parameter URL

CALL FUNCTION 'CALL_BROWSER'

EXPORTING

URL = 'www.yahoo.com'

WINDOW_NAME = ' '

NEW_WINDOW = 'X'

  • BROWSER_TYPE =

  • CONTEXTSTRING =

EXCEPTIONS

FRONTEND_NOT_SUPPORTED = 1

FRONTEND_ERROR = 2

PROG_NOT_FOUND = 3

NO_BATCH = 4

UNSPECIFIED_ERROR = 5

OTHERS = 6.

Regards,

Ravi

Former Member
0 Kudos
define one macro like this

  DEFINE add_html.
    YT_HTML = &1.
    APPEND YT_HTML.

  END-OF-DEFINITION.


and you can pass the data to be converted

add_html '<HTML>'.
  add_html '<head>'.
  add_html '<title>'.
  add_html 'ABAP Code'.
  add_html ' View :'.
  add_html GV_PROG_NAME.
  add_html '</title>'.
  add_html ' '.
  add_html '<meta name="description"'.
  add_html ' content="'.
  add_html P_DESC.
  add_html '">'.
  add_html '<meta name="keywords"'.
  add_html 'content="' .
  add_html 'www.rmtiwari.com,ABAP Code WebViewer,ABAP Code,'.
  add_html P_KEYW .
  add_html '">'.

  add_html '<link type="text/css">'.
  add_html '</head>'.
  add_html '<BODY>'.
  add_html '<pre><code>'.


and pass the html filename to  CALL_BROWSER  FM

Message was edited by:

Chandrasekhar Jagarlamudi

0 Kudos

I already have my code in a string - and it's no problem to write it

to a file, but I'm not sure if I can pass that file's path to a browser...

when I'm doing it - browser is looking for a file on a local machine,

not on a server - and I don't want to download and save that files

on my disc - it should open a file from a server - and I'm not sure if that's possible...