on 09-08-2009 7:17 AM
hi ,
i have created a webdynpro component for customer creation. while creation , he has to upload some files specific to thast customer.when the other person opens the customer for display , he has to choose specific file and he should be able to download the file.
Do i need to save the files in the database table specific to the customer? if , so in which form i have to save the files.
suggest me how to solve this problem.?
thanks,
Raghu
Hi, You can use FileUpload and FileDownload uielement for this scenario. You file would be saved in Database table in XSTRING format. For displaying the file later on, just fetch the data from the table and pass it do filedownload uielement. Radhika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please describe what you are doing and what the error you are receiving. It should be perfectly fine to insert at least 3 STRING or RAWSTRING fields into a Database table (number increases to 16 in 7.02). Perhaps you already have too many STRING based columns? There is no size limit to the RAWSTRING storage in the database. However you should consider the impact on ABAP server memory (especially if your system is 32-bit) and processing time to manipulate the content into and out of the database table.
Hi Thomas,
My sytem is of 32 bit. I am using the database table with 2 fields as string and 1 field for content (of type rawstring ).
when i am uploading big file , its putting the content into database table. but whe i try to download the same file , its taking very long time . how i can reduce the time for download?
Raghu
How big a file? Have you traced to see where the time is being spent? Is it in the SQL to read from the DB? Is it in memory to allocate the necessary memory? Are you using so much session memory that you are swapping to disk? Is the time in the transfer across the network? How are you downloading the file? - Is it WDA (I assume) and you are using FileDownload?
There isn't much you can do if the problem is the network. Nor is there much you can do if the problem is memory - at least not much from a programming standpoint. More physical memory is probably the only help there.
If the problem is the SQL/DB then you might consider an alternative approach to how you store the file. In 7.02 we have database locators and streams that help with the processing of large STRINGS/XSTRINGS. Before then you might consider storing the data in a cluster table 1Kb per row instead of as a RAW STRING.
Also have you considered compressing the data using the CL_ABAP_ZIP class - before storage. This can help if the content is good for compression.
Hi Raghu,
updates ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Follow these steps;
1.create a node 'FILEUPLOAD' with 2 attributes
a) FILECONTENT type XSTRING
b) FILENAME type STRING
2. Create a Node 'FILEDOWNLOAD' with 1 attribute
a) FILE type XSTRING
3. Create a fileuplaod uielement
a) bind the data property with attribute 'FILECONTENT'
b) bind the filename property with attribute 'FILENAME'
4. Create a filedownload uielement
a) bind the data property with the attribute 'FILE'
3. Create a button 'UPLOAD'
a) create the action method for this button
Paste the following code in this method
RadhikaData 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.