Hi Guys, recently I came across a requirement which I am not able to handle via standard way of broadcasting options present in SAP BW and developed a custom solution . Since the ask is very genuine so hereby sharing the development If this brings any value to all of you guys .
Requirement : User wants to do the broadcasting which is scheduled monthly but only when the for given selections reports contains any data . If the for the fiscal year period(one of Report selection), report do not have any data, broadcasting mails must not get triggered . Also they want the report attachment in the form of Excel so that they can simple download the attachment from the report and do there analysis.
SAP Broadcasting Ways : SAP has given the options like 'Broadcasting Via Mail' wherein we can send the mail thorough a customized body in the form of attachment(spreadsheet, Zipped Attachment, PDF, HTML) etc. But the this not fit to my case since in this system will send the scheduled broadcast email even if report do not contains any data i.e. a blank email (Mail without any report data) .
Also another way of thinking of the solution is to use SAP Broadcast option 'Broadcasting Via Exception' . For this option to use , you must have exceptions set in your Bex Report .Also using option we can send any attachment instead SAP do a summary/detail of the exceptions caught in the report & send it in the mail body itself. So this solution will also not suffice for stated requirement.
Solution proposed : To tackle the problem statement following approach & development is requirement .
Note the I_T_PARAMETER has to be filled as displayed below for every prompts which you want to be passed as selection(in the example query has a mandate prompt of 0FISCPER so we have passed the same using the variable created over 0FISCPER.
BADI Implementation
Custom method' ZGET_REPORT_RECORDS_COUNT' created in BADI Class via editing the class in SE24.
Import & Export parameters of above Highlighted method
Code put in the method as display below
Overriding the method 'GET' to have above method displayed under a different section in formula screen of the decision step
When we use the decision step we can find the new section 'C_BW_CUSTOM' in the formula builder screen & within we find out method to be used as below
Thanks everyone for having patience reading the document . Feel free to suggest any value add .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |