cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Analytics Cloud for planning - Create and Delete Data, based on Propoerties via Data Action

guenay
Participant
0 Kudos
276

Hello everyone,

We have a specific requirement for our planning scenario regarding master data in our public dimensions, such as Company Code and Cost Center, among others. Due to operational reasons, the association between Cost Center and Company Code can change. For instance, Cost Center 1111 initially matched with Company Code (CC) 0001 may later switch to CC 0002. In such cases, when we have existing transactional data for Cost Center 1111 and CC 0001, I aim to rectify this data.

My approach involves utilizing a Property within the Cost Center Public Dimension to accommodate every Company Code for each Cost Center. To achieve this, I crafted the following Data Action Script:

DATA([d/CompanyCode]=[d/CostCenter].[p/CompanyCode])=RESULTLOOKUP()

This script essentially populates the Property with the appropriate Company Code for each Cost Center. For example, Cost Center 1111 will now have CC 0002 in the Property, enabling the creation of a dataset aligned with CC 0002, replacing the previous dataset associated with CC 0001.

However, my next objective is to delete the outdated dataset linked to CC 0001. This is where I require your assistance. I'm seeking suggestions on how to remove this data when there are no Cost Center and CC combinations in the master data.

I appreciate any input or ideas you might have on this matter. Looking forward to hearing from you.

Kind regards,

Ismail

Accepted Solutions (1)

Accepted Solutions (1)

N1kh1l
Active Contributor

guenay

guenayMay be after you copy just put a IF condition and delete

DATA([d/CompanyCode]=[d/CostCenter].[p/CompanyCode])=RESULTLOOKUP()
IF [d/CompanyCode]!=[d/CostCenter].[p/CompanyCode] THEN
DELETE()
ENDIF

Br.

Nikhil

guenay
Participant
0 Kudos

Thanks a lot Nikhil. Looking forward of a great year 2024 with you 😉

BR

Ismail

N1kh1l
Active Contributor
0 Kudos

guenay

Happy New Year to you too buddy.

Br

Nikhil

Answers (0)