Click here to load reader

SAP BI (INFOSET)

  • View
    231

  • Download
    15

Embed Size (px)

DESCRIPTION

detailed document on infoset

Text of SAP BI (INFOSET)

Copying Queries Between InfoSets

Applies to:SAP BW 3.5, SAP BI 7.0 etc. For more information, visit the EDW homepage.

SummaryThis paper gives a detailed understanding and how to copy queries between Infosets. The document guides to understand the issue with existing functionality of RSZC transaction code to copy Infoset queries and explain to overcome the issue with new custom defined transaction code to copy queries between infosets. Author: Lenin Kumar Vutla

Company: Deloitte Consulting Created on: 16 March 2011

Author BioLenin Kumar Vutla is currently working in Deloitte Consulting India Pvt. Ltd. He is working on SAP BW/BI from last 8 years.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 1

Copying Queries Between InfoSets

Table of ContentsIntroduction ......................................................................................................................................................... 3 Scenario .............................................................................................................................................................. 3 Step 1: Creating Custom Program .................................................................................................................. 3 Step 2: Settings for Text Elements ................................................................................................................. 5 Step 3: Creating ZRSZC Custom Transaction Code ...................................................................................... 6 Step 4: Results ................................................................................................................................................ 7 Source Query (0CLM_IS02_Q001): ................................................................................................................ 9 Target Query (ZCLM_IS02_Q0001): .............................................................................................................. 9 Source Code: ................................................................................................................................................ 10 Related Content ................................................................................................................................................ 40 Disclaimer and Liability Notice .......................................................................................................................... 41

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 2

Copying Queries Between InfoSets

IntroductionRSZC SAP transaction code help us to copy all query components like Queries, Filters, Restricted Key Figures, Calculated Key Figures and Structures from one InfoCube to another InfoCube or one Multi-provider to another Multi-provider. To copy queries between these Infoproviders, both source and target Infoproviders must have same structure including technical names of Info objects. But in the case of InfoSets it is not possible to copy queries between two infosets however they have same structure. It is because the technical names of Infobjects inside the Infoset will be defined by system while creation. Due to this reason when we create any infoset with copy of another infoset, both original and copied infoset will have different technical names for the infoobjects inside. In that case we cant copy the queries from original infoset to copied infoset. To overcome this issue we have created custom transaction code with name ZRSZC by providing functionality to this transaction code through Z program to facilitate infosets by allow them to copy of queries.

ScenarioTo demonstrate the functionality and usage of ZRSZC transaction code to copy queries between InfoSets we took the scenario from FSCM (Financial Supply Chain Management) Business Content Infoset (0CLM_IS02) and created copy Z infoset (ZCLM_IS02).

ZRSZC Functionality:Please follow the steps below to understand the use of ZRSZC in BW system.

Step 1: Creating Custom Program To provide functionality for ZRSZC transaction code we need to create custom Z program from SE38 ABAP editor. In our scenario we have created the program with name ZRSZC.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 3

Copying Queries Between InfoSets

Please see the Source code for the above program under Source code section. Once program created save and activate.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 4

Copying Queries Between InfoSets

Step 2: Settings for Text Elements To display user defined text elements at input selection screen after program execution, we need to define text elements for all entries defined in the program. Follow the below steps to define text elements for the program output screens. Go to the program editor window in SE38 and select Text Symbols option from Goto menu as shown below.

Enter the below entries in Text Symbols tab.

001 002 003 004 005

Select InfoProvider Select Queries Copying of Query Components Between InfoSets Select Component Log

After that enter the below entries in Selection Texts Tab

G_P_IC1 G_P_IC2 P_CKF P_REP P_RKF P_SOB P_STR

Source InfoSet Target InfoSet Calculated Key Figures Queries Restricted Key Figures Filter Structures

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 5

Copying Queries Between InfoSets

Step 3: Creating ZRSZC Custom Transaction Code To call and execute ZRSZC custom program through transaction code we need to create new Z transaction code with name ZRSZC. The following steps to be followed to create ZRSZC transaction code. Go to SE93 transaction code to create custom transaction code. Type ZRSZC and press Create button as shown below

Then it will display another screen shown below and enter all given parameters(including the program name(ZRSZC) we created ) with required check options.

After entering required parameters press Save button to save the transaction code.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 6

Copying Queries Between InfoSets

Step 4: Results To see the results we have to follow the below instructions. Open new SAP screen and enter ZRSZC transaction code in the command text box as shown below.

Once you run the above transaction code it will execute the assigned ABAP program at back-end and will display the below input selection screen. Enter the source and target infosets and select Queries option to copy all queries from source InfoSet (0CLM_IS02) to target InfoSet (ZCLM_IS02) and press the Execute button.

After execution it will display the below screen with all queries list from the source InfoSet. Select required queries you want to copy from the list and press Transfer Selections button. In our case we selection all queries.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 7

Copying Queries Between InfoSets

Now we need to give copied queries technical names as shown below including CKF, Selections and RKF etc., By default system will assign same technical names of source InfoSet by adding suffix with _1. We can rename them with our own naming convention.

Once all queries successfully copied, below screen will display with confirmation log.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 8

Copying Queries Between InfoSets

Source Query (0CLM_IS02_Q001):

Target Query (ZCLM_IS02_Q0001):

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 9

Copying Queries Between InfoSets

Source Code:*&---------------------------------------------------------------------* *& Report ZRSZC *& *&---------------------------------------------------------------------* *& Copying of Query Components between InfoSets *& *&---------------------------------------------------------------------*

REPORT

ZRSZC

message-id r9.

type-pools: rs, rrms, rsz, rzx0, rzd1. include .

"BW global "message server "Qry definition global "Qry RFC interface "Qry definition database

tables: sscrfields.

"needed for custom status

* need info about cubetype of target cube/ODS globally data: g_target_cubetype type rsd_cubetype. data : I_DEFTP TYPE RZD1_DEFTP . FIELD-SYMBOLS: TYPE rzd1_s_compdir_compic, TYPE rzx0_s_uid_server_x, TYPE rsd_s_dta. DATA: l_t_eltuid TYPE rsz_t_uid, l_t_comp_rename TYPE rzd1_t_comp_rename, l_s_msg TYPE rs_s_msg, * l_title TYPE string, l_subrc LIKE sy-subrc, l_is_compliant TYPE rs_bool, l_t_msg TYPE rs_t_msg, l_th_complist TYPE rzd1_th_compdir_compic, l_t_popup_in TYPE rso_t_object_f4_list, l_t_popup_out TYPE rso_t_object_f4_list, l_s_popup TYPE rso_s_object_f4_list, l_t_uid_server TYPE rzx0_t_uid_server_x, l_th_uid_server_all TYPE rzx0_th_uid_server_x, l_t_dta TYPE rsd_t_dta. SELECTION-SCREEN BEGIN OF BLOCK ip WITH FRAME TITLE text-001. PARAMETERS g_p_ic1 LIKE v_compdir_compic-infocube OBLIGATORY. PARAMETERS g_p_ic2 LIKE v_compdir_compic-infocube OBLIGATORY. SELECTION-SCREEN END OF BLOCK ip. SELECTION-SCREEN BEGIN OF BLOCK deftp WITH FRAME TITLE text-004.

"value check "value check

SAP COMMU

Search related