Quantcast
Channel: SCN : Unanswered Discussions - SAP Crystal Reports
Viewing all articles
Browse latest Browse all 4814

how to calculate the time spent producing the order ?

$
0
0

Here what I am trying to do is calculate the time so that if the EMTRNC is one of these codes, it is when the worker started to work on the order and the time we have as EMTRT. then we have the end time if the code is ECT which has a time also. the end time of the task. I have code to calculate hours from these minutes but how would you do the basic subtract here? and at which point?

 

shared numbervar TotalMin:=TotalMin;

shared numbervar endtime:=0;

shared numbervar CalTime:= CalTime;

 

 

if {EMPHISTL1.EMTRNC} in ('REL' 'EBC' 'EBV' 'EBA' 'BOM' 'BOO' 'BSB')

and {EMPHISTL1.EMPDPT} in '422' '2'

 

 

then

    TotalMin:= {EMPHISTL1.EMTRT};

//

if {EMPHISTL1.EMTRNC} = 'ECT'

 

then

    endtime:= {EMPHISTL1.EMTRT};


Viewing all articles
Browse latest Browse all 4814

Trending Articles