on 08-20-2008 10:35 AM
Hi Experts,
I have excel file (example "http://xxxx/test.xls") with contents in remote system. I want to incorporate this excel file into my web dynpro application. For this I used Officecontrol UI element and set the following properties for Officecontrol
1. datasource : binding with context attribute DATAS(xstring)
2. document type : ms_excel
I wrote code the following code in WDDOMODIFYVIEW method.
data : content TYPE xstring,
url TYPE string VALUE 'http://xxx/test.xls'.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = url
IMPORTING
BUFFER = content .
wd_context->set_attribute( name = 'DATAS' value = content ).
while running my application, I getting excel without contents and with one message "SAP IOS". Please suggest how to display excel with contents in view of my application.
Can any one help me.....
Thanks & Regards
Sridhar
>
> Hi Experts,
>
>
> CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
> EXPORTING
> text = url
> IMPORTING
> BUFFER = content .
>
>
> Thanks & Regards
> Sridhar
I think you are overestimating the power of the SCM_STRING_TO_XSTRING function module. By supplying a URL as the value of the input text, it isn't going to magically go read the content from the remote location and convert that to a binary string. It is going to take whatever value you supply in th importing TEXT parameter convert that to binary. In other words it is literally converting the string http://xxx/test.xls to binary. You will need some other mechanism to read the content from the remote location into ABAP memory before you can process it. You will need to use the CL_HTTP_CLIENT class or call some sort of web service to retrive the content.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have to open a document
see web dynpro component IOS_TEST_HELLOWORLD_MS for detail
data:
office type ref to cl_wd_view_element,
factory type ref to IF_IOS_FACTORY,
document type ref to IF_IOS_DOCUMENT.
office ?= view->get_element( 'GENERIC_OFFICE' ).
factory ?= office->_method_handler.
factory->get_document_proxy( IMPORTING proxy = document ).
document->opendocument( ).
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.