cancel
Showing results for 
Search instead for 
Did you mean: 

Attach File in Web Dynpro ABAP Application

former_member455947
Participant
0 Kudos

Hi everyone

I need your help to attach files in custom WebDynpro ABAP application. Kindly share if there is any sample standard WebDynpro ABAP application or share some sample code.

Best Regards

Iftikhar Ali

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Iftikar,

Please go through the link which will explain you about the upload ui.

http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP

Thanks & Regards,

Arun.

Answers (2)

Answers (2)

Former Member
0 Kudos
manigandan_d2
Explorer
0 Kudos

Attach means, you need to add (Reference document) the file for each record or store the file in the back end.

Three fields need to maintained in back end table (custom table)

1) Attachment data - Xstring (type)

2) Attachment Type - string (type)

3) Attachment name - String (type)

From the File Upload UI element

UI "data" field to -> Attachment data

UI "fileName" field to ->Attachment name

UI "mimeType" field to ->Attachment type

Update/ save it in back end table, based on the requirement

Opening the Attachment in UI in event Action:.

Pass the table value to the below class as mentioned.

cl_wd_runtime_services=>attach_file_to_response(
EXPORTING
        i_filename       =  Attachment_name
        i_content        = Attachment_data
        i_mime_type =  Attachment_type ).

former_member199125
Active Contributor
0 Kudos

Check below standard components

SALV_WD_DEMO_UPLOAD

SALV_WD_TEST_FILE_UPLOAD

Regards

Srinivas