Procedure to Trigger Events in Remote System Using an ABAP Program

Similar documents
Triggering the Process Chains at Particular Date using Events

Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports

Step by Step Method for File Archival in BW

Reporting Duplicate Entries

SAP BW Copy Existing DTP for Data Targets

Customized Transaction to Trigger Process Chain from Failed Step

Standalone BW System Refresh

Database Statistics During ODS Activation

DB Connect with Delta Mechanism

Process Chain Log Deletion

Dynamically Enable / Disable Fields in Table Maintenance Generator

Extracting Missing Fields of Data Source Which Are Present In Their Extract Structure

Easy Lookup in Process Integration 7.1

Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable

How to use Boolean Operations in the Formula as Subsidiary for IF Condition

Using Radio Buttons in Web Template

Table Row Popup in Web Dynpro Component

Custom Process types Remote Trigger and End Time

Applies To:...1. Summary...1. Table of Contents...1. Procedure..2. Code... Error! Bookmark not defined.0

Recreating BIA Indexes to Address the Growth of Fact Index Table

Step by Step Procedure for DSO Creation

ABAP Code - Recipients (Specific Format) SAP BW Process Chain

How to Broadcast BEx Workbooks using BW Pre-calculation Server and through Process Chains

Generate Export Data Source

Using Query Extract to Export Data from Business warehouse, With Pros and Cons Analyzed

How to Create View on Different Tables and Load Data through Generic Datasource based on that View

Step By Step: the Process of Selective Deletion from a DSO

Customizing Characteristic Relationships in BW-BPS with Function Modules

Material Master Extension for New Plant

SDN Community Contribution

Freely Programmed Help- Web Dynpro

Integration of Web Dynpro for ABAP Application in Microsoft Share Point Portal

Setting up Connection between BW and R/3 for Data Load

Errors while Sending Packages from OLTP to BI (One of Error at the Time of Data Loads through Process Chains)

How to Default Variant Created for Report Developed In Report Painter/Writer

Implementing Customer Exit Reporting Variables as Methods

Custom BADI Using Function Module UJQ_RUN_AXIS_QUERY

Cut Over Activities Specific for LIS* Data Sources

Using Customer Exit Variables in BW/BI Reports: Part - 14

Internationalization in WebDynpro ABAP Applications

Using Customer Exit Variables in BW/BI Reports Part - 1

How to Create and Schedule Publications from Crystal Reports

Routines in SAP BI 7.0 Transformations

POWL: Infoset Generation with Web Dynpro ABAP

Using Rule Group in SAP-BI. Part - 1

ecatt Part 6 System Data Container

Changing the Source System Assignments in SAP BW Objects without Affecting the Data Modeling

Linking Documents with Web Templates

MDM Syndicator: Custom Items Tab

Data Flow During Different Update Mode in LO Cockpit

Information Broadcasting Part 3 Scheduling the First Report

Material Master Archiving in Simple Method

Financial Statement Version into PDF Reader

Material Listing and Exclusion

Adding Custom Fields to Contract Account Screen

How to Create your Own Rule in Workflow?

A Step-by-Step Guide on IDoc-ALE between Two SAP Servers

Extractor for Multi Value Class Characteristic Values using Function Module

Graphical Mapping Technique in SAP NetWeaver Process Integration

Common Queries/Errors while working with Adobe Print PDF Forms

SMT (Service Mapping Tool)

Creation of Key Figures with Higher Decimal Place Precision

SDN Community Contribution

Performance Management in Data Loading: an Overview

Data Extraction & DS Enhancement in SAP BI Step by Step

SAP BI Analysis Authorization (Customer Exit Variables)

Limitation in BAPI Scheduling Agreement (SA) Create or Change

Creating, Configuring and Testing a Web Service Based on a Function Module

Extraction of Hierarchy into Flat File from R/3 and Loading in BW System

Using Customer Exit Variables in BW/BI Reports: Part - 4

About ITAB Duplicate_Key (SAP lrsaods) Runtime Error

Web Dynpro: Coloring Table Conditionally

RRI: Parameters Not Transferred to R/3 Transaction

Replacement Path: Explained with an Illustrated Example

Data Mining: Scoring (Linear Regression)

Step-By-Step guide to Virtual InfoCube Implementation

Universal Worklist - Delta Pull Configuration

Maintaining Roles and Authorizations in BI7.0 - RSECADMIN

Step by Step Guide How to Use BI Queries in Visual Composer

Step by Step Guide on How to Use Cell Definition in BEx Query

Using Nested Exception Aggregation in BEx Reports- Scenario

Exception Handling in Web Services exposed from an R/3 System

How to Create Top of List and End of List of the ALV Output in Web Dynpro for ABAP

Data Source Replication and Activation of Transfer Structures

Restricting F4 (Input Help) Values While Running a SAP BW Query

Add /Remove Links on ESS Home Page in Business Package 1.5

Step by Step Guide to Creating a Process Type to Close an Open Request in a Cube in BI 7.0

Easy Application Integration: How to use the Records Management Call Handler Framework

Reading Enhanced DataSource fields for the Remote Cube

How to Extend an Outbound IDoc

MDM Import Manager - Taxonomy Data (Attribute Text Values) Part 3

Displaying SAP Transaction as Internet Application in Portal

How to Display Result Row in One Line While Reporting On Multiproviderer

Performance Optimization of Long Running Queries Using OLAP Cache

SAP BI Global Report Variable user exit modularization

Role and Scope of ABAP in SAP BI

Open Text DocuLink Configuration - To Access Documents which are Archived using SAP

SAP BI BO Unit/Currency Logic for Unknown Units Case Study

Hierarchy in Business Objects with Expanded Hierarchy Logic

Table Properties and Table Popin

Transcription:

Procedure to Trigger Events in Remote System Using an ABAP Program Applies to: SAP BW 3.x, SAP BI 7.x, SAP ECC, APO Systems. Summary This document gives the procedure to trigger events in a Remote System using an ABAP Program. Author: Company: Venkata Nagarjuna Reddy Infosys Limited Created on: 20 October 2011 Author Bio Venkata Nagarjuna Reddy is a Technology Lead working in Infosys Limited, Nagarjuna Joined Infosys Limited in Sep 2008 and worked on various SAP BI Projects. 2011 SAP AG 1

Table of Contents Introduction... 3 Scenario... 3 Procedure... 3 Creating a Table... 3 RFC Enabled Function Module... 4 Creation of Main ABAP Program... 6 Testing through SE38... 8 Related Content... 9 Disclaimer and Liability Notice... 10 2011 SAP AG 2

Introduction As a part of BW Process it may be required to trigger events in Remote System (eg: BW. R/3, APO) to start a Job or a process chain. This can be achieved by an ABAP prgram which can be used to call the events in a Remote System. Scenario In this document an ABAP Program ZRFC_RAISE_REMOTE_EVENT is created which will call a remote event in R/3 from a BW system. Procedure Creating a Table 1. Go to T-Code SE11 and create a Transparent table ZRFCDETAILS with Delivery Class C with the below fields 2011 SAP AG 3

2. Maintain the RFC Destination details in the table ZRFCDETAILS RFC Enabled Function Module 1. Go to SE37 and create a FM Z_BP_EVENT_RAISE with the following import parameters. 2. Exceptions used in the Function Module. 3. Write the code as below to. FUNCTION Z_BP_EVENT_RAISE. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(EVENTID) TYPE TBTCO-EVENTID *" VALUE(EVENTPARM) TYPE MSXXLIST-NAME DEFAULT SPACE *" VALUE(TARGET_INSTANCE) LIKE MSXXLIST-NAME DEFAULT SPACE *" EXCEPTIONS *" BAD_EVENTID *" EVENTID_DOES_NOT_EXIST 2011 SAP AG 4

*" EVENTID_MISSING *" RAISE_FAILED *"---------------------------------------------------------------------- *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(EVENTID) TYPE TBTCO-EVENTID *" VALUE(EVENTPARM) TYPE MSXXLIST-NAME DEFAULT SPACE *" VALUE(TARGET_INSTANCE) LIKE MSXXLIST-NAME DEFAULT SPACE *" EXCEPTIONS *" BAD_EVENTID *" EVENTID_DOES_NOT_EXIST *" EVENTID_MISSING *" RAISE_FAILED *"---------------------------------------------------------------------- CALL FUNCTION 'BP_EVENT_RAISE' EXPORTING EVENTID EVENTPARM = eventid = EVENTPARM EXCEPTIONS BAD_EVENTID = 1 EVENTID_DOES_NOT_EXIST = 2 EVENTID_MISSING = 3 RAISE_FAILED = 4 OTHERS = 5. IF SY-SUBRC <> 0. case sy-subrc. when 1. raise bad_eventid. when 2. raise EVENTID_DOES_NOT_EXIST. when 3. raise EVENTID_MISSING. when 4. raise RAISE_FAILED. when 5. raise RAISE_FAILED. endcase. ENDIF. ENDFUNCTION. 2011 SAP AG 5

Creation of Main ABAP Program 1. Go to SE38 and create a Program ZRFC_RAISE_REMOTE_EVENT withe below attibutes. 2. Write below mentioned code. REPORT ZRFC_RAISE_REMOTE_EVENT. *----------------------------------------------------------------------* * Data Declarations: * *----------------------------------------------------------------------* tables: ZRFCDETAILS. data: l_remote_sys like ZRFCDETAILS-RFCDEST. selection-screen begin of block S1 with frame. select-options: s_syrole for ZRFCDETAILS-SYSROLE no-extension no intervals. parameters: s_evntid type BTCEVENTID, s_param type BTCEVTPARM. selection-screen end of block S1. *----------------------------------------------------------------------* * Begin of processing * *----------------------------------------------------------------------* at selection-screen. if sy-ucomm eq 'ONLI'. 2011 SAP AG 6

* Check that remote system can be found select from into single rfcdest ZRFCDETAILS l_remote_sys where sysid eq sy-sysid and zmandt eq sy-mandt and and sysrole eq s_syrole-low zprimary eq 'X'. if sy-subrc ne 0. message e016(xss_ser) with s_syrole-low. else. * Call RFC enabled FM CALL FUNCTION 'Z_BP_EVENT_RAISE' destination l_rem_system EXPORTING EVENTID EVENTPARM = s_evntid = s_param * TARGET_INSTANCE = ' ' EXCEPTIONS BAD_EVENTID = 1 EVENTID_DOES_NOT_EXIST = 2 EVENTID_MISSING = 3 RAISE_FAILED = 4 OTHERS = 5. CASE SY-SUBRC. WHEN '0'. message s066(1m) with s_evntid. WHEN '1' OR OR '2' '3'. message e530(sls) with s_evntid. WHEN '4' OR '5'. message e067(1m) with s_evntid. ENDCASE. endif. endif. 3. Maintain the Slection Texts for the Report as below. 2011 SAP AG 7

Testing through SE38 Go to SE38 and execute the Program ZRFC_RAISE_REMOTE_EVENT with the below selctions. This will trigger the event RE_OK in the Remote R/3 System RCQCLNT310 2011 SAP AG 8

Related Content EDW homepage SAP Help Documentation How to trigger the Process Chains in BW from ECC 2011 SAP AG 9

Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document. 2011 SAP AG 10