cancel
Showing results for 
Search instead for 
Did you mean: 
SAP Community Downtime Scheduled for This Weekend

update routine

Former Member
0 Kudos
53

Hi mates,

i hv start date,end date, start time, end time of truck in ODS . with help of these KF need to update data in to total time in secenods in cube, so i hv write update routine to calculate the time.i hv writen code but its givening errors.

ranga.

Accepted Solutions (0)

Answers (2)

Answers (2)

sap_cohort
Active Contributor
0 Kudos

Put the begin time and end time into time stamps and use the following. Please reward points.

DATA: STARTTIMESTAMP TYPE RSTIMESTMPL.

DATA: ENDTIMESTAMP TYPE RSTIMESTMPL.

DATA: L_TIME TYPE SYUZEIT.

DATA: L_SEC TYPE I.

DATA: L_DAY TYPE I.

DATA: L_MILISEC TYPE I.

DATA: DURATION TYPE RSDDKRUNTIME.

CALL FUNCTION 'RSSM_SUBSTRACT_TIMESTAMPS'

EXPORTING

TIMESTAMP1 = STARTTIMESTAMP

TIMESTAMP2 = ENDTIMESTAMP

IMPORTING

TIME = L_TIME

SECS = L_SEC

DAYS = L_DAY

MILISECS = L_MILISEC.

DURATION = L_DAY * 86400 + L_SEC + ( L_MILISEC / 10000000 ).

Former Member
0 Kudos

Hi Hari,

Share your code please.

Regards

Vikash