cancel
Showing results for 
Search instead for 
Did you mean: 

SAC Planning BPC live model - Publish data from the script issue

playaben82
Explorer
0 Kudos
316

Hi gurus,

I'm working in an SAC Planning environment connected to a live BPC embedded model from BW. I use buttons with scripts to run several planning sequences together with data saves (publish data) in the same step, and it works fine when I'm working with the model and a table in input mode. However, I've noticed that it doesn't recognize that the version's data has been modified for a story where I run a planning sequence and a data save, where the table is not input-ready. It seems like there's a delay between the end of the sequence and the data published. As a workaround, I've added a refresh step between the sequence execution and the publish step, and it works that way. Has anyone else experienced this? Any other solutions?

This is the code:

BPC_PlanningSequence.execute();

//This refresh is introduced with the purpose of ensuring that it recognizes 
Table_1.getDataSource().refreshData();

var bpcVersion = Table_1.getPlanning().getPublicVersion("All Versions");
if (bpcVersion) {
if(bpcVersion.isDirty()) {
bpcVersion.publish();
};
};

Best Regards,

Rubén

 

View Entire Topic
Savio_Dmello
Active Participant

Try this step. If you are executing all the planning sequence through process chain, at the end of the planning sequence, add a program to switch the ADSO from planning mode to loading mode and back to planning Mode. SAP note: 3455780 , you can use, class CL_RSPLS_CUBE_SWITCH_L and CL_RSPLS_CUBE_SWITCH_P

Thanks

Savio

playaben82
Explorer
Thank you Savio for your answer. But I use a BPC connection from SAC and the BPC planning sequence is executed directly. The procedure would likely work, but I don't want to increase the user's waiting time. With the refresh in the script, it works fine. However, my concern is that there might be a slight delay, possibly just a second, during which the system doesn't recognize that the data has changed, causing the SAC script to report that there's no data to save. When I include the refresh, it correctly detects the change and saves the data.
Savio_Dmello
Active Participant
This is very unique scenario and its worth opening an incident with SAP. I think you are able to reproduce the issue, So SAP should provide a fix