cancel
Showing results for 
Search instead for 
Did you mean: 

DP User Exit Macro

Former Member
0 Kudos

Hi,

We are using User Exit Macro to carry out complex calculation in DP planning book. My observation is that, the Macro do not store the calculated values in Planning book. Based on events, User exit macro gets executed and the Value are displayed in the planning book.

Is there a way where in I can execute the User Exit Macro once (background job) and store the value in Planning Book. This will save the execution of Macro each time when book is loaded, and loading will be much faster. Also, being a complex calculation I need to use User Exit calculation.

Any ideas........on how to store the calculated values in Planning books.

Thanks & Regards,

SP

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Dear,

Check your planning book the result key figure is available or not at the same time check related data view also.

pls revert me any queries...

Regards,

Pullaiah

Former Member
0 Kudos

You can definitely have a macro which is not assigned to any event and can be run by a background job.

To do so, you have to define activities and job.

goto SAP Menu -> APO -> Demand Planning -> Planning -> Demand Planning in the Background

First Define a activity where in yiou fill in the dataview , macro etc.

Use this activity in a job and then schedule it whenever required.

Please let me know if this helps or if you need any more information

Former Member
0 Kudos

Hi,

Thanks for reply.

Basically I am looking for "Saving the Calculated Values in planning book through User Exit Macro".

I am using a User Exit Macro to carry out complex calculation. Each time it calculate "on fly" i.e. based on event (Start event). To avoid calculation and time taken for loading book, I want to save the result of an User Exit Macro in Planning Book Key Figure.

Thanks & Regards,

SP

Former Member
0 Kudos

Yes , so in that case , you should remove the macro from all the events (Start event in your case)

And simply execute the macro with a background job once in a month or whenever its required.

Former Member
0 Kudos

is your question not answered?

Let me know if you are still facing issues

Former Member
0 Kudos

Hi Anu,

My observation is that, the User Exit Macro do not store the calculated values in Planning book. I am using a User Exit Macro in DOP book, but unable to save the Calculated values in book.

any idea on how to save the same.

Regards,

SP

Former Member
0 Kudos

Yes you are right , even i faced issues that just by changing the values in the internal tables of the user exit, it wasnt getting saved in the planning book. It was getting displayed correctly in the planning book but was not getting saved.

You can have 2 options:

1) Either ask your user to manually hit the Save button.

OR

2) Use BAPI_PBSRVAPS_CHANGEKEYFIGVAL along with BAPI_COMMIT in the user exit.

Hope this helps!