For an Excel file uploading using File uploading UI element i need to validate what type of file is uploading?
Except Excel other file should not upload any say error message?
And i need to validate each filed validation in excel while uploading in a table if not we need to pass error messages into one internal table?
And records should be saved after uploading using excel in a table as well as in database?
Can any one help me on this.
For validating file type, Create an attribute mime_type in context and bind the mime_type property of the file upload UI to that attribute. After browsing and selecting the file path and on click of Upload button, in onAction of Upload button, Read the mime type using get_attribute method and display an error message if it is not the required type.
If the validation is success, then read the excel data to internal table and then display in Table ui using bind_table method. Then save the data to Data base table.
Check this wiki for more details: http://wiki.sdn.sap.com/wiki/display/WDABAP/Excel+File+Upload+And+Display+Data+Using+Web+DynPro+ABAP
Hope this helps u.,