‎2015 Jan 23 6:20 AM
Hi everyone,
I'm creating a report in which i'm stuck and not able to solve it..Hope u guys will help me out.
Here is my issue..
I'm creating a new report for unused t-codes in which i have to download data from SM20 and store it in a database table which i have created.
The records are huge so need to store them in table.When i download the data the time column in it is being downloaded in the format "12.02.00 PM"
So when i try to upload the excel sheet it is not processing since the time format is not compatible.
I did search but couldn't find proper answer to it.
Can anyone help me how to solve it pls.I need to submit it today.
Thank You.
‎2015 Jan 23 6:30 AM
Hi,
U shall try to remove the PM by using 'REPLACE ALL OCCURRENCES OF' and upload the same in data base table.
Regards,
Vinodkumar.
‎2015 Jan 23 6:36 AM
Hi Vinod,
First of all thanks for replying.
Can u please elaborate it,because first step in my program itself is uploading the file.When am i supposed to use the statement to remove AM/PM from time format.
‎2015 Jan 23 7:42 AM
Hi,
Before uploading u shall change the format rit.
Regards,
Vinodkumar.
‎2015 Jan 23 6:41 AM
Hi,
try to make the formation as string in Excel, like 12:20:33 AM to 122030AM.
And then try to upload the data in internal table.
Take the CHAR8 data type for Time column, once you get the data in internal table, change the same as per your requirement.
Regards.
Praveer.
‎2015 Jan 23 6:47 AM
Hi praveen,
that won't workout i guess.The data is very huge.
‎2015 Jan 23 6:53 AM
Hi,
What wont workout?
or
Changing format of time in Excel or Uplodaing and changing again in SAP ends
For change the Format, take any excel expert help, in excel one option is there to 'REPLACE' method to replace the value based on the selected column.
Regards.
Praveer.
‎2015 Jan 23 7:03 AM
@Praveen.
of course the idea abt replacing in excel works,but can't ask the users to replace whenever they download data in excel.
‎2015 Jan 23 7:19 AM
Hi,
You have excel with you, make a copy of that and follow the below step to format you excel sheet.
1. Open Excel.
2. Select the Time Column.
3. Select ->Replace Option.
4. Give Below screen input and select replace all.
5.the same way pass 'AM' and 'PM' to repalce with '' [SPACE].
input ; 12.13.25AM
output: 121325.
Hope you can understand the process.
Regards.
Praveer.
‎2015 Jan 23 7:44 AM
@praveen.
The problem is not during uploading.Yes we can upload the excel sheet,but after storing in table it doesn't take time format but instead gives something like "0.4126".So what could be the format for uploading time with AM/PM.
‎2015 Jan 23 8:56 AM
Hi,
that's why, i ask you, before uploading change the format of the time.
In SAP time format is
In Excel, after format the time (The process already explained).
In program, internal table will store the data in same format.
Hope, you understand, how time is storing in SAP.
Regards.
Praveer.
‎2015 Jan 23 9:12 AM
Hi praveer,
u are not understanding abt my requirement.
when i download data from SM20,it stores time with AM or PM in excel sheet (Ex:09:50:00 AM).
And when i debug and see its displaying time as 0.4197 instead of 09:50:00.
Hope u anderstand.
‎2015 Jan 23 10:05 AM
Hi,
Means, you are trying to upload the information from Excel.
Since SAP is not having the AM/PM format with Sy-uzite, so you have to change the Format of the data 1st in Excel and then you have to upload the same in SAP.
Regards.
Praveer.