cancel
Showing results for 
Search instead for 
Did you mean: 

Question related to Upload->Save and Retrieve files in SAP ABAP Webdynpro

vimal
Active Participant
0 Kudos

Hi All,

We are uploading files(.TXT,.DOC,.PDF etc) we want to save it to database and then again retrieve it from database.

How can we achieve that ? Is there any FM for fetching files which are uploaded ?

How to design such applications ?.Please suggest with steps .

/Thanks

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Vimal,

You can do it by using GOS please refer the below link

Attaching files to GOS

Otherway,

  • Create a table with fields file_type, file_name, file_content ( data type RAWSTRING ) and KEY
  • Create WDA application as your requirement using FILEUPLOAD & DOWNLOAD ui elements
  • Using file upload ui element you can attach any document
  • On save, save the data into your table
  • You can get saved data into your view and display all the stored documents link within a table with file download ui lement

Hope this helps you.

Regards,

Rama

vimal
Active Participant
0 Kudos

Hi Rama,

A Correction it's not Uploading of files. It's basically attachments which i have uploaded and now i want to save those attachements(.TXT,.PDF,.XLS etc) in database . How to save them in database table ?,Secondly how to retieve..? So that if user again open's the document in Webdynpro he should be able to see those attachments as it was attached earlier.

Let me know if you need any more clarity.

Thanks,

Vimal

ramakrishnappa
Active Contributor
0 Kudos

Hi Vimal,


Vimal Sharma wrote:

It's basically attachments which i have uploaded and now i want to save those attachements(.TXT,.PDF,.XLS etc) in database . How to save them in database table ?,Secondly how to retieve..?

You have attached the documents already. Then how did you do.. have you used GOS?

Please give elaborate little more

Regards,

Rama

vimal
Active Participant
0 Kudos

Hi Rama,

I haven't used GOS, i have simply created the Upload UI element and uploaded files and shown them on screen. Now i want to save all those uploaded files into database and get those files as and when needed.

The document which you uploaded is of standard transaction. Can you please create a simple demo document and show me how to save and upload one file atleast.

Let me know of any other information.

Thanks,

Vimal Sharma

Former Member
0 Kudos

Hi Gangappa,

I think your requirement is to display the file. if so and If you are getting the basic details like name and file type etc then you can use the method

cl_wd_runtime_services=>attach_file_to_response(...). You can explore it to call this as per your requirement.

Regards,

Sachin

ramakrishnappa
Active Contributor
0 Kudos

Hi Vimal,

As you requested, I have created document for attaching files.

Please refer the below link

Attach files with save, retrieve and delete functionality in Web Dynpro ABAP - Part 1

Attach files with save, retrieve and delete functionality in Web Dynpro ABAP - Part 2

Hope this helps you.

Regards,

Rama

Answers (0)