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

BPC Script Logic- Lookup with multi dimensional combination

Former Member
0 Likes
660

Hi All,

Below code is working fine if I am calling for one region.

*XDIM_MEMBERSET TIME=%TIME_SET%
*XDIM_MEMBERSET CATEGORY=%CATEGORY_SET%
*XDIM_MEMBERSET CUSTOMER=99999999 //- one specific customer
*XDIM_MEMBERSET VIEW=OPERATIONAL

//-- REGION IS NORTH AMERICA
*XDIM_MEMBERSET REGION=BAS(R_NAM) // north America countries hierarchy

*LOOKUP CUST_LOG

*DIM REGION=C_NAM //bas country under north America region

*DIM AUDITIDM=CALC // bas audit
*DIM COSTCENTER=NO_CC // bas cc
*DIM VIEW=OPERATIONAL //bas view
*DIM ACCOUNT=INCOME_AGR //bas account
*DIM CUST1:CUSTOMER=ALL_CLASS // bas customer
*DIM CUST2:CUSTOMER=V_AUT //bas customer
*DIM CUST3:CUSTOMER=V_RET//bas customer
*DIM CUST4:CUSTOMER=V_CON//bas customer
*DIM CUST5:CUSTOMER=V_IND// bas customer
*DIM CUST6:CUSTOMER=V_3PL// bas customer

*ENDLOOKUP


*WHEN ACCOUNT
*IS BAS(ALL_EXPENSE) // parent of expense account
*REC(FACTOR=LOOKUP(CUST2)/LOOKUP(CUST1),COSTCENTER=CC_USREG,CUSTOMER=V_AUT,AUDITIDM="VERTADJ",REGION="C_NAM"
*REC(FACTOR=LOOKUP(CUST3)/LOOKUP(CUST1),COSTCENTER=CC_USREG,CUSTOMER=V_RET,AUDITIDM="VERTADJ",REGION="C_NAM")
*REC(FACTOR=LOOKUP(CUST4)/LOOKUP(CUST1),COSTCENTER=CC_USREG,CUSTOMER=V_CON,AUDITIDM="VERTADJ",REGION="C_NAM")
*REC(FACTOR=LOOKUP(CUST5)/LOOKUP(CUST1),COSTCENTER=CC_USREG,CUSTOMER=V_IND,AUDITIDM="VERTADJ",REGION="C_NAM")
*REC(FACTOR=LOOKUP(CUST6)/LOOKUP(CUST1),COSTCENTER=CC_USREG,CUSTOMER=V_3PL,AUDITIDM="VERTADJ",REGION="C_NAM")
*ENDWHEN

the code is working fine for one region. I want same code to be executed for 4 regions (NAM/SAS/LAM/NAS)

error is coming while putting *For loop, as its calling lookup 4 times based on number of regions.

Please let me know if any alternative to solve this logic. Any help will be really appreciated.

Regards

Priyanka

Accepted Solutions (0)

Answers (2)

Answers (2)

gcybill
Active Participant
0 Likes

Hi Priyanka, you can consider using Package Link instead.

former_member186338
Active Contributor
0 Likes

Sorry, but Package Link proposal has no relation to this question.

gcybill
Active Participant
0 Likes

Hi Vadim, she asked for alternatives, not only script logic alternative.

former_member186338
Active Contributor
0 Likes

Sorry again, but package link is not related to the issue. The code has to be corrected. But I will be able to propose code change only after the clear requirements will be presented.

former_member186338
Active Contributor
0 Likes

The requirements are not 100% clear, please read my blog: https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/

You have to explain the required logic in words and using some screenshots of Excel table.

The dimension REGION is not described...

Former Member
0 Likes

allocate.png

Hi Vadim,

Thanks for reply.

I need to calculate unallocated expenses based on revenue ratios.

Given sample table in attachment.

Regards

Priyanka

former_member186338
Active Contributor
0 Likes

First - never use "Insert File" instead of correct "Insert Image"!

Second - you table is not clear, please spend some time to provide a detailed sample. If you really want an answer...