Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

/SAPAPO/OM_RESOURCE_GET_BRUTTO - Calculates Gross Dates by Net Times

/SAPAPO/OM_RESOURCE_GET_BRUTTO - Calculates Gross Dates by Net Times

TXBHW - Original Tax Base Amount in Local Currency   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Further information

@0P@Time Stream


Given a time stamp, the net processing time of an activity and a resource, this function module uses the resource's time stream to calculate the gross start and end time of the activity, if it would be scheduled on this resource at the specified time.

To have liveCache calculate the gross dates for a single net time:

  • Add a record to import table IT_RESOURCE_TIME. Enter the net processing time into field PROC_TIME, the resource GUID into field RESUID and leave all other fields of this data record initial.
  • Add a single record to import table IT_TIME containing the time stamp at which the activity should be placed on the resource. Leave field IND initial.

In this case, liveCache returns a single record in export table ET_TIMES containing the gross start and end time of the activity.

Import parameter IV_FORWARD defines the direction of calculation: When gc_true (forward scheduling), liveCache determines the gross dates of an activity that would start at the given time stamp, when gc_false (backward scheduling), liveCache calculates the gross datesof an activity that has to be finished at the given time.

Using Resource Efficiency

By default, resource efficiency is not taken into account when calculating the gross start and end times of an activity. You can changethis behaviour by setting the USE_EFFICIENCY field of a record in IT_RESOURCE_TIME to true.

Scheduling Without Breaks

If there is no scheduled break on the resource's time stream, and resource efficiency is not used, liveCache will return the given time stamp either as gross start time (when scheduling forward) or end time (when scheduling backward).

Basic Examples

A resource's time stream defines two work periods from 7:00h to 12:00h and 14:00h to 19:00h for every working day leaving a scheduled break between 12:00h and 14:00h:

+-------------------+ +--------------------+
| | Scheduled | |
| Work Period | Break | Work Period |
| | | |
-----+ +-------------+ +----------
7:00h 12:00h 14:00h 18:00h

# Time Stamp   Net Processing Time   IV_FORWARD     Resulting Gross Dates
1. 16:00h   2 hrs   'X'     16:00h - 18:00h
2. 16:00h   2 hrs   ' '     14:00h - 16:00h
3. 15:00h   2 hrs   'X'     15:00h - 17:00h
4. 15:00h   2 hrs   ' '     11:00h - 15:00h
5. 11:00h   2 hrs   'X'     11:00h - 15:00h
6. 12:00h   2 hrs   'X'     14:00h - 16:00h
7. 13:00h   2 hrs   'X'     14:00h - 16:00h
8. 13:00h   2 hrs   ' '     10:00h - 12:00h


  1. The activity shall start at 16:00h at the earliest and has a net processing time of 2 hours. Since no scheduled breaks on the time stream interfere, the activity can be processed from 16:00h to 18:00h.
  2. Now the activity shall be finished no later than 16:00h. Again no breaks interfere, so the activity can be processed from 14:0 0h to 16:00h.
  3. The activity shall now start at 15:00h. We are scheduling forward, so the resulting end time is 17:00h.
  4. The activity must be finished at 15:00h. Since the net processing time is 2 hours, but there is only 1 working hour available on the afternoon shift from 14:00h to 15:00h, we need an additional hour from the A.M. shift from 11:00h to 12:00h.
  5. The activity starts at 11:00h and is interrupted by the scheduled break between 12:00h and 14:00h. The remaining processing time of 1 hour will start at 14:00h, so the activity will be completed at 15:00h.
  6. The activity shall start at 12:00h at the earliest. Due to the scheduled break from 12:00h to 14:00h processing starts as late as 14:00h and is finished at 16:00h.
  7. Same as before, since the given time stamp lies within the scheduled break interval, processing has to wait for the start of the afternoon shift at 14:00h.
  8. Now the activity must be finished at 13:00h. As is can not be processed between 12:00h and 13:00h, it has to be started at 10:00h to be completed before the A.M. shift's end.

Sequential Gross Dates Calculation

By writing multiple records to IT_RESOURCE_TIME you can have liveCache calculate the gross dates of several consecutive activies, possibly scheduled on different resources. You have to enter a distinct resource index RES_INDEX for each record in IT_RESOURCE.

liveCache starts at the time stamp specified in IT_TIME and calculates the gross dates for the first record of IT_RESOURCE. Afterwards it uses the gross end time determined in this first step as the starting point for calculating the gross duration for the next record in IT_RESOURCE, and so on.

When you enter multiple records in IT_TIME, you have to specify a uniquetime stamp index IND for each record. This this case, liveCache repeats the sequential gross dates calculation described above for each record in IT_TIME.


Using forward scheduling we want to schedule two activities on above resource. The net processing times are 1 hour for the first and 2 hours for the second activity. This information is entered into table IT_RESOURCE:

'UID' 1   1 hour
'UID' 2   2 hours

We would like to determine which gross dates result when we start to process the activities either at 8:00h or 10:00h. Thus we write two records to IT_TIME:

08:00h 1
10:00h 2

When called with these import parameters, OM_RESOURCE_GET_BRUTTO fills ET_TIMES as follows:

08:00h 09:00h   1   1
09:00h 11:00h   1   2
10:00h 11:00h   2   1
11:00h 15:00h   2   2

When processing starts at 8:00h, the first activity is finished after 1 hour at 9:00h. Processing of the second activity starts at this time and consequently ends 2 hours later at 11:00h.

If processing starts as 10:00h, the first activity is finished at 11:00h. The second activity starts at this time, but is now interrupted by the scheduled break between 12:00h and 14:00h. Therefore, the end time of the second activity is as late as 15:00h





Function Group


PERFORM Short Reference   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 12654 Date: 20211204 Time: 032221     sap01-206 ( 121 ms )