cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Destination_app

sap_user62
Active Participant
0 Likes
299

Env- 10.1 standard nw

Hello Friends,

In destination_app can we assign the value of one existing source dimension to new destination dimension without using a for loop.

Scenario - Push the data from Finance model to Allocation model. Finance Model has dimension CostCenter

Allocation Model has CostCenter and Sender. I want to assign the value in Sender dimension same as Costcenter.

The below code works well.

I am trying to find an alternative way of writing this script so that I can avoid "for" loop and assign the value of Costcenter to Sender directly in destination app. We will have an significant increase in the number of records come next month, and I feel the for loop might have performance issues.

*SELECT(%Senders%, [ID], Costcenter, "SENDERS='Y'")
*XDIM_MEMBERSET CATEGORY = ACTUAL
*XDIM_MEMBERSET ACCOUNT = BAS(XXXX)
*XDIM_MEMBERSET AUDITTRAIL = BAS(AT)
*XDIM_MEMBERSET RPTCURRENCY = USD, LC


*FOR %Sender% = %Senders%
    *XDIM_MEMBERSET Costcenter = %Sender%
    *DESTINATION_APP = Allocations
    *ADD_DIM ALLOCATION_ACCOUNT = YYYY
    *ADD_DIM SENDER = %Sender%
    *SKIP_DIM = ACCOUNT, Profitcenter, TRADING_PARTNER
    *WHEN CATEGORY
    *IS ACTUAL
	*REC(EXPRESSION=%VALUE%, AUDITTRAIL= ZZZZ)
    *ENDWHEN
*NEXT

Thanks for your time
ed.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes

P.S. Not tested! If not working with "Costcenter:ID" - the only solution is to create a property in Costcenter dimension duplicating ID (for example IDCOPY) and use it like:

*ADD_DIM ALLOCATION_ACCOUNT=YYYY, SENDER = Costcenter:IDCOPY

Answers (2)

Answers (2)

sap_user62
Active Participant
0 Likes

Thanks Vadim for your reply.

Costcenter:ID did not work - short dump.
As suggested I have created IDCOPY  - script runs well and very fast.

I am not able to accept your 2nd reply as the correct answer. It does not give me an option.

former_member186338
Active Contributor
0 Likes

Converted comment to answer - can be accepted!

former_member186338
Active Contributor
0 Likes

Try the following:

*SELECT(%Senders%, [ID], Costcenter, "SENDERS='Y'")
*XDIM_MEMBERSET CATEGORY = ACTUAL
*XDIM_MEMBERSET ACCOUNT = BAS(XXXX)
*XDIM_MEMBERSET AUDITTRAIL = BAS(AT)
*XDIM_MEMBERSET RPTCURRENCY = USD, LC
*XDIM_MEMBERSET Costcenter = %Senders% //scope all CC required

*DESTINATION_APP = Allocations
*ADD_DIM ALLOCATION_ACCOUNT=YYYY, SENDER = Costcenter:ID //ID - property of Cost Center 
*SKIP_DIM = ACCOUNT, Profitcenter, TRADING_PARTNER
*WHEN CATEGORY
*IS *
  *REC(EXPRESSION=%VALUE%, AUDITTRAIL= ZZZZ)
*ENDWHEN

Based on help: https://help.sap.com/viewer/a2049170bfeb4178ace32222842c3ec1/10.1/en-US/f433f0bbc46c4a53860f1410f20f...