cancel
Showing results for 
Search instead for 
Did you mean: 

Update of Planning Start Date does not update macros

Former Member
0 Kudos

I have written a program to update the planning start date in a planning book using function /SAPAPO/MSDP_PB_SAVE_DVIEW_TAB. I have included this in a process chain. The update is immediately followed by a /SAPAPO/TS_BATCH_RUN variant that runs a macro in the updated book. The macro uses planning start date. The issue is that the macro does not appear to have been updated with the new planning start date. I experimented with using transaction Define Planning Book (/SAPAPO/SDP8B) whilst also in Macro Workbench on another session. If I change the planning start date this is also not reflected in the macro unless I come out of the Macro Workbench completely and fo back in. This appears to be a buffereing issue.

Does anyone know if there is a way to force the macros to be updated? Otherwise I may have to resort to just putting a delay in the chain and hoping the maco will be updated before it is run.

Thanks

Edited by: Peter Phillips on Mar 19, 2010 11:32 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Mani,

The program does not seem to kick off any additional background processes so I can only assume that the macro is being read from some sort of buffer. What I need to do is either refresh the buffer or force the macro to not be read from the buffer.

Former Member
0 Kudos

Peter,

Just curious, why do you want to set the planning start date using a program? Doesnt it roll over automatically with the fiscal variants? What is the business requirement for such a program?

Regards,

Mani

Former Member
0 Kudos

Hello Mani,

We have planning books used to calculate demand for newspapers at weekends. At weekends the papers contain printed colour magazines. These have to be ordered in advance. The macros that we run use planning start date to claculate the quntity of magazines required for the next weekend. The business also needs to do advanced calculation for the next two weekends. This requires an update to the planning start date to change the basis for the macros. We do not wish to write separate macros for each weekend as there are quite a few of them. We are trying to keep it as simple as possible.

Regards

Peter

Former Member
0 Kudos

Hello Peter,

Once you run your job to update the planning start date, pls look for any background jobs that it might trigger to make the other changes like the changes to the macro workbook.

You will have to wait till those background jobs complete until you can run your macros. Basically, the macros have to compile after the changes and hence it takes a little while. A delay should certainly help, however making it dependent on that background job that changes the macro will be a fool proof option i suppose.

Thanks

Mani