cancel
Showing results for 
Search instead for 
Did you mean: 

How to find size of a attached file in webdynpro

Former Member
0 Kudos

Hi all,

i have to do validate that all attached file should not be more than 60 mb. we need to get file the file size ..?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I am assuming you are using file upload UI element, the data should have been binded to element

of type xstring?

If that's the case a simple abap statement to get the number of bytes on a xstring should work

http://help.sap.com/abapdocu_702/en/abendescriptive_functions_binary.htm

amy_king
Active Contributor
0 Kudos

Hi Jiten,

Take a look at demo component WDR_TEST_EVENTS and its view FILEUPLOAD in your system. You can get the size of an uploaded file by using built-in function xstrlen...

size = xstrlen( xstring_file_content ).

This will give you the size of the file in bytes.

Cheers,

Amy