cancel
Showing results for 
Search instead for 
Did you mean: 

Regd: File Attachments dynamically

Former Member
0 Kudos

Hi Friends,

I have 1 scenario in web dyn application to attach files as many as possible.

And there is no number limitation of these files & file types can be any e.g PDF, .DOC, .XLS , .GIF

How to attach these files dynamically , any body is having idea.

Thanks in advance.

Srinivas.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Jung,

When i use the File Upload UI element, i want to use Table component so that i can see the name of the file, extention, file size , date and time of upload in the Table UI element. And i looked at the example SALV_WD_TEST_FILE_UPLOAD .

And for creating the document i want to use BAPI_DOCUMENT_CREATE.

Is this the right approach ? What is your opinion ?

Srinivas.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi Jung,

>

> When i use the File Upload UI element, i want to use Table component so that i can see the name of the file, extention, file size , date and time of upload in the Table UI element. And i looked at the example SALV_WD_TEST_FILE_UPLOAD .

> And for creating the document i want to use BAPI_DOCUMENT_CREATE.

>

> Is this the right approach ? What is your opinion ?

>

> Srinivas.

Only you can really saw if that is the right approach for your requirements. BAPI_DOCUMENT_CREATE will insert the documents into the DMS module of PLM - so of course you need to have that functionality setup and have to want to use Document Business Objects. If that is the business requirement - then great. If you just want basic document storage then the overhead of the DMS is probably too much - just store the documents in your own custom Z-Table.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Well you can always use the FileUpload UI element to bring files up from the client machine into the application server memory. However this doesn't really attach the files to anything. It only makes the data available to your application. You then need to code the logic to store the files. How do you want to store them? You could write them into a database table using SQL, your could store them in the MIME Repository, you could write them to the application server file system using ABAP DATASET commands. I could elaborate on how to do any one of these three things, but you need to really decide where you want to store the attachments first.