2007 Jun 06 11:50 AM
Hi!
I've developed a BSP application and i've set htmlb content design to "design2003" on my views.
When i test the application using a browser everything is OK, but when i fetch the html for display using cl_gui_html_viewer the css for the theme is lost.
I probably should be using the "load_mime_object" method, but i cannot locate design2002 using transaction SMW0.
Any thoughts on what i may be doing wrong?
Regards,
Pedro Barbosa
Hi!
I've developed a BSP application and i've set htmlb content design to "design2003" on my views.
When i test the application using a browser everything is OK, but when i fetch the html for display using cl_gui_html_viewer the css for the theme is lost.
I probably should be using the "load_mime_object" method, but i cannot locate design2002 using transaction SMW0.
Any thoughts on what i may be doing wrong?
Regards,
Pedro Barbosa
2007 Jun 06 12:29 PM
hi
good
go through this link,hope this would help you to solve your problem
/people/brian.mckellar/blog/2004/07/05/bsp-programming-writing-a-simple-web-crawler
http://help.sap.com/saphelp_nw2004s/helpdata/en/7f/366784b66711d5993900508b6b8b11/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/39/80ef90bbc3844a90569cf2c8214630/content.htm
thanks
mrutyun^
2007 Jun 06 12:34 PM
Hi,
Try this snippet
data: url(2048).
parameters: p_check type c.
start-of-selection.
at selection-screen output.
data: dockingleft type ref to cl_gui_docking_container,
html_control type ref to cl_gui_html_viewer,
repid type syrepid.
repid = sy-repid.
check dockingleft is initial.
create object dockingleft
exporting repid = repid
dynnr = sy-dynnr
side = dockingleft->dock_at_left
extension = 1000.
create object html_control
exporting
parent = dockingleft.
url = '
server\folder\file.txt'.
call method html_control->show_url
exporting
url = url
exceptions
cnht_error_parameter = 1
others = 2.
<b>*Reward points</b>
Regards
2007 Jun 06 12:40 PM
css and images for BSP are stored in MIME repository in SE80 and not in SMW0.
<i>when i fetch the html for display using cl_gui_html_viewer</i>
you dont need to , just navigate to BSP url
2007 Jun 06 12:53 PM
Use this method to load an object of any type from the SAP Web Repository and send it to the SAP HTML Viewer. To maintain data in the SAP Web Repository, use Transaction SMW0.
Quote from load_mime_object method help at
http://help.sap.com/saphelp_nw04/helpdata/en/18/d3e4fda93111d2bd6e080009b4534c/frameset.htm
I know i could just navigate the url, but that would mean an external access to the application right? And the ideia is to make the application available using only the SAP GUI.
So my report is loading the data to the gui viewer like this:
CALL METHOD HTML_CONTROL->LOAD_DATA
EXPORTING
TYPE = 'text'
SUBTYPE = 'html'
IMPORTING
ASSIGNED_URL = doc_url
CHANGING
DATA_TABLE = it_HTML
EXCEPTIONS
DP_INVALID_PARAMETER = 1
DP_ERROR_GENERAL = 2
CNTL_ERROR = 3
others = 4.
.
IF sy-subrc EQ 0.
CALL METHOD html_control->show_url
EXPORTING
url = doc_url.
ENDIF.
Regards,
Pedro Barbosa
2007 Jun 06 1:00 PM
to read BSP MIME objects you have to use the following code.
i_url = '/SAP/BC/BSP/SAP/<BSPappnname>/<mimename>.gif' .
* instantiate MIME API class
call method cl_mime_repository_api=>if_mr_api~get_api
receiving
r_mr_api = lo_mr_api.
* Get file from MIME repository
call method lo_mr_api->get
exporting
i_url = i_url
* I_CHECK_AUTHORITY = 'X'
importing
* e_is_folder =
e_content = l_xstring
e_mime_type = l_mimetype
* E_LOIO =
* CHANGING
* C_LANGUAGE =
exceptions
parameter_missing = 1
error_occured = 2
not_found = 3
permission_failure = 4
others = 5.
2007 Jun 06 1:01 PM
SMW0 - is old. BSP doesnt use it.
it is/was mainly used for storing images, javascript, css files used in dynamic document, htmlviewer, etc
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |