Professional Documents
Culture Documents
Fetching Data Directly From ECC System in BEX Query Using RRI PDF
Fetching Data Directly From ECC System in BEX Query Using RRI PDF
Applies to:
SAP BIW 3.5 and BI7.0. For more information, visit the Business Intelligence homepage.
Summary
This Document provides step by step solution How to fetch data from ECC System Directly in Bex Query
using RRI using real time example with all relevant details.
Author Bio
Vipul Goyal is working as SAP BI Consultant in Accenture Services Private Ltd and having Extensive
experience in implementation of BI projects specializing in HR/SCM areas.
Table of Contents
Purpose............................................................................................................................................................... 3
Features .............................................................................................................................................................. 3
Assumptions ....................................................................................................................................................... 3
The Step By Step Solution.................................................................................................................................. 4
Output Demo: ..................................................................................................................................................... 9
Related Content ................................................................................................................................................ 10
Disclaimer and Liability Notice .......................................................................................................................... 11
Purpose
This Content provides a robust functionality that enables the end user to execute any remote application
without actually logging into remote system. The Advanced applications that this content helps to achieve
are:
1. To display data from R/3 (or any SAP system) system at BW side based on the report value.
2. End user should be able to fetch the data from R/3 (or any SAP system) for display based on the ABAP
report (developed in BW) without actually logging in the R/3 system.
3. At query level, any large volume of data that physically cant be extracted and stored to BW side can be
fetched at runtime.
Features
RFC connection is set up between BW system and R/3 (or any SAP system) system through an ABAP
program written at BW-side in SE-38 and data is fetched at runtime during query execution.
Assumptions
Reader is aware of following things;
1. Basic understanding of RFC fundamentals.
2. ABAP experience and know how to make custom function modules.
3. RRI functionalityProcess Plan
The example explained here gives the insight into how to fetch data from R/3 system at runtime for any
characteristic result in Query Output. In brief, course summary, are fetched from R/3 system for Course Id
present in Query output through A RRI. The following steps explain the process:
Create an ABAP program YTEST_RFC (or any custom defined name) in se-38..
This code can be used to fetch data from R/3 system at runtime, for any characteristic value in
Query Output through RRI (or in start routine, in update rules for any object).
Create a RRI on query to jump to the Local ABAP program (YTEST_RFC).
In the program call a remote function module (ZFM_REMOTE_SYSTEM) by passing Course and
CourseType as parameters. (Check the below ABAP code to know how to call remote function
module).
The function module gives back Course Description and comments, Link and Url Details for that
Material.
4. Create an ABAP program YTEST_RFC (or any custom defined name) in se-38.This program can be
used to fetch data from R/3 system at runtime, for any characteristic value in Query Output through RRI
In the program call a remote function module (ZFM_REMOTE_SYSTEM) with fields that are being selected
above in STEP 2 as parameters. (Check the below ABAP code to know how to call remote function module).
CODE TO MAKE AN RFC CALL TO REMOTE FUNCTION MODULE( ZFM_REMOTE_SYSTEM )
*&---------------------------------------------------------------------*
*& Report YTEST_RFC
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT YTEST_RFC LINE-COUNT 65(8) LINE-SIZE 132.
TABLES:/BI0/PTRAINING.
*TO GET VALUES PASSED FROM REPORT INTO LOCAL PARAMETERS(LT_PARAM FOR COURSE AND
LT_CTYPE FOR COURSE TYPE)*
*Choose number of parameters depending upon number of field values sent from report(
Here it is two)*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: LT_PARAM TYPE /BI0/PTRAINING-TRAINING NO-DISPLAY,
LT_CTYPE TYPE /BI0/PTRAINING-TRAINOTYPE NO-DISPLAY .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
data:E_TXTLINE TYPE STRING,
E_LINK TYPE STRING,
Write name
of function
module to
be called.
Write name of
*Input values to the funtion
remote system
EXPORTING
here.
i_objid = LT_PARAM
i_otype = LT_CTYPE
6. Select the same import parameters as being passed from ABAP program above and make settings as
shown in screen shot below:
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_OBJID) TYPE HRP1002-OBJID
*" VALUE(I_OTYPE) TYPE HRP1002-OTYPE
*" EXPORTING
*" VALUE(E_LINK) TYPE STRING
*" TABLES
*" E_CCOMMENTS STRUCTURE HRT1002
*" E_URL_DETAILS STRUCTURE HRT1061
types: begin of l_itype,
l_course type hrp1002-objid,
l_tabnm type hrp1002-tabnr,
l_txtline type string,
end of l_itype.
clear l_tabnr.
select single linktxt tabnr
from hrp1061
into (E_LINK,l_tabnr)
where
PLVAR = '01' and
OTYPE = I_OTYPE and
OBJID = I_OBJID.
select * into table E_URL_DETAILS
from hrt1061
where tabnr = l_tabnr.
ENDFUNCTION.
Output Demo:
Below is report output from where get details about the ID selected directly from R/3 system by clicking on
the particular ID.
Following is window that will open while double clicking on the id seleted giving all the details for the id as
shown:
Related Content
1. Whenever remote function call is made, the remote system asks for user id or password before login to
the system. Now suppose the end user dont have the access or wants to avoid this Login, BW system
should be made trusted system with Remote system (Transaction-SM59). Please follow this link for more
details on it:
http://help.sap.com/saphelp_nw04/helpdata/en/22/042671488911d189490000e829fbbd/frameset.htm
2. The above code is basically developed for RRI, but the same can be used in VirtualProviders with
Function Modules. In the Function Module for the Remote Cube you can write this code. Please follow this
link for more details:
VirtualProviders with Function Modules
3. For more details on RRI and various Features of RRI please go the Below Link
Report-Report Interface
4. For more information, visit the Business Intelligence homepage.