Skip to Content

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.

62 Comments
You must be Logged on to comment or reply to a post.