Skip to Content
Author's profile photo Ganesh Bothe

Populate Yesterday’s Date in BEx Broadcaster – Mail body or Subject

Requirement:Communicate to the user about Report is generated on 02.12.2013 i.e. yesterday

In Mail User want to send

Hi

Kindly find attached herewith Sales report as on 02.12.2013.

Regards,Ganesh Bothe

When you are creating broadcast setting you can find only following text variable.

/wp-content/uploads/2013/12/bd01_335440.jpg

Using above text variable it is not possible to calculate yesterday’s date and we do not want to send mail like

Hi,Kindly find attached herewith Sales report as on Yesterday.

Regards,Ganesh Bothe.

One thing that where this text variable are stored that also I think not possible to find out.

For same requirement I have published blog on 26.11.2013.In my broadcast setting I am sending report in MHTML format and it will come in Mail body as per requirement using customer exit variable πŸ™‚ .

One of SCN member followed using my blog but he is sending report title in subject line and he faced problem regarding dynamic date. After his comment on my blog I analyze the issue and then come to know For my case it is executing BI report means it will execute customer exit code also but in the case of SCn member it just showing name of report means ‘Daily Sales report &xyz&” πŸ™ That means not fulfill the requirement.

So yesterday I have deleted my blog and tried for correct workaround. I searched on Scn, so many people having the same requirement there is no proper solution present. I tried following things and it works hope it will help you who were having similar requirement.

Here are the Steps to achieve this

  1. There is the standard table where our body and subject are stored

/wp-content/uploads/2013/12/bd1_335498.jpg

Table name: RSRD_SETT_NODE_T

Provide technical name of setting to this table

/wp-content/uploads/2013/12/bd2_335499.jpg

2.In your BI system we need to create one ABAP program

Tcode SE38 create program ZBROADCAST_SETTING

Copy following code

REPORT ZBROADCAST_SETTING.
data : zdate_temp type sydatum,

       zdate type char10.
data: wa_RSRD_SETT_NODE_T type RSRD_SETT_NODE_T.

zdate_temp = sydatum 1.

write zdate_temp to zdate DD/MM/YYYY .

wa_RSRD_SETT_NODE_TSETTING_ID = ‘ZDAILY_SALES’.

wa_RSRD_SETT_NODE_TId =‘DI_BODY’.

wa_RSRD_SETT_NODE_TId =‘DI_SUBJECT’.
*wa_RSRD_SETT_NODE_T-OBJVERS = ‘A’.
*wa_RSRD_SETT_NODE_T-LANGU = ‘E’.

concatenate ‘Hi,Kindly find attached herewith Daily sales Report as on’

            zdate

            ‘Regards,Ganesh Bothe’ into wa_RSRD_SETT_NODE_TVALUE  SEPARATED BY space.
update RSRD_SETT_NODE_T set VALUE = wa_RSRD_SETT_NODE_TVALUE

                        where SETTING_ID = ‘ZDAILY_SALES’

                         and  Id = ‘DI_BODY’.
Concatenate ‘Daily sales Report As on’

             Zdate into wa_RSRD_SETT_NODE_TVALUE  SEPARATED BY space.

update RSRD_SETT_NODE_T set VALUE = wa_RSRD_SETT_NODE_TVALUE

                        where SETTING_ID = ‘ZDAILY_SALES’

   and  Id = ‘DI_SUBJECT’.

Then you can schedule this program and your broadcast setting with
following two methods.

  1. Schedule this program before your broadcast setting and then your broad cast setting
  2. Create process chain add two abap program steps one is for above program and second is for your
    broadcast setting(RSRD_BROADCAST_STARTER)create variant for this program with tech name of your broadcast setting.

Sometimes Second option will not work for some user means they will not got any mail after successful execution of process chain also. If that is the case please check SOST tcode.

Select your document and click on send request->start send process for selection. It will send the mail.

Newly created program will modify the body and subject for particular setting as per our requirement.

/wp-content/uploads/2013/12/bd3_335502.jpg

After this when you are broadcast setting will executed you will receive mail like following screen.

/wp-content/uploads/2013/12/bd4_335503.jpg

In this way you can achieve yesterday’s date or similar kind of requirement.

Hopes it will help.

Assigned Tags

      63 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo CH Raman
      CH Raman

      Good presentation and useful blog  Ganesh. Thanks for sharing.

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks for your feedback πŸ™‚ .

      Author's profile photo Krishna Chaitanya
      Krishna Chaitanya

      At last got it back right ? 

      Really very useful blog and good one too. 

      Thanks for sharing.

      Regards,

      Krishna Chaitanya.

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Hi krishna,

      Really atlast....because I tried a lot to find out where this text variables are stored but anyway I find table where we can modify to achieve this specific requirement..most users want this type of dyanamic values..so this will help for such requirement.

      Author's profile photo Former Member
      Former Member

      Hi Ganesh,

      very good presentation and useful information...

      Regards,

      J.Sakthikumar

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks sakthi πŸ™‚ .

      Author's profile photo Former Member
      Former Member

      It will help many , Good one.... πŸ™‚

      Regards

      Shabnam

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks shabnam πŸ™‚

      Author's profile photo Former Member
      Former Member

      Thank you so much for drafted this blog again.

      I have faced this issue before for that date format. Now, will apply your logic and try to resolve this issue. Highly appreciated your efforts.

      Best Regards

      Venkat...

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks Vekat...try this if any queries please let me know πŸ™‚ .

      Regards,

      Ganesh Bothe

      Author's profile photo Former Member
      Former Member

      Good.

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks Giri πŸ™‚ .

      Author's profile photo Former Member
      Former Member

      Good and useful doc. πŸ™‚

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks πŸ™‚ .

      Author's profile photo Former Member
      Former Member

      Nice Document πŸ™‚

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks Reddy πŸ™‚ .

      Author's profile photo Former Member
      Former Member

      Good informative document.

      Regards,

      Utpal

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks for your nice comment πŸ™‚ .

      Author's profile photo Former Member
      Former Member

      Hi Ganesh

      our users don't want to receive broadcasting email when report out is empty. Ie when no applicable data for that user

      how to stop them in broadcasting batch rsrd-broadcast-batch program

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Hi Sri,,

      I think report should go with no applicable data then only user will understand for that day value is zero.

      Anyway If you want to achieve this ...currently I am not having the solution but I would suggest you can do it some research..

      1)If you are using query in broadcast setting first need to find out FM which will give you query result.

      Check this FM RRW3_GET_QUERY_VIEW_DATA.using this you will check wheather your report is having data or not If yes then trigger broadcast setting else do not trigger.

      In this way you can achieve your requirement.

      Hope it will help you.

      Regards,

      Ganesh Bothe

      Author's profile photo Former Member
      Former Member

      Hi we have written program using Function Module  RS_VC_GET_QUERY_VIEW_DATA_FLAT to execute a query. And calling fm broacst starter but here we are not able to pass userid and user variant. Any help is appreciated

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Hi sri,

      Can you check on google there is one PDF present which will tell you how execute query using Fm search with "abap code – to fetch sap bi query data" Try this it will return query data if data not present then do not execute broadcast setting.Please check and let me know.

      Regards,

      Ganesh Bothe

      Author's profile photo Manna Das
      Manna Das

      Super document, thanks a ton for sharing this wonderful stuff πŸ™‚

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Hi Das,

      Thanks for your wonderful comments πŸ™‚ .

      Author's profile photo Anshu Lilhori
      Anshu Lilhori

      I appreciate the research you did and came up with a 100% workable solution in this blog.

      This shows the dedication of yours towards the subject.

      Great job indeed.

      Regards,

      AL

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Hi Anshu,

      Your comments will really boost for me...thanks a lot for feedback πŸ™‚ .

      Regards,

      Ganesh Bothe

      Author's profile photo Former Member
      Former Member

      Good work πŸ™‚

      Regards,

      Ganesh

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks ganesh can you please  rate this?

      Regards,

      Ganesh Bothe

      Author's profile photo Former Member
      Former Member

      My pleasure.

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Hi Ganesh,

      Thanks for wonderful rating πŸ™‚ ..I am happy,you liked this blog πŸ™‚ πŸ™‚ .

      Author's profile photo Suresh Ramajeyam
      Suresh Ramajeyam

      Useful Information Ganesh, Keep up.

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Hi Suresh,

      Thanks for your feedback πŸ™‚ .

      Author's profile photo Wasem Hassan
      Wasem Hassan

      its very good doc Ganesh,,keept it up.. πŸ™‚ πŸ™‚

      Regards

      Wasem

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Hi Waseem,

      Thanks for your feedback πŸ™‚ .

      Regards,

      Ganesh Bothe

      Author's profile photo Prashanth konduru
      Prashanth konduru

      Gr8 Document with useful information ... Thanks for your effort ...

      Bookmarked n rated ...

      KP

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Hi KP,

      Thanks for rating and nice feedback πŸ™‚ .

      Author's profile photo Former Member
      Former Member

      Nice one Ganesh, your efforts are appreciated !

      Thanks for sharing !

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Hi Limbadri,

      Thanks for your appreciation πŸ™‚ .

      Author's profile photo Phani KV
      Phani KV

      Nice document Ganesh.

      Thanks,

      Phani.

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks pani for your feedback πŸ™‚ .

      Author's profile photo Sakthi S
      Sakthi S

      Good blog Ganesh.Thanks for sharing.

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks sakthi πŸ™‚ .

      Author's profile photo Former Member
      Former Member

      Hi Ganesh,

      Nice doc thanks for sharing it to enhance our knowledge. πŸ™‚

      Regards,

      Lalit

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks lalit for your feedback πŸ™‚ .

      Author's profile photo Former Member
      Former Member

      Hi Ganesh,

      Nice doc thanks for sharing. πŸ™‚

      Regards,

      Adhik

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks a lot for your feedback

      Author's profile photo Nitesh Kumar
      Nitesh Kumar

      Hi Ganesh,

      It's so useful blog. I guess, many of us might be asked such requirement and it's a complete solution.

      Great job. Keep it up πŸ™‚ .

      Regards,

      Nitesh

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Hi Nitesh,

      Thanks for your wonderful rating and feedback πŸ™‚ .

      Regards,

      Ganesh Bothe

      Author's profile photo Former Member
      Former Member

      Hi Ganesh,

      Very useful blog, was searching for table with broadcast email subject and finally found it in your blog.

      Thanks,

      Rk

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks ramakrishana..I am happy that it helps you!!!!

      Author's profile photo Harish Allachervu
      Harish Allachervu

      Exceptional ganesh... πŸ™‚

      Regards,

      Harish

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks for your wonderful comment!!!

      Author's profile photo Former Member
      Former Member

      Wonderful document Ganesh..Keep it up πŸ™‚ .

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks!

      Author's profile photo Sankameshwar Ramakrishnan
      Sankameshwar Ramakrishnan

      Very good document. Please keep posting such minute things when you come across. Helpful !!!

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks for your feedback...it will boost for me πŸ™‚ .

      Author's profile photo Former Member
      Former Member

      Very useful document. Keep it up...

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks Ashish for feedback..if possible rate this doc πŸ™‚ .

      Author's profile photo Francisco RodrΓ­guez
      Francisco RodrΓ­guez

      Great!, very good effort Ganesh. Thanks for share.

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks for wonderful comment πŸ™‚ .

      Author's profile photo Former Member
      Former Member

      Useful Info Ganesh..

      Author's profile photo Ganesh Bothe
      Ganesh Bothe
      Blog Post Author

      Thanks Jitendra πŸ™‚ .

      Author's profile photo Martin Kurz
      Martin Kurz

      Useful Information, thank you vermuch.

      Regards

      Martin