cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to include a Function Module in a Process Chain

Loed
Active Contributor
0 Likes
1,976

Hi guyz,

I'm planning to use the function module RSRD_BROADCAST_BATCH in a process chain..How will I do it?

I red a note regarding this but did not understand it..Here it is.....

Scheduling the Broadcasts Automatically:

The scheduling of broadcasts can be automated with the help of a program and through process chains. Create a process chain and include the ABAP program “RSRD_BROADCAST_BATCH”. This program can be used to schedule the broadcasts in the background without any user intervention.

Create a variant for this program and give the technical name of the Broadcast setting for the selection variable “S_SETTNG (Broadcast Setting)”.

Now schedule the process chain at the particular time (may be periodic) at which you want the broadcast to be sent.

Can anyone tell me the way on how to include a function module in a process chain?

Thank a lot!

Loed

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Loed,

Guess, your requirement is to schedule Broadcasting automatically. You need to use ABAP Program - RSRD_BROADCAST_STARTER with a Variant as mentioned by Michael. As others mentioned, you can not use a Function Module directly in a Process Chain.

I have posted one document on creating Broadcasting settings and automate it through Process Chain. Hopefully, that will be helpful to you.

http://scn.sap.com/docs/DOC-47346

Regards,

Prasad

Answers (6)

Answers (6)

Loed
Active Contributor
0 Likes

Thanks guyz for the comments..

I will be trying your suggestions and comment regarding the outcome..

Thanks a lot! 😃

Loed

Former Member
0 Likes

Hi Despuig,

Did you create it. You may check below pic. Reply for further clarifications.

Loed
Active Contributor
0 Likes

Hi Kumar,

Already created a variant for the program RSRD_BROADCAST_.BATCH..Just don't know if it will work in process chain..:D

But the email notification already worked when I used it alone (not in process chain)..

Just want to ask how will I add a "changing" variable?

What I mean is, everytime the query will run, the variables must be supplied already with the correct values..

For instance I have a variable for 0CALDAY..

The values of it must be from first day up to the current day of the month..

Hence, everytime the query runs, the values yesterday must be October 1, 2013 - October 28, 2013..Then the values now must be October 1, 2013 - October 29, 2013, and so on..

Thank you!

Loed

Former Member
0 Likes

Hi Despuig,

We can perform this CALDAY restriction at query level if needed using variable range. Is that fine?

Loed
Active Contributor
0 Likes

No mate..

What I mean is, I will be using RSRD_BROADCAST_.BATCH to send the generated report on the specified users..The program RSRD_BROADCAST_.BATCH will be sending to the users the generated report already..

For instance, I have a QUERY which needs to be generated everyday..Instead of generating the report manually by the users, I will be using the program RSRD_BROADCAST_.BATCH to automate it..

Hence, the program must know what should be the CALDAY that will be inputted in the variable of CALDAY..Therefore, tomorrow the input should be October 1, 2013 - October 30, 2013..Is this possible?

Did I explain it well mate?

Former Member
0 Likes

This message was moderated.

BenedictV
Active Contributor
0 Likes

It is possible. Please search the forums about using TVARVC table. I will just give you a gist. You can save input variants. For date input variable, use option to derive date 'from TVARVC', and you use a program to update the TVARVC table for the variable, populating current date to the variable stored in the table.

Regards,

Benedict

Former Member
0 Likes

Hi Loed,

Your explanation is good and even expectation also.

In broadcasting filters, we have filtering option based on values and ranges only.

So the better way is have the 0CALDAY filter at query level using variables from first day to current day and broadcast it. You are restricting data of the report as per your requirement here.

MGrob
Active Contributor
0 Likes

Hi

You need to create a user exit variable that is not inputready and is filled based on system date. This way your report automatically holds the correct selection and the broadcast just need to send it..

We created for this specific burst queries that work in this way..

hope that clarifies

Martin

Loed
Active Contributor
0 Likes

Hi Kumar,

Is your idea similar with Martin? If yes, I can't implement it since I need the Manual Input Variable of 0CALDAY as my divisor for the number of days elapsed in the current month..

I will try to ask my client if she needs to generate the previous months coz if not, I will just implement the idea of yours and Martin's..;-)

I will be posting later for the update..Thanks guyz!

MGrob
Active Contributor
0 Likes

Hi

You can also calculate the number of days passed for your divisor with an user exit. In the end you have a fully sy-date based report for bursting but you still might need a second report that allows endusers to do adhoc reportings which allows to choose 0calday.

hope it helps

Martin

Loed
Active Contributor
0 Likes

Hi Martin,

Thought of same way too..Thanks for your first suggestion..

I will just consult the client regarding this idea..

Thanks a lot to you and Kumar! 😃

Loed

Loed
Active Contributor
0 Likes

Hi Benedict,

I will research about this TVARVC table..By the way, do you have a document or a sample on how to implement this?

Thank you!

Loed

MGrob
Active Contributor
0 Likes

Hi

You don't use the FM module you simply use the abap programm RSRD_BROADCAST_BATCH instead.

hope that clarifies

Martin

Former Member
0 Likes

This message was moderated.

RamanKorrapati
Active Contributor
0 Likes

Hi Loed,

We can't add function modules directly at process  chains and even FM are not direct executable.

We can create abap program and call required functional module. Later we can this abap program at abap process step.

Thanks

BenedictV
Active Contributor
0 Likes

Hi Loed,

I hope you are familar with the steps regarding program variants and broadcasts.

To include the program in the process chain, you simply have to use the 'ABAP Program' process type that you find under the General Services.

Enter the program name RSRD_BROADCAST_BATCH and the variant you saved for your broadcast setting.

Now you can schedule the process chain as usual.

Regards,

Benedict

michael_devine1
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

How to use RSRD_BROADCAST_BATCH in process chain is explained in this Note:

1729678 - Broadcasting with program RSRD_BROADCAST_STARTER
fails in process chain

Regards,

Michael