cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding WEB DYNPRO

Former Member
0 Kudos

Hi

I need to upload some documents in an application created using web dynpro. Say for ex i have give some link to view a pdf or doc or html document for the users. How can i achieve it. Please guide me in doing it.

Thanks in advance..

Regards

Vinodh A

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

1 create a node 'FILEUPLOAD' with 2 attributes

a) FILECONTENT type XSTRING

b) FILENAME type STRING

2 Create a fileuplaod uielement

a) bind the data property with attribute 'FILECONTENT'

b) bind the filename property with attribute 'FILENAME'

3. Create a button 'UPLOAD'

a) create the action method for this button

u can refer this piece of code:


Data l_node type ref to if_wd_context_node.
Data l_stru type wd_this->elements_cn_fileupload.
 
l_node = wd_context->get_child_node( 'FILEUPLOAD' ).
l_node->get_static_attributes( importing static_attributes = l_stru ).
"save l_stru-fielcontent in database. Your file will be saved in the database in XSTRING format.

regards,

Amit

Former Member
0 Kudos

hi amit,

Thanks for your reply. But this data will be stored as XSTRING. Now what should i do if the user wants to view that data in pdf or doc view..

Former Member
0 Kudos

hi,

u can use the FM SCMS_STRING_TO_XSTRING and method attach_file_to_response of class cl_wd_runtime_services to download the data u have into a pdf file

regards,

Amit

Former Member
0 Kudos

can you just help me in providing function modules to convert data in XSTRING to doc and html format.

Regards

Vinodh

Answers (2)

Answers (2)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Please review the forum rules of engagement. One of the rules is that you must use forum thread subjects that attempt to describe or summarize the question. A subject of Regarding Web Dynpro (which you have used now in two separate forum threads) isn't helpful at all. This is the Web Dynpro ABAP forum, so we can already assume that your question should have something to do with Web Dynpro.

Former Member
0 Kudos

hi,

u can use FileUpload UI element for this purpose. More info can be found at

http://help.sap.com/saphelp_nw04s/helpdata/en/f6/501b42b5815133e10000000a155106/frameset.htm

u can also find an example of this in the view FILEUPLOAD of web dynpro component WDR_TEST_EVENTS.

regards,

Amit