Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

WRITE_TO_FAC2 Question

I have a logic script that runs very slowly when more than 100 records are sent to the cube. In order to improve performance I'm testing using the Write_to_FAC2/Process_FAC2 instructions. When I add these instructions the sending is fast, but only the first time period is processed. Do I need a For/Next loop or is the placement of the instrucitons the problem? Below is my script:

// <Driver 3. % of Current Period Sales by Team/SubTeam>

*XDIM_MEMBERSET CATEGORY=Forecast

*XDIM_MEMBERSET ACCOUNT = %DriverAccounts%

*XDIM_ADDMEMBERSET ACCOUNT=%SalesAccounts%

*XDIM_MEMBERSET DATASRC=INPUT,AUTO_CALC,DRIVER_METHOD,DRIVER_AMOUNT

*XDIM_ADDMEMBERSET DATASRC=FLASHSRC,ESSBASE,HCM,SUPP,PS

*XDIM_MEMBERSET RPTCURRENCY=LC_FOREIGN,USD_US

*XDIM_ADDMEMBERSET TEAM=%TEAMLIST%

*XDIM_ADDMEMBERSET SUBTEAM=%SUBTEAMLIST%

*LOOKUP FINANCE

*DIM ENTITY=ENTITY

*DIM ACCOUNT=ACCOUNT

*DIM RECALC_SETTING: DATASRC="AUTO_CALC"

*DIM DRIVER_CHOSEN: DATASRC="DRIVER_METHOD"

*DIM DRIVER_AMOUNT: DATASRC="DRIVER_AMT"

*ENDLOOKUP

*CALC_DUMMY_ORG

*ORG ACCOUNT=PARENTH1

*ENDCALC

*CALC_DUMMY_ORG

*ORG TEAM=PARENTH1

*ENDCALC

*CALC_DUMMY_ORG

*ORG SUBTEAM=PARENTH1

*ENDCALC

*CALC_DUMMY_ORG

*ORG DATASRC=PARENTH1

*ENDCALC

*WRITE_TO_FAC2

*PROCESS_FAC2

*WHEN DATASRC

*IS AUTO_CALC

*WHEN LOOKUP(RECALC_SETTING) // Turned on?

*IS = 2

*WHEN LOOKUP(DRIVER_CHOSEN) // check the method

*IS = 3

REC(Expression=(LOOKUP(DRIVER_AMOUNT)get(ACCOUNT="#ALL_SALES",DATASRC="#ALLSOURCES")*-1), DATASRC ="INPUT")

*ENDWHEN

*ENDWHEN

*ENDWHEN

*COMMIT

Former Member
Not what you were looking for? View more on this topic or Ask a question