Skip to Content

Business Scenario

A customer is using SAP CPM in S4HANA 1709 and would like to make enhancements to SAP delivered BI content. In this blog, we will be adding new resource type called ‘Equipment Hours’. When user selects this resource type while planning, only selective resources from activity type resources shown.

From S/4HANA 1709 SP 03 or implementation of note  2616494 (Associate Resources from 0ACT and 0MAT Resource Types to Copied Resource Types), different selections can be configured in the resource type customizing for the copied resource type. HANA view changes are no longer required in this case.

The resource type customizing, however, allows applying filters for resources on the fields controlling area and UoM. I am updating this blog to cover the scenario where a resource filter is required on an additional field taking cost center categories field as an example.

Steps in the system

To achieve this, following activities will be required in the system:

  • Create 4 activity types with basic data and hourly rates
    • Earth Moving (With cost center category = H ‘Service Cost Center’)
    • Cranes (With cost center category = H ‘Service Cost Center’)
    • Fork Lifts (With cost center category = G ‘Logistics’)
    • Generators (With cost center category = G ‘Logistics’)
  • Create new resource type Equipment
  • Adjust HANA views
  • Plan a project and check behavior of the newly added resource type

We will apply a resource type filter cost center category = G ‘Logistics’ so the newly created resource type should show only the resources Fork lifts and Generators in the input help.

Let’s take a detailed look at each step.

Create activity types

Go to transaction KL01 –> Enter Controlling Area (In this case we will use 0003) –> Enter Activity Type (In this example “EXT-01”) –> Enter valid from and valid to dates –> Hit Enter –>

Enter Name, Description, Activity Unit, Cost Center Categories and Activity Type Category and save.

Similarly create EQM-02 (Cranes).

Create EQM-03 (Fork Lifts) and EQM-04 (Generators) with G (Logistics) as cost center category.

To maintain price, go to transaction KP26 and enter following in the selection screen:

  • Version
  • From Period
  • To Period
  • Fiscal Year
  • Cost Center
  • Activity Type

Click “Overview Screen” –> Maintain the required price

Similarly maintain prices for EQM-02 (Cranes), EQM-03 (Fork Lifts) and EQM-04 (Generators)

Create new Resource Type “Equipment Hours”

To create a new Resource Type for Equipment Hours, go to transaction SPRO –> SAP Customizing Implementation Guide –> Commercial Project Management –>Project Cost and Revenue Planning –> Define Resource Type –> Click “New Entries”

Define selection conditions so that activity types defined are selected. In this case we will select Controlling Area as ‘0003’ and unit of measure as ‘H’ to restrict the selection. Also, additional filter on cost center category = G ‘Logistics’ will be applied in the HANA calculation view. This is explained in the next section.

Adjust HANA Views

Create a new HANA Calculation View for Equipment Hours by copying SAP delivered Calculation View CV_RESOURCE_0ACT

Open HANA Studio –> HANA Modeling Perspective –> Navigate to the relevant Package –> Create a new Calculation View CV_RESOURCE_0EQM by copying the Calculation View CV_RESOURCE_0ACT in a custom package. In this case we will use package “tmp.enhancements”.

In Projection_1 add the field KSTTY (Cost Center Categories) from the table CSLA to the output

Edit the filter expression of Projection_1 to include filter on KSTTY = G.

Also, apply the filter resource type = 0EQM in Projection_2 and Projection_6 to fetch data only for resource type 0EQM.

Projection_2

Projection_6

Check the data preview of CV_RESOURCE_0EQM. It should only show resources EQM-03 and EQM-04 as these are the only resources with cost center category = G.

Now we need to include the Calculation View CV_RESOURCE_0EQM in the Calculation View for Resource CV_RESOURCE. To do this copy CV_RESOURCE as a new Calculation View. In this example, I have copied it as CV_RESOURCE_NEW. In CV_RESOURCE_NEW add a new projection (Projection_1) in this case and include CV_RESOURCE_0EQM and map the fields from Projection_1 in Union_1.

Also apply additional filter resource type not equal to 0EQM in the projection Activity. This is to ensure that the standard resource type does not fetch any values for resource type 0EQM.

Finally, change the characteristic Resource (/CPD/FRES) to access master data from CV_RESOURCE_NEW instead of CV_RESOURCE.

HANA Studio –> BW Modeling Perspective –> Navigate to Resource (/CPD/FRES) and double click to open the maintenance –> Go to Master Data/Texts tab –> Click on Details button

Select the SAP HANA Package and SAP HANA View –> Activate /CPD/FRES

 

Enter plan for a project

Launch the monthly planning workbook –> Select a structure element –> Select Resource Type “Equipment Hours” –> Click input help for Resource

The input help for resource only shows the activity types defined in Controlling Area ‘0003’ with unit of measure as ‘H’ and cost center category ‘G’.

 

 

 

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply