Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member183012
Active Contributor

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.

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 :smile: .

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&” :sad: 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

Table name: RSRD_SETT_NODE_T

Provide technical name of setting to this table

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 sy-datum,

       zdate
type char10.

data: wa_RSRD_SETT_NODE_T type RSRD_SETT_NODE_T.

zdate_temp
= sy-datum - 1.



write zdate_temp to zdate DD/MM/YYYY .



wa_RSRD_SETT_NODE_T
-SETTING_ID = 'ZDAILY_SALES'.

wa_RSRD_SETT_NODE_T
-Id ='DI_BODY'.

wa_RSRD_SETT_NODE_T
-Id ='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_T-VALUE  SEPARATED BY space.

update RSRD_SETT_NODE_T set VALUE = wa_RSRD_SETT_NODE_T-VALUE

                       
where SETTING_ID = 'ZDAILY_SALES'

                        
and  Id = 'DI_BODY'.

Concatenate 'Daily sales Report As on'

             Zdate
into wa_RSRD_SETT_NODE_T-VALUE  SEPARATED BY space.

update RSRD_SETT_NODE_T set VALUE = wa_RSRD_SETT_NODE_T-VALUE

                       
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.

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

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

Hopes it will help.




63 Comments
Labels in this area