cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate labor's output by hours

former_member323997
Participant
0 Kudos

Hello,

I received a request, our business would like to see the labor/operator's workload/output by the resource and hours. I checked the database schema, we have the production_log to store such kinds of data information, within this table, I can find the resource, operation, SFC information, but I can't identify the hour, it looks all the column's data type within this table is date, no datetime type. Is there any other ways we can get out such hour/minutes data?

PS: we don't use the Label feature in our SAP ME5.1

Thanks a lot and best regards,

Leon Lu

Edited by: Leon Lu on Aug 17, 2011 6:00 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Leon,

DATE_TIME field keeps both date and time. Additionally there is ELAPSED_TIME field. For detailed desciption of the fields, please refer to [Object and Database Guide|https://websmp209.sap-ag.de/~sapdownload/011000358700001374842008E/objectanddatabase.pdf].

Regards,

Sergiy

former_member323997
Participant
0 Kudos

Thanks, Sergiy.

I checked the production_log and ods_production_log DATE_TIME fields in our database, both of them are DATE type. There are no datetime type existed in production_log table. How can we get the date and time based on the DATE type?

=============================

desc ods_production_log

Name Null Type

-


-


-


SITE VARCHAR2(6)

ACTIVITY VARCHAR2(20)

DATE_TIME DATE

PRODUCTION_DATE DATE

xxxxx

xxx

x

x

x

x

x

0 Kudos

Please refer to the description of DATE datatype or just look into the table to make sure that both date and time are stored there (at least, this is what I see in my DB).

Regards,

Sergiy

former_member323997
Participant
0 Kudos

Unfortunately, what I see is only the date is stored into the DATE_TIME filed. Based on my knowledge, if the type is DATE, and even we send a date and time value, but finally it still only stores the date into this field.

Now I am interested to know why the date_time field's type is different from yours as well as why we don't have any datetime type in the production_log table.

Thanks a lot and best regards,

Leon Lu

0 Kudos

I doubt it is true: I've just checked your WIP dump from Washington in our local testing environment and DATE_TIME field of DATE datatype contains both date and time indeed.

Regards,

Sergiy

former_member323997
Participant
0 Kudos

I also checked our Washington database, it is as same as our other sites.

Using the select date_time from ods_production_log, we only can see a date value like 02-FEB-01, and if we edit this field into a oracle client tool, like Oracle SQL Developer, yes, we can see the value of DATE_TIME is like 02-FEB-01 12:00:00AM CST, but I think the 12:00:00AM CST should not be a correct time of this.

What do you mean "It is true"? I even checked our ME5.2 database, the DATE_TIME type is also the date.

Thanks a lot and best regards,

Leon Lu

former_member323997
Participant
0 Kudos

Hi again,

I have figured out how to retrieve the time from a date type.

select to_char(DATE_TIME, 'Dy DD-Mon-YYYY HH24:MI:SS') as "Current Time" from ods_production_log

this should be able to display the value what I am expecting.

Thanks a lot and best regards,

Leon Lu

0 Kudos

I don't have your 5.2 dump but I'm checking 5.1 WIP.PRODUCTION_LOG.DATE_TIME of Washington. Here are the dates I see:

max = 8/26/2009 8:15:14 PM

Thus that couldn't be just a date with default 12:00:00.

ODS.ODS_PRODUCTION_LOG.DATE_TIME of my 5.2 local env looks like this:

11/23/2010 3:51:15 PM

1/6/2011 3:44:04 AM

which does not seem to be just a date without time.

And everywhere the datatype is DATE.

Regards,

Sergiy

former_member182330
Active Contributor
0 Kudos

Hi Leon,

The problem here is with the tool you are using to retrieve data. It must be configured appropriately to display full time stamp. I has the same issue with Oracle SQL Developer tool.

Regards,

Konstantin