‎2018 Jun 06 7:50 AM
Dear All,
I have an requirement ,to upload the excel sheet data into a report program for updating material master. In excel sheet , I have one column with date values. I want to validate the value entered by user in excel sheet is in DDMMYYYY.
I am trying to do it as below:
SET PROPERTY OF lv_selection 'NumberFormat' = '[$-14409]dd.mm.yyyy;@'.
but it is not working. acn anyone has worked on similar kind of req?
and also i have one more question , if i enter the value in excel cell starting with 0 , zero is going off.
Thanks,
Arpita
‎2018 Jun 06 7:58 AM
Req is to download excel template using OLE2_OBJECT, there we are using
SET PROPERTY OF lv_selection 'NumberFormat' = '[$-14409]dd.mm.yyyy;@'.even thought it is not showing format.
Sample Code:
CALL METHOD OF lv_activesheet 'Columns' = lv_column EXPORTING #1 = 8.
* Format of the column
CALL METHOD OF lv_column 'Select'.
CALL METHOD OF lv_application 'selection' = lv_selection.
SET PROPERTY OF lv_selection 'NumberFormat' = '[$-14409]dd.mm.yyyy;@'.
‎2018 Jun 06 8:28 AM
Hi,
1. When uploading from Excel, i usually use data type STRING.
After calling BAPI/FM to convert excel file to internal table, the validation of STRING is much more easier and flexible.
2. You'd better to format the column in excel to Text or put character ' before entering number
Best Regards,
Nam