cancel
Showing results for 
Search instead for 
Did you mean: 

DP Macro to trigger events without using abap code

Former Member
0 Kudos

Hello Champs,

I have recenty encountered a situation wherein I had this requirement of triggering an event from a DP macro. I know we can do this using abap. But is it possibe to trigger an event without using abap code?

I mean is there any macro element whcih can accept input as the event name and can be used to trigger events ?

Please let me know.

Cheers!

Jacky.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

There are ways to automatic trigger a macro in the planning book; or you can trigger it using a background job;

Macros can be trigger at the start (when you open the book), directly executed (directly executed inside the palnning book), level change (during changes in the planning book and saving), default (when make changes at Planning book) and exit (when exit the planning book).

And for the background job create an activity using /SAPAPO/MC8T

thanks

Former Member
0 Kudos

Hello,

I am not sure if you understood my question properly. I wanted a way to trigger the event from the standard macros. Without using any abap code.

I know how can we trigger the macros in background jobs and how to create activities. But my question is really related to trigering events from Interactive planning book without using abap code. Hope this makes sense.

Does anybody have any answer/suggestions for the same?

Cheers!

Jacky.

former_member187488
Active Contributor
0 Kudos

Hi,

I don't think you can acheive this without any ABAP coding...

Macros are used to manipulate data in the planning book, instead of doing anything as ABAP can do.

Maybe you can use an user-exit/BADI macro, and put your own coding in the user-exit/BADI ...

Best Regards,

Ada

former_member209769
Active Contributor
0 Kudos

Hi Jacky,

As Ada mentioned, macros would be used only to manipulate data (calculations). Other use is to manipulate display of data in planning view.

BADI macro is only other possibility to do things which require ABAP coding (anything non-standard).

But what kind of events do you want to trigger? Are you facing challenge in having your required activities in sequence using SM37 jobs or DP background jobs or process chains?

If you give some example of what you are trying to achieve, we could give it some more thought.

Thanks - Pawan

Former Member
0 Kudos

Thanks Ada / Pawan for your replies.

My requirement is to trigger a particular event, which in turns the triggers process chain to release the forecast to our SNP systems. (Please note we are not using SAP SNP), we are using some other tool for SNP. So, we are extracting the data from the planning area into a cube and from that cube, the data gets sent to the 3rd party snp tool.

Now, my requirement is to provide a button the planning book screen (this can be done using macro), and in some way that macro needs to trigger the process chains.

Based my previous experience i know that i can be done using function modules in standard macros and / or creating userexit / badi macros.

I was more curious to know if we have some standard element which can trigger the event. So, that we can achieve this without abap code. Based on replies i got i think it is not possible. So i got my answers and i would just wait for your reply and would close this thread.

Cheers!

Jacky.

former_member209769
Active Contributor
0 Kudos

Hi Jacky,

I could find a function REPORT_SUBMIT( <REPORT NAME>) that can be used in macro to submit a report.

But even with this option, you would need a custom report that could take some actions on which you could have the dependency of the process chain.

So, I don't think this is a good direct fit for your requirement.

This is the only extra help I can provide from my side.

Thanks - Pawan

Former Member
0 Kudos

Hello Pawan,

I already explored that option. Thanks for your help anyways.

Cheers!

Jacky.

rico_frenzel
Advisor
Advisor
0 Kudos

Hello Jacky,

you can raise events using function BP_EVENT_RAISE.

The only thing you need to do is to create a macro userfunction that calls this ABAP Function module. Details on hwo to create a macro function can be found in note 631499

Best regards

Rico Frenzel

Former Member
0 Kudos

Hi Jacky,

There are no standard function for Macro to trigger event that i know. You may check out all macro functions in below link.

http://help.sap.com/saphelp_scm2007/helpdata/en/8f/9d6937089c2556e10000009b38f889/frameset.htm

Regards,

Harshil Desai