cancel
Showing results for 
Search instead for 
Did you mean: 

Default attachment should be attach in Webdynpro

Former Member
0 Kudos

Hi

In webdynpro,  i wanted to attach by default 2 PDF documents , after user can delete if he is not required. can you tell me how can i attach pdf documents by default.

-Ganesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Gowtham
Contributor
0 Kudos

Hi Tarimela,

Following options are available to upload and retrieve the documents.

  • Create a custom table and store the files there
  • Upload through GOS
  • Upload through DMS

And in your web Dynpro ABAP page give an File Download UI element , in the page load retrieve the document from the uploaded place and bind it with the File Download element.

- Gowtham

Former Member
0 Kudos

Hi,

Create one Z-table by storing your required attachements in form on XSTRING.

Refer this link  regarding how to save files into database.

and in WDDOINIT( ) , read that file content and by using below code you can display the file contents.


cl_wd_runtime_services=>attach_file_to_response(

      EXPORTING

        i_filename      = ls_v_attachments-file_name

        i_content       = ls_v_attachments-content

        i_mime_type     = ls_v_attachments-mime_type

        i_in_new_window = abap_true

        i_inplace       = abap_true  ).

Hope this helps you.

Thanks

KH