create bex broadcast settings dynamically via abap program step by step document

Upload: ricky-das

Post on 16-Oct-2015

96 views

Category:

Documents


5 download

DESCRIPTION

Create Bex Broadcast Settings Dynamically via ABAP Program Step by Step Document

TRANSCRIPT

Create Bex Broadcast settings dynamically Via ABAP Program step by step documentcreated byKhaja Kamaluddinon Apr 15, 2014 11:36 AM, last modified byKhaja Kamaluddinon Apr 17, 2014 7:56 PMVersion 2inShareApplies to:SAP BWSummaryTo create BEx broadcast settings via ABAP program dynamically instead of via portal.Author(s): Khaja Kamaluddin, Divya John, Vinay Singh.Company: Larsen and Toubro InfoTech.Created on: 07 April 2014Author Bio Khaja Kamaluddin has 6.4 years of experience in SAP BW and ABAP, started his career as an ABAP programmer over a period shifted to SAP BW/ BI, he worked in support, implementation, upgrade and enhancement projects.Vinay Singh has 3 Year of experience as a BI ABAP consultant.Divya John has 3 years experience as an ABAP Programmer.Need For Creating BEx Broadcast settings DynamicallyThe Requirement is for pushing mails with BEx workbooks to subscribing users at a given frequency. For every user , in order to broadcast mail , settings need to be created manually in Portal . For a large number of users/subscribers it would be difficult to maintain settings manually. Hence the need for creating settings dynamically using ABAP Program.Initially required Users and their relevant details like email id , workbook id , report name etc are maintained in Z-Table. Settings and mail body are then created for each User and these settings are broadcast using Pre-Calculation server. Also if any settings have not been broadcast, then these settings are reprocessed and pushed.In this document creation of BEx Broadcast settings using ABAP program is explained.Assumptions:Users for whom BEx broadcast settings are to be created are maintained in a Ztable with details like their email id , workbook id , report name etc.Creating broadcast settings for the Budget Owner numbers. Now that data required for broadcasting to a budget owner is stored inZCONTROL,create settings required for broadcasting using Pre-calculation server. Manually the settings can be created via. Portal as shown below.

Enter the email address , authorization user in recipients tab.

Choose the method of distribution of document.

Provide email address, subject and body of mail.

Schedule the broadcast as per required frequency.

In above window assign variable and Pre calculation server and execute.

On successful execution, above log is displayed and the workbook is broadcast to the recipient.

The new settings created in this process is outlined in red.The entire process is being done now with the ABAP program given below .Advantages with the ABAP program:- Multiple Broadcast settings can be created in one time exactions , so Workbook broadcasting can be performed for the Multiple Workbook and multiple Users at one time execution of ABAP program that we will see in below Doc . Attachment in the Broadcasted mail can be changed by using ABAP classes and Methods such as Name and the type of the attachment can be changed as per the requirement. Reprocessing of the Failed Broadcast settings can be executed again , because most of times the cause of failure of Broadcast settings is the time out, reprocessing ABAP program will be added in next document . Troubleshooting or the Debugging is easy with the ABAP program in the scenario of any error occurs while the execution of the Workbook broadcasting .ABAP program flow is given below :- Execute programZBEX_BROAD . This program creates settings and maintains them in standard tablesRSRD_SETTINGRSRD_SETTINGTRSRD_SETT_NODERSRD_SETT_NODE_ARSRD_SETT_NODE_TAnd also maintains all the created settings for budget owners in Z-TableZBROADSETHere we also compose email body to which workbook will be attached and sentThe working of the program is as follows:1. 1. The setting ids are created by concatenatingusername , current dateandcurrent timeseparated by underscore.2. 2. Populate inRSRD_SETTING, RSRD_SETTINGT, RSRD_SETT_NODE, RSRD_SETT_NODE_A, RSRD_SETT_NODE_Ttable the setting id and all other required fields.3. 3. For mail content in html a classZCL_RSRD_DISTRIBUTOR_MAILis created and passed toRSRD_SETT_NODEtable. This class is a copy ofCL_RSRD_DISTRIBUTOR_MAILandthemethodSET_BODYis changed for our requirement.