cancel
Showing results for 
Search instead for 
Did you mean: 

File upload UI Element is refreshing

Former Member
0 Kudos

Hi experts,

I am using File Upload element and few input fields in my screen. The data is the File upload element gets refreshed even if i use seach help in the input field.

Scenario:

I choose the file which has to be uploaded and then I give input in the input field using search help.

As soon as the search help opens the value in the File Upload element is erased.

I donu2019t want the refreshing to happen. Any ideas on how to fix this?

Thanks in advance

Regards

Shanthi

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Shanthi,

Were you able to find workarround for display file in fileupload UI element after the user action?

Thanks

Depesh

Former Member
0 Kudos

If your problem persists, workaround is :

1. After you have uploaded the file, save the context attribute's value in some Attribute.

wd_this->Att1 = <filecontent>

2. After you have selected value in Input field, set the context attribute of file using Att1. This way even if your screen is refreshed, you will retain the values and thus can again populate it in context attribute.

Please make sure that you are not invalidating node after search help is triggered or in wddomodfy.

Edited by: Saurav Mago on Oct 13, 2009 3:54 PM

Former Member
0 Kudos

Hi Saurav,

This work around is not working.

Even though i set the context, the value is not displayed in the element.

I think the set_attribute will not work for File Upload element.

Regards

Shanthi

Former Member
0 Kudos

Hi,

This is not the case that set_atribute wont work for fileupload.

Get the attribute's of file : DATA, FILENAME, MIMETYPE using get_attribute.

Store the same in some attributes and finally bind all these context attributes using set_attribute.

It should work.

Please put a break point and debug it.

Former Member
0 Kudos

Hi Saurav,

I did debug my program and the values are set for filename, data and mime type but still it is not displayed in the File upload UI Element.

Have you tested in this scenario?

Regards

Shanthi

Former Member
0 Kudos

Have you written any code in MODIFYVIEW........

Former Member
0 Kudos

hi,

Due to browser restrictions that are unrelated to Web Dynpro ABAP, the previously entered data path might disappear when a FileUpload UI element is clicked. In newer versions of the browser, it is therefore impossible to enter the file name in the entry field. The field always remains empty. For more details, read the security-related information in Internet Explorer 6 about handling <input type=file>.

Refer SAP Online help : http://help.sap.com/saphelp_nw70/helpdata/en/b3/be7941601b1d09e10000000a155106/content.htm

Actually your view is not getting refreshed, but it is due to browser restrictions.

Your contexts binded with fileupload will be having all the values until you wash.

Former Member
0 Kudos

Hi Lekha ,

I have not used any code in modify view.

Am i supposed to use methods like Bind_File_Name and BInd_Data?

Please help me. i have to close this issue today.

Thanks in advance

Regards

Shanthi

Former Member
0 Kudos

Hi Saurav Mago ,

Do you mean to say that if i refresh my view and then set the values for data, file name and mime .... it will work?

If so, how do i refresh my view?

Thanks in advance.

Regards

Shanthi

Former Member
0 Kudos

If you want to refresh your view , just invaliate the node.

lo_nd->invalidate( ).

where lo_nd is reference to your node.

Former Member
0 Kudos

Hi Saurav,

I am new to this term "invaliate the node".

How do i do that?

Thanks in advance.

Regards

Shanthi

Former Member
0 Kudos

DATA lo_nd_ztest_fomr TYPE REF TO if_wd_context_node.

lo_nd_ztest_fomr = wd_context->get_child_node( name = wd_this->wdctx_ztest_fomr ). <ztest_fomr is my node>

lo_nd_ztest_fomr->invalidate( ) .

By above code, all your context attributes inside the node will be washed.

Hey, just check after uploading your file whether you attributes have value or not.

If all attributes binded to fileupload has value then you can proceed . Sometimes in input box close to Browse button dont show values but values are there in Attributes.

Due to browser restriction values only disappear from the input but not from context attributes.

Edited by: Saurav Mago on Oct 21, 2009 12:28 PM

Former Member
0 Kudos

hi Lekha,

I am using different context for both the UI elements.

Regards

Shanthi

Former Member
0 Kudos

Hi,

Are you binding the same context to both the UI elements..

Regards,

Lekha.