BSP application to local PC
Hi ,
I want to download my BSP application to local PC.
How to do so?
Regards,
Binny
Hi,
Check this links
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3330a5e1-0701-0010-6e81-e88984de611a
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2c6ceb90-0201-0010-2ab3-803a7cd794ff
Regards
Hiren K.Chitalia
Similar Messages
-
How Backup and restore BSP application to Local computer
How Backup and restore BSP application to Local computer.
How Backup whole Package to a Local file?check out this code sample.
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3330a5e1-0701-0010-6e81-e88984de611a">Tool to Download Complete BSP Application</a>
Regards
Raja
is the following thread of yours is answered? or do you have more questions.
htmlb tableview with CSS
Message was edited by: Durairaj Athavan Raja -
Hi,
I've used the code sample provided in SDN to download my BSP application to local folder.
"Tool to download BSP Application including MVC" by Boga Umashankar.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3330a5e1-0701-0010-6e81-e88984de611a
<u>Problem:</u>
In my appln, Utilities --> Settings > abap editor>editor, Downwards-comp. Line Length(72) Checkbox is unchecked and there is no limitation on length of code in a line.
When i download that application, In the output text file(of a method in a controller), The length of code in a line is limited to 73 characters and rest of the code is ignored while downloading. So only partial code is downloaded.
So is there any solution so that i can download complete code.
Thanks in advance,Hi,
Does this happen too when you use this method?
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/bsp/bsp-code-samples/abap%20code%20sample%20for%20download%20of%20a%20bsp%20application.pdf
Eddy -
Download Text file to Local drive from BSP Application
Hi Guys,
I am new to BSP, and I am doing a BSP application in which i want to download a text file to local drive C: on click of button. For that I am having a data in Internal table and Onclick event, in model class method DO_HANDLE_EVENT i want to download text file to local machine drive.
Can anybody provide me full code with all data declaration and all?
Your help would be appriciable. Thanks in Advance.Hi Jessy ,
You can download the file from BSP pages using the method
CL_BSP_UTILITY=>download.
Please follow the below mentioned steps.
1.Convert the text to a text table ie Internal table with a line type char255 or some others.
2.Convert the text table into a string.
3.Convert the string to XSTRING.
4.Download that XSTRING as text file using the method
CL_BSP_UTILITY=>download.
Parameters:
OBJECT_S - XSTRING data
CONTENT_TYPE = ' application/download'
CONTENT_DISPOSITION = 'attachment; file=test.txt'
RESPONSE = runtime->server->response
NAVIGATION = navigation
OBJECT_T
I dont have system to give a programatical explanation to u.
If you have any doubt kindly post.
Reward for every useful solutions..
Best Regards
Renga -
How to access the local files (Excelsheet) in bsp application
Hi sdn,
I created a bsp application my requirement is if i click the link it should display the excelsheet and if i perform any updations those updations will be modified int that excel sheet so can any one plz help me out in solving this issue.Hi,
I think you shouldn't try to modifiy local files from a server application for security reasons.
But, let's say you have your reasons.
In your BSP, you have a link that points to an MS Excel file. Clicking this link will open the file in MS Excel and users will be able to modify and register it (and save the file in another path/name...).
Another solution would be: create a table form (like ALV?) from the Excel file and save any modifications of the table form into the Excel file. Maybe HTMLB can supports such approach but I don't know HTMLB. I only use HTML and ABAP.
All I said here is just overview of potential solutions. I'm not sure I exactly understood your need. Perhaps other Experts would have better answer for you.
But I hope this will help you.
Good luck!
Thomas. -
Error while creating a BSP application
Hello Experts-
I am trying to create a BSP application. This is the error what I am seeing, can any one let me know on what settings i have to make it work.
Could not create the associated SICF node automatically.
Add a node manually using "HTTP Service Maintenance"
(Transaction SICF)
Steps which I followed to create BSP app are
Se80> BSP application > name of app> enter> create local object.
Thanks,
Rajhi,
Please check the thread before you post it, becoz its already posted and answered too
after getting the message
"Could not create the associated SICF node automatically.
Add a node manually using "HTTP Service Maintenance"
in the same window in the common box type "/nsu53" and hit enter.
system will give details about the missing authorization .
or
when you generate the web interface it automatically creates the SICF entry. Just make a litte change to the web interface and activate it again.
You can also regenerate an entire BSP application by calling the O2_GENERATE_BSPAPPL function module in the test environment of
transaction SE37 .
cheers,
Bhavana -
How to use GUI_DOWNLOAD inside BSP Application event
Hi All,
I am facing one issue while using GUI_DOWNLOAD inside BSP Application. When the processing goes at GUI_DOWNLOAD it gives me unknown error where as the same code is working when used in report program. My requirement is to save password into excel file at my local machine. I am using FM MS_EXCEL_OLE_STANDARD_DAT to save password in excel file but this function module fail when it reach at GUI_DOWNLOAD . Can you please help me out.
Thanks and Regards
Pradeep Kr. RaiDear Pradeep,
Find the below link which explains a simple data download to excel from a table view.
www.sapt echnical.com/Tutorials/BSP/Excel/Index.htm
Try to avoid the way your using in the BSP application and it is abdicable to use the standard methods / class available like "cl_bsp_utility"
Hope this will be helpful.
Regards,
Gokul.N
Edited by: Gokul on Oct 8, 2009 9:57 AM -
Download and upload bsp application
Hi All,
Pl. guide me with my requirement. I have a bsp application in one server and for some reasons the same bsp application is required in another server but these two servers are not in land scape and hence i cannot transport. Is there any way to download the whole application and upload it into the target server. I feel this approach is silly but is there any other way or should i create it again fron the scratch in the new server.Pl. guide me.
thanks & regards,
jeeva.Hi Jeeva
Why dont you try the above link given by Raja..
It works fine .... You will get the sourcecode downloaded in a .bsp extension file for each page....But the only major problem is ... It doesnot talk about anything related to How to upload those files in the application....For that you had to take the help of BASIS ..
But if your problem get solved by just getting the source code downloaded then try this code...This is the same code that RAJA has linked to...Just paste the code in a report program...and execute it...
type-pools: SO2.
types: t_page_list type standard table of o2pagkey.
parameters: g_appl type O2APPLNAME.
constants: c_separator_line type string value
perform main.
form main.
data: l_pages type t_page_list,
l_ref_page type ref to cl_o2_api_pages,
l_table type o2pageline_table,
l_folder type string,
l_lower type string,
l_filename type string.
field-symbols: <f_page> type o2pagkey.
* get local directory path
call method CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
* EXPORTING
* WINDOW_TITLE =
* INITIAL_FOLDER =
CHANGING
SELECTED_FOLDER = l_folder
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
return.
ENDIF.
if l_folder is initial. return. endif.
* get all pages of selected BSP application
perform get_all_pages changing l_pages.
* perform each page
loop at l_pages assigning <f_page>.
* load page data
perform load_page using <f_page>
changing l_ref_page.
if l_ref_page is bound.
* collect the content of the page in an internal table
perform print using l_ref_page
changing l_table.
if not l_table is initial.
l_lower = <f_page>-pagekey.
translate l_lower to lower case.
* determine file path for the page
concatenate l_folder '' l_lower into l_filename.
* download the content of the page to file
perform download using l_filename l_table.
endif.
endif.
endloop.
endform. "main
form download using p_filename type string
p_table type standard table.
* download the content of an internal table to a local file
call method CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
FILENAME = p_filename
CHANGING
DATA_TAB = p_table
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
NOT_SUPPORTED_BY_GUI = 22
ERROR_NO_GUI = 23
others = 24.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. "download
form get_all_pages changing p_pages type t_page_list.
* get all pages of the application
select applname pagekey from o2pagdir into table p_pages
where applname = g_appl and
pagetype <> so2_controller.
endform. "get_all_pages
form load_page using p_key type o2pagkey
changing p_data type ref to cl_o2_api_pages.
* load the data of one page
clear p_data.
call method cl_o2_api_pages=>load_with_access_permission
EXPORTING
p_mode = 'SHOW'
p_pagekey = p_key
p_version = 'A' "'I' for inactive version
IMPORTING
p_page = p_data
EXCEPTIONS
others = 1.
endform. "load_page
form print using p_data type ref to cl_o2_api_pages
changing p_table type o2pageline_table.
* collect the content of a page into an internal table
data: l_attrs type o2pagattr,
l_params type o2pagpar_tabletype,
l_source type rswsourcet,
l_layout type o2pageline_table,
l_ev_handlers type so2_ev_handler_list,
l_typtyp(11) type c,
l_line type string.
field-symbols: <f_param> type o2pagpars,
<f_evh_name> type so2_ev_handler_name.
refresh p_table.
* get page properties
CALL METHOD P_DATA->GET_ATTRS
IMPORTING
P_ATTRS = l_attrs
EXCEPTIONS
others = 1.
check l_attrs-pagetype <> so2_controller.
append c_separator_line to p_table.
concatenate '*' l_attrs-applname '/' l_attrs-pagekey into l_line.
append l_line to p_table.
append c_separator_line to p_table.
append space to p_table.
* local types
if l_attrs-pagetype = so2_full_page.
CALL METHOD P_DATA->GET_TYPE_SOURCE
IMPORTING
P_SOURCE = l_source
EXCEPTIONS
others = 1.
if not l_source is initial.
append c_separator_line to p_table.
append '* local types' to p_table.
append c_separator_line to p_table.
append lines of l_source to p_table.
do 3 times.
append space to p_table.
enddo.
endif.
endif.
* page attributes
if l_attrs-pagetype = so2_full_page or
l_attrs-pagetype = so2_view_page.
CALL METHOD P_DATA->GET_PARAMETERS
IMPORTING
P_PARAMETERS = l_params
EXCEPTIONS
others = 1.
if not l_params is initial.
append c_separator_line to p_table.
append '* page attributes' to p_table.
append c_separator_line to p_table.
loop at l_params assigning <f_param>.
if <f_param>-typtype = so2_paramtyp_type.
l_typtyp = 'TYPE'.
else.
l_typtyp = 'TYPE REF TO'.
endif.
concatenate <f_param>-aliasname l_typtyp
<f_param>-type into l_line
separated by space.
append l_line to p_table.
endloop.
do 3 times.
append space to p_table.
enddo.
endif.
endif.
* layout
append c_separator_line to p_table.
append '* layout' to p_table.
append c_separator_line to p_table.
CALL METHOD P_DATA->GET_PAGE
IMPORTING
P_CONTENT = l_layout
EXCEPTIONS
others = 1.
append lines of l_layout to p_table.
do 3 times.
append space to p_table.
enddo.
* event handler
if l_attrs-pagetype = so2_full_page.
CALL METHOD P_DATA->GET_EVENT_HANDLER_LIST
EXPORTING
P_WITH_ALL_PREDEFINED = ' '
IMPORTING
P_EV_HANDLER_L = l_ev_handlers
EXCEPTIONS
others = 1.
loop at l_ev_handlers assigning <f_evh_name>.
append c_separator_line to p_table.
concatenate '* eventhandler' <f_evh_name>-name into l_line
separated by space.
append l_line to p_table.
append c_separator_line to p_table.
clear l_source.
CALL METHOD P_DATA->GET_EVENT_HANDLER
EXPORTING
P_NAME = <f_evh_name>-key
IMPORTING
P_SOURCE = l_source
* P_ATTRS =
EXCEPTIONS
others = 1.
append lines of l_source to p_table.
do 3 times.
append space to p_table.
enddo.
endloop.
endif.
endform. "print
RGDS
Mithlesh -
How to Use Interactive Forms in BSP Applications - trouble with demo
Is anyone else out there having trouble with the subject how to guide? https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0e58022-2a39-2a10-69a8-c1a892e2b3f4
I think I have everything built out correctly but I get the following run time error.
Business Server Page (BSP) error
What happened?
Calling the BSP page was terminated due to an error.
SAP Note
The following error text was processed in the system:
An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause
Exception Class CX_SY_REF_IS_INITIAL
Error Name
Program Z_PROCESS_BOOKING_FORM========CP
Include Z_PROCESS_BOOKING_FORM========CM002
ABAP Class Z_PROCESS_BOOKING_FORM
Method DO_REQUEST
Line 33
Long text An attempt was made to execute a dynamic method callon an initial(NULL-) object reference. The reference must refer to an object.
Following is my code: line 33 reads as strChecked = node->get_value( ).
method DO_REQUEST.
*CALL METHOD SUPER->DO_REQUEST
data: bookingxml type string.
bookingxml = request->get_cdata( ).
data: streamFactory type ref to
if_ixml_stream_factory.
data: iStream type ref to if_ixml_istream.
streamFactory = g_ixml->create_stream_factory( ).
iStream =
streamFactory->create_istream_string(
bookingxml ).
data: document type ref to if_ixml_document.
document = g_ixml->create_document( ).
data: parser type ref to if_ixml_parser.
parser = g_ixml->create_parser( stream_factory =
streamFactory
istream =
iStream
document =
document ).
parser->parse( ).
data: node type ref to if_ixml_node.
data: strChecked type string.
node = document->find_from_name( name = 'RESERVED'
strChecked = node->get_value( ).
data: reserved type BAPISBODAT-RESERVED.
data: checked type i.
move strChecked to checked.
if ( checked = 1 ).
reserved = 'X'.
else.
reserved = ''.
endif.
data: custbook type BAPISBONEW.
node = document->find_from_name( name = 'AIRLINEID'
custbook-airlineid = node->get_value( ).
node = document->find_from_name( name = 'CONNECTID'
custbook-connectid = node->get_value( ).
data: fd type BAPISBONEW-FLIGHTDATE.
data: strFd type string.
node = document->find_from_name( name =
'FLIGHTDATE' ).
strFd = node->get_value( ).
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = strFd
* ACCEPT_INITIAL_DATE =
IMPORTING
DATE_INTERNAL = custbook-flightdate
EXCEPTIONS
DATE_EXTERNAL_IS_INVALID = 1
OTHERS = 2
IF SY-SUBRC <> 0.
* Do something
ENDIF.
node = document->find_from_name( name =
'CUSTOMERID' ).
custbook-customerid = node->get_value( ).
node = document->find_from_name( name = 'CLASS' ).
custbook-class = node->get_value( ).
node = document->find_from_name( name = 'AGENCYNUM'
custbook-agencynum = node->get_value( ).
node = document->find_from_name( name = 'PASSNAME'
custbook-passname = node->get_value( ).
data: pb type BAPISBONEW-PASSBIRTH.
data: strPb type string.
node = document->find_from_name( name = 'PASSBIRTH'
strPb = node->get_value( ).
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = strPb
* ACCEPT_INITIAL_DATE =
IMPORTING
DATE_INTERNAL = custbook-passbirth
EXCEPTIONS
DATE_EXTERNAL_IS_INVALID = 1
OTHERS = 2
IF SY-SUBRC <> 0.
* Something
ENDIF.
data: bn type BAPISBOKEY-BOOKINGID.
data: return type bapiret2_tab.
data: errmsg type string.
CALL FUNCTION 'BAPI_FLBOOKING_CREATEFROMDATA'
EXPORTING
RESERVE_ONLY = reserved
BOOKING_DATA = custbook
* TEST_RUN = ' '
IMPORTING
* AIRLINEID =
BOOKINGNUMBER = bn
* TICKET_PRICE =
TABLES
* EXTENSION_IN =
RETURN = return.
data: wa type bapiret2.
loop at return into wa.
if wa-type = 'E'.
move wa-message to errmsg.
response->append_cdata( errmsg ).
response->append_cdata( '<BR>' ).
endif.
endloop.
response->append_cdata( 'Flight booked, booking reference number: ').
data: strBn type string.
move bn to strBn.
response->append_cdata( strBn ).
endmethod.
The first page works fine but when I submit my form it fails. I debugged and the request object doesn't look right.
Any ideas would be greatly appreciated.
Regards,
Dan
Message was edited by:
Dan Scheck
Message was edited by:
Dan ScheckHi Surija,
there is an issue with Internet Explorer that causes this problem when you launch the BSP applicaiton using the test menu in SE80. The issue does not occur with Firefox...very strange I know.
Anyway, to get around this you just copy the BSP application URL and open a browser and paste the URL in...so essentially do not use the "Test" in SE80 to launch your application.
Hope this fixes your problem!
Cheers,
Jeff -
Using BAPI_DOCUMENT_CREATE2 from BSP Application
I am trying to add a document in DMS from a BSP application. The bapi_create_document2 works except that it will not upload a file from the client PC. The exact same code with the exact same parameters supplied works from within an ABAP program. I assume that this is because the web server is the presentation server in the BSP application and does not have access to the files on the PC.
I know that I can use the <htmlb:fileUpload> tag to move a file from the PC to the data object type ref to CL_HTMLB_FILEUPLOAD. The contents would then be in data->content. I am wondering if there is then some way to add the original file from the object using this BAPI or another one.I can tell you what we did. When you use BAPI_DOCUMENT_CREATE2 you can specify a SAPFTP or SAPHTTP destination. These are RFC destinations where the sapftp or saphttp executable can be found. We setup an SAP gateway installation on each of our global content and cache servers. We then use the client IP address to determine the closest SAP Content server to the client. We use JavaScript (and the filesystem object - note your server must be in the trusted zone in IE for this to work) to copy the file from the client machine to the nearest Content Server. Then when we call the BAPI we specify the correct RFC Destination where the file is located and it is checked in correctly.
Now if you don't use the Content and Cache Servers and only want to upload into the R/3 database repository, then I would just use the fileUpload and write the file to a local directory on the server. Then point to the SAPFTP/SAPHTTP RFC that would have access on that server. -
Calling the ASP page through a BSP application
Hi,
We are in the process of implementing Digital signature for SRM cFolders.
BSP application : CFX_RFC_UI
Pages with flow logic : doc_de_download
The digitally signed files are uploaded to the cFolders.On click of a
particular file in cFolders, the 'ASP' page residing on the server in IIS
vertual directory i.e. 'verifyfile.asp' should get called.This ASP page has
the logic to verify the signed file.
The signed file resides on the file system in the same vertual directory.
As a result we want to post a message on the screen which
will be the output of the ASP page logic.
Please suggest the way to achieve this.
Regards,
Nilesh
Message : ---
<b>Verification Successful</b>
Certificate Details
The certificate is valid
CRL Status: Certificate Revocation Status is Unknown: CRL Not checked
Email Id: [email protected]
Issuer Name: ock Demo Certification Authority
Serial Number: 15 65 7a 0a 00 00 0d d9
Subject Name: Email Address = [email protected] | Country = US
| StateOrProvince = VA | Locality = McLean | Organization = Technologies Corporation | Organizational Unit = ock Demo | Common Name = Valid ock |
ThumbPrint: 16 00 c1 f4 76 aa 57 f2 20 27 0f 21 44 9e 08 9d 61 ca dd 95
Valid From: Monday, April 10 2006,02:19:58
<i><b>The code in OnInitialization event handler is as follows :----</b></i>
* doc_de_download.htm
DATA lp_root_exception TYPE REF TO cx_root.
DATA lp_doc TYPE REF TO cl_cfx_document.
DATA l_cur_ver_id TYPE guid_32.
DATA lp_col_app TYPE REF TO cl_cfx_col_application.
DATA lp_col TYPE REF TO cl_cfx_collaboration.
DATA : icontent type table of sdokcntbin.
data : w_tmpcontent TYPE sdokcntbin.
**** Data declaration
data : g_folder_path TYPE btcxpgpar value 'usrsapDigitally signed files',
g_md(100) TYPE c,
g_file_path TYPE string,
g_system TYPE rfcdisplay-rfchost,
g_os TYPE sxpgcolist-opsystem,
g_file_size TYPE string,
g_mime_type TYPE string,
g_file_ext TYPE string,
g_len1 TYPE i,
g_var TYPE c,
g_out_file TYPE c LENGTH 600,
g_file_count TYPE p,
g_table_lines TYPE p,
g_counter TYPE p VALUE 1,
g_flag TYPE c.
DATA : i_doc_id TYPE sysuuid_c.
CONSTANTS : c_dot TYPE c VALUE '.'.
TRY.
IF NOT p_refresh IS INITIAL.
cl_cfx_ui_application=>delete_instance( ).
ENDIF.
TRANSLATE p_col_id TO UPPER CASE. "Just in case...
TRANSLATE p_area_id TO UPPER CASE. "Just in case...
TRANSLATE p_topic_id TO UPPER CASE. "Just in case...
TRANSLATE p_doc_id TO UPPER CASE. "Just in case...
TRANSLATE p_ver_id TO UPPER CASE. "Just in case...
TRANSLATE p_save TO UPPER CASE. "Just in case...
* initialize in case of server state timeout
IF ( NOT p_col_id IS INITIAL ) AND
( NOT p_area_id IS INITIAL ) AND
( NOT p_topic_id IS INITIAL ).
CALL METHOD cl_cfx_context_ui=>initialize
EXPORTING
i_col_id = p_col_id
i_area_id = p_area_id
i_topic_id = p_topic_id
i_doc_id = p_doc_id
i_object_type = cfxf1_sc_doc_type_document.
ENDIF.
IF NOT p_col_id IS INITIAL.
lp_col_app = cl_cfx_col_application=>get_instance( ).
lp_col = lp_col_app->get_collaboration( p_col_id ).
ENDIF.
* Do we need to prepare to checkout this document?
cl_cfx_doc_ui=>get_docref_safe(
EXPORTING
i_guid = p_doc_id
IMPORTING
ep_docref = lp_doc ).
IF ( NOT p_filepath IS INITIAL ) AND ( p_do_lock = 'X' ).
l_cur_ver_id = lp_doc->if_cfx_versioning~get_current_version( ).
IF l_cur_ver_id = p_ver_id.
* OK, prepare checkout
TRY.
lp_doc->if_cfx_document~lock( ).
CATCH cx_root.
ENDTRY.
ENDIF.
ENDIF.
data: lt_formfields type TIHTTPNVP,
l_formfield type IHTTPNVP,
l_request type STRING.
data: lt_headerfields type TIHTTPNVP,
l_headerfield type IHTTPNVP.
CALL METHOD request->get_form_fields
CHANGING
fields = lt_formfields.
CALL METHOD request->get_header_fields
CHANGING
fields = lt_headerfields.
* CALL METHOD cl_cfx_doc_ui=>retrieve_content
* EXPORTING
* ip_navigation = navigation
* ip_response = response
* ip_runtime = runtime
* i_col_id = p_col_id
* i_area_id = p_area_id
* i_topic_id = p_topic_id
* i_doc_id = p_doc_id
* i_ver_id = p_ver_id
* i_save = p_save.
* Do we need to checkout this document?
cl_cfx_doc_ui=>get_docref_safe(
EXPORTING
i_guid = p_doc_id
IMPORTING
ep_docref = lp_doc ).
IF ( NOT p_filepath IS INITIAL ) AND ( p_do_lock = 'X' ).
* l_cur_ver_id = lp_doc->if_cfx_versioning~get_current_version( ).
IF l_cur_ver_id = p_ver_id.
* OK, do checkout
TRY.
CALL METHOD cl_cfx_doc_ui=>mark_doc_as_checked_out
EXPORTING
ip_doc = lp_doc
i_filepath = p_filepath.
CATCH cx_root.
ENDTRY.
ENDIF.
ENDIF.
i_doc_id = p_ver_id.
CALL FUNCTION 'CFX_API_DOC_DOCUMENT_READ'
Exporting
i_doc_version_id = i_doc_id
IMPORTING
e_file_path = g_file_path
e_file_size = g_file_size
e_mime_type = g_mime_type
e_file_ext = g_file_ext
TABLES
et_content = icontent.
****** Download document
IF NOT icontent[] IS INITIAL.
*** PERFORM sub_download_file USING g_file_path.
CONCATENATE g_folder_path g_file_path
INTO g_out_file.
OPEN DATASET g_out_file FOR OUTPUT IN BINARY MODE.
IF sy-subrc = 0.
LOOP AT icontent INTO w_tmpcontent.
TRANSFER w_tmpcontent TO g_out_file.
ENDLOOP.
ENDIF.
CLOSE DATASET g_out_file.
CLEAR g_out_file.
ENDIF.
CLEAR: p_area_id, p_col_id, p_doc_id, p_save,
p_topic_id, p_ver_id, p_filepath.
** handle other standard exceptions
CATCH cx_root INTO lp_root_exception.
CALL METHOD cl_cfx_exception_ui=>handle
EXPORTING
ip_exception = lp_root_exception
ip_navigation = navigation.
ENDTRY.Hi,
Something like this should work:
REPORT zggar_http_client.
PARAMETERS: p_host TYPE char100 DEFAULT 'http://www.google.fr',
p_port TYPE char20.
DATA: wcl_client TYPE REF TO if_http_client.
DATA: w_content TYPE string,
w_host TYPE string,
w_port TYPE string,
w_proxy_host TYPE string,
w_proxy_port TYPE string,
w_path TYPE string.
w_host = p_host.
w_port = p_port.
CALL METHOD cl_http_client=>create
EXPORTING
host = w_host
service = w_port
proxy_host = w_proxy_host
proxy_service = w_proxy_port
IMPORTING
client = wcl_client.
wcl_client->request->set_header_field( name = '~request_uri'
value = w_path ). "#EC *
wcl_client->request->set_header_field( name = '~request_method'
value = 'GET' ). "#EC *
* send and receive
wcl_client->send( ).
wcl_client->receive( ).
* display content
w_content = wcl_client->response->get_cdata( ).
Best regards,
Guillaume -
How To Upload a Mime Object into BSP Application??
Hi all,
I am new to Developing BSP Applications.
I have a requirement to design a BSP Page and in the header part of the page, i have to display a JPG file from my local PC.
To achieve this, I did the following:
1) Upload/Import the MIME Object(JPG File) into MIME Repository and into the relevant BSP Application.
2) After the import, i can see the JPG file that I uploaded in the MIME Repository under my BSP Applciation.
3) In my BSP Page, I tried to use the uploaded JPG file using the following Source Code, as was explained in the Documentation.
<IMG SRC="myfile.jpg">
I did not not do any basic mistakes and went according to documentation in using the above mentioned SRC command to upload the Image from the MIME Repository onto the BSP Page.
But when I run my BSP Application in TEST mode, the Image never shows up; I tried all different way to get this image on the BSP Page and i could not.
I am currently on ECC 6 Version. Please guide me.
Thanksall that you have to do is reference the image in your page.
<htmlb:image id = "TOG"
tooltip = "tooltip text"
src = "picturename.jpg"/>
2) After the import, i can see the JPG file that I uploaded in the MIME Repository under my BSP Applciation.
Can you see this in SE80->applicationname->mime objects folder -
Enhancinig a standard BSP application/page (/SCF/UIBSP)
Hi Experts,
We have a requirement to enhance stanard BSP page (application /SCF/UIBSP, ICH, SCM system). I understand that we can't enhance stanard BSP pages like we do in R/3 or ABAP. Please confirm.
Incase I need to copy the entire application to a Z/Y program, I would like to know if I have to take any precautions. I am little concerned, as this is the main ICH page delivered by SAP.
Thank you for your time.
Regards,
Sudhakar Karumuri.Hi Pavitra,
Thank you for your inputs.
Yes the appliation we are about to enhance used MVC design pattern. So I hope I can use the program u suggested.
Below is our requirement.
We have a Standard BSP application, /SCF/UIBSP called from program /SCA/ICH_START. This BSP application has a Tree View. We have to add one more node in that tree and when clicked on it we need to display a page with some static text and a button. And when User clicks on that button we need to call an RFC from our R/3 system and get data from it and download the same data into a local system(of user).
If you can share your email ID I would like to forward some screen shots.
Thank you for your help.
Regards,
Sudhakar Karumuri. -
BSP application accessing error throgh browser
Hi ,
I am new to BSP.I need simple help.During my BSP execution.Its asking Domain name in URL path.Actually my SAP system is installed on Local installation.Can execute BSP Applications on system which is installation based on Lcal system installation procedure.
How can i resolve this domain issue during BSP execution.If u solve thsi issue things will be easy.
Plz suggest necessary configuration reqiured in BSP execution using Domain.
RegardsHi,
it doesn't matter if it is a local installation or not.
You need a fully qualified domain name, as stated and explained in this weblog:
<a href="/people/brian.mckellar/blog/2003/09/25/bsp-in-depth-fully-qualified-domain-names In-Depth: Fully Qualified Domain Names</a>
If the machine is not part of a domain, do the following:
choose a domain name for yourself (should not match an existing real one), use it to set the icm parameter, and add an entry to your hosts file which matches your machine's FQDN to its IP.
If you need further help, let us know.
Regards,
Max -
Calling a subroutine from BSP application
Hi
i want to know how to call a subroutine/form in another package in same R/3 system in my BSP application.
Is there any way to implement this. ?
What if the subroutine has furhter LOCAL forms called inside it. will they be used as well while calling from my BSP application.
PLease help.you can do that.
perform p1 IN PROGRAM ('Y_P_TEST') IF FOUND .
do you have problem in doing this? what issues are you facing.
Regards
Raja
Maybe you are looking for
-
Program rfbibl01- VATcode for the account is populated wrongly
Hi All, We are using the standard program rfbibl01 to raise the FI document FB01; But within the BDC (IN this Program), VAT code for the account is populated wrongly in to the screen; When we have no VAT code for the record, it fills the previous rec
-
When I specify http://www.celticmanner.com/selector_test.html to Firefox 6.01, I get the false message: Multiple Choices The document name you requested (/selector_test.html) could not be found on this server. However, we found documents with names s
-
i put the song low on it and it plays the beginning but that all then goes to the next song the video wont work either and i really need help to fix it so please help me.
-
Dear all, RG1 relevance was set for movement type 101 gr against order.However 102 was not made relevant for Rg1 ,some documents were reversed using movement type 102 after that 102 was made relevant for RG1. Now when i am going to update RG1 for 1
-
A button on a certain website used to work but no longer does
I'm using a mac OSX 10.9.4 with an intel i5 2.7 processor, I've been using the computer to book tee times, but for some reason a link doesn't work anymore, it appears to be the only link on the site that doesn't work. I'm using Safari, but I've also