on 05-24-2017 4:49 PM
I'd like to schedule reports to be distributed during period close activities automatically. I've run across a few problems while doing this. We are on BPC 10.1 NW
1. My scheduling requirement is beyond what is available so I need to create two separate schedules, but this is not possible because each time I create a new scheduled task to distribute the reports it overwrites the previous task. I read in some documentation that we are unable to change the windows task name...as such can only have one scheduled task for BPC report distribution. Any work around?
2. I'd like to schedule the reports to run at times that I may not be at work and my computer may be offline. If my computer is offline and not connected to the network then the windows task will not execute. Any work around on this? Schedule on app server directly?
3. Ideally I could add this distribution schedule as the last step of my package link to load all data to BW->BPC. I've not seen that this is possible. Perhaps with a custom developed package? Is anyone else doing this?
Better solution:
EPM distribution will create windows task schedule with the following command to execute:
C:\Program Files (x86)\SAP BusinessObjects\EPM Add-In\FPMXLClient.BooksPublication.exe
"C:\Users\KalininVE\Documents\PC_NW\KalininVE\Books\ENVIRON_NAME\MODEL_NAME\WebExcel\BatchFiles\D 10.0.60.33_8000 ENVIRON_NAME MODEL_NAME KalininVE"
where "D 10.0.60.33_8000 ENVIRON_NAME MODEL_NAME KalininVE" is xml file like:
<?xml version="1.0"?>
<BookStructureList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<List>
<BookStructure>
<PathBookTemplate>C:\Users\KalininVE\Documents\PC_NW\KalininVE\Books\ENVIRON_NAME\MODEL_NAME\ADMIN\WebExcel\ManageDistributionList\TestD.xltx</PathBookTemplate>
<PersistConnectionName>_FPM_BPCNW10_[http://10.0.60.33:8000/sap/bpc/]_[ENVIRON_NAME]_[MODEL_NAME]_[false]_[false]</PersistConnectionName>
<ApplicationName>MODEL_NAME</ApplicationName>
<ClearBook>Accumulate</ClearBook>
<TemplateType>DistributionList</TemplateType>
<VariableTime />
<Name>TestD</Name>
<SectionStructureList>
<SectionStructure>
<Name>Main</Name>
<SectionEnabled>true</SectionEnabled>
<ClearSection>Accumulate</ClearSection>
<ReportStructureList>
<List>
<ReportStructureItem>
<Description>ttttttt</Description>
<ReportPath>%REPORTS%\%ADMIN%\REPORTS\TestReport1.xlsx</ReportPath>
<SubFolder>REPORTS</SubFolder>
<Workbook>TestReport1.xlsx</Workbook>
</ReportStructureItem>
</List>
</ReportStructureList>
<FixMemberList />
<SuppressCriteria />
<VarMembers>
<VariableElementsStructure>
<MemberStructureList>
<MemberStructure>
<Dimension>COMPANY_CODE</Dimension>
<Member>[COMPANY_CODE].[PARENTH1].[CO_XX00]</Member>
</MemberStructure>
<MemberStructure>
<Dimension>USER ID</Dimension>
<Member>KALININVE</Member>
</MemberStructure>
</MemberStructureList>
</VariableElementsStructure>
</VarMembers>
</SectionStructure>
</SectionStructureList>
<FinalAction>Print</FinalAction>
<FileName>TestD.xltx</FileName>
<StorageTeam>
<Id>ADMIN</Id>
<Description>ADMIN</Description>
<IsTeamLeader>true</IsTeamLeader>
</StorageTeam>
</BookStructure>
</List>
<FilePath>C:\Users\KalininVE\Documents\PC_NW\KalininVE\Books\ENVIRON_NAME\MODEL_NAME\WebExcel\ManageDistributionList\</FilePath>
<Type>DistributionList</Type>
<PersistConnectionName>_FPM_BPCNW10_[http://10.0.60.33:8000/sap/bpc/]_[ENVIRON_NAME]_[MODEL_NAME]_[false]_[false]</PersistConnectionName>
<ApplicationName>MODEL_NAME</ApplicationName>
<FinalAction>XlsSave</FinalAction>
<IsLocal>true</IsLocal>
<DestinationPath>C:\Pictures</DestinationPath>
<SinglePdfConfiguration>
<PublicationDestination>PrivatePublication</PublicationDestination>
<Enabled>false</Enabled>
</SinglePdfConfiguration>
<SingleWorkbookConfiguration>
<Enabled>false</Enabled>
</SingleWorkbookConfiguration>
<MailConfiguration>
<RequestConfirmation>false</RequestConfirmation>
<ZipAttachments>false</ZipAttachments>
<InboxCopy>false</InboxCopy>
</MailConfiguration>
<SMPTConfiguration>
<Address /><UserId /><Password />
<AuthenticationType>0</AuthenticationType>
<Port>0</Port>
<EnableSsl>false</EnableSsl>
</SMPTConfiguration>
<SheetBySheet>false</SheetBySheet>
<PrintEmpty>true</PrintEmpty>
<CredentialsForSerialization>
<BPCCredentials>
<UserLogin>xxxxxxxxxxxxxxxxxxxxxx</UserLogin>
<UserPassword>xxxxxxxxxxxxxxxxxxxxxx</UserPassword>
<ShouldCheckCredentialsBeforeConnect>false</ShouldCheckCredentialsBeforeConnect>
<CredentialsType>Basic</CredentialsType>
</BPCCredentials>
</CredentialsForSerialization>
</BookStructureList>
Containing all information for distribution!
You can schedule the same yourself using Windows task scheduler multiple times using different task names and different times to execute!
Use Manage Computer -> Task Scheduler...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use VBA to create schedule tasks: https://msdn.microsoft.com/en-us/library/aa383665(v=VS.85).aspx
VBA code that will create windows task schedule same way as BPC Distribution:
Sub SetTask()
Const TriggerTypeTime = 1
Const ActionTypeExec = 0
Dim service
Set service = CreateObject("Schedule.Service")
Call service.Connect
Dim rootFolder
Set rootFolder = service.GetFolder("\")
Dim taskDefinition
Set taskDefinition = service.NewTask(0)
Dim regInfo
Set regInfo = taskDefinition.RegistrationInfo
regInfo.Description = "BPC Distribution"
regInfo.Author = "PCNAMEorDOMAIN\KalininVE"
Dim principal
Set principal = taskDefinition.principal
principal.LogonType = 6 'TASK_LOGON_INTERACTIVE_TOKEN_OR_PASSWORD
Dim settings
Set settings = taskDefinition.settings
settings.Compatibility = 1
settings.DisallowStartIfOnBatteries = False
settings.StopIfGoingOnBatteries = False
settings.Enabled = True
settings.StartWhenAvailable = True
settings.Hidden = False
settings.Priority = 5
Dim idlesettings
Set idlesettings = settings.idlesettings
idlesettings.StopOnIdleEnd = False
idlesettings.RestartOnIdle = False
Dim triggers
Set triggers = taskDefinition.triggers
Dim trigger
Set trigger = triggers.Create(TriggerTypeTime)
Dim startTime, time As Variant
time = DateAdd("s", 60, Now) 'start time = 60 seconds from now
startTime = XmlTime(time)
trigger.StartBoundary = startTime
trigger.ID = "TimeTriggerId"
trigger.Enabled = True
Dim Action
Set Action = taskDefinition.Actions.Create(ActionTypeExec)
Action.Path = "C:\Program Files (x86)\SAP BusinessObjects\EPM Add-In\FPMXLClient.BooksPublication.exe"
Action.Arguments = """C:\Users\KalininVE\Documents\PC_NW\KalininVE\Books\ENVIRON_NAME\MODEL_NAME\WebExcel\BatchFiles\D 10.0.60.33_8000 ENVIRON_NAME MODEL_NAME KalininVE"""
'Task Name:"AAAAAAAAAAAAAAAAAAAAAA"; Flags: 0x6 - TASK_CREATE_OR_UPDATE; Username; Password; logonType: 6 - TASK_LOGON_INTERACTIVE_TOKEN_OR_PASSWORD
Call rootFolder.RegisterTaskDefinition("AAAAAAAAAAAAAAAAAAAAAA", taskDefinition, 6, "PCNAMEorDOMAIN\KalininVE", "xxxxxxx", 6)
End Sub
Function XmlTime(t)
Dim cSecond, cMinute, CHour, cDay, cMonth, cYear As Variant
Dim tTime, tDate As Variant
cSecond = "0" & Second(t)
cMinute = "0" & Minute(t)
CHour = "0" & Hour(t)
cDay = "0" & Day(t)
cMonth = "0" & Month(t)
cYear = Year(t)
tTime = Right(CHour, 2) & ":" & Right(cMinute, 2) & _
":" & Right(cSecond, 2)
tDate = cYear & "-" & Right(cMonth, 2) & "-" & Right(cDay, 2)
XmlTime = tDate & "T" & tTime
End Function
Yes, for sure you can create a copy of Windows task using export to xml then changing xml file and after changing name and time - import back.
Sample export xml:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.1" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Author>PC_NAMEorDOMAIN\KalininVE</Author>
<Description>BPC Distribution</Description>
<URI>\AAAAAAAAAAAAAAAAAAAAAA</URI>
</RegistrationInfo>
<Triggers>
<TimeTrigger>
<StartBoundary>2017-05-25T01:14:25</StartBoundary>
<Enabled>true</Enabled>
</TimeTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>S-1-5-21-557574800-3509050690-3893166269-1000</UserId>
<LogonType>InteractiveTokenOrPassword</LogonType>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
<Settings>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<IdleSettings>
<Duration>PT10M</Duration>
<WaitTimeout>PT1H</WaitTimeout>
<StopOnIdleEnd>false</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
<Priority>5</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>C:\Program Files (x86)\SAP BusinessObjects\EPM Add-In\FPMXLClient.BooksPublication.exe</Command>
<Arguments>"C:\Users\KalininVE\Documents\PC_NW\KalininVE\Books\ENVIRON_NAME\MODEL_NAME\WebExcel\BatchFiles\D 10.0.60.33_8000 ENVIRON_NAME MODEL_NAME KalininVE"</Arguments>
</Exec>
</Actions>
</Task><br>
P.S. As you can see my VBA is doing the same...
1. Please explain you requirements step by step! Not clear why do you want to schedule the same thing twice...
2. Use dedicated PC somewhere on your corporate network always switched on with Excel and EPM installed. Use RDP to connect to this PC and launch distribution from this PC. "Schedule on app server directly?" - not possible!
3. Not possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
Thanks for the quick response. Clarification for #1 - I need to run the distribution multiple times per day at odd time intervals. It doesn't appear that I can schedule in such a way with the existing scheduler. If I could create multiple tasks it would work out fine. As it is now I can do neither so I'm forced to run manually for all but one of the daily distributions.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.