0% found this document useful (0 votes)
13 views29 pages

s20 b4h Query+Hana+Exit+Var

The document outlines various approaches for migrating to SAP BW/4HANA, including in-place, greenfield, and remote conversions, along with their respective characteristics and tools. It also details the implementation of BW Query and HANA Exit variables, including coding examples and the necessary interfaces for HANA Exit. Additionally, it provides insights into the technical activities involved in the in-place migration process.

Uploaded by

chakribw2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views29 pages

s20 b4h Query+Hana+Exit+Var

The document outlines various approaches for migrating to SAP BW/4HANA, including in-place, greenfield, and remote conversions, along with their respective characteristics and tools. It also details the implementation of BW Query and HANA Exit variables, including coding examples and the necessary interfaces for HANA Exit. Additionally, it provides insights into the technical activities involved in the in-place migration process.

Uploaded by

chakribw2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

S20 - BW Query and HANA Exit variables

BW Query 1. BW Query in Eclipse 4th Oct: 8:30 AM - 10:30 AM


2. BW Query new way of Customer Exit and HANA Exit
variables
3. Debugging the customer and hana exit variables

Batch_2 Page 1
Migration - Paths to SAP BW/4HANA

Batch_2 Page 2
Describing Conversion Strategies and Tools

Lesson Objective This lesson describes the conversion paths that are available to implement SAP BW/4HANA.
Available Paths

In-place conversion

Greenfield

Batch_2 Page 3
Greenfield
(new System ID)

Accelerated Greenfield
(Shell Conversion)

Remote Conversion
(Brownfield)

Landscape
Transformation/Consolida
tion

Conversion Guide

Batch_2 Page 4
Conversion Guide

SAP note for the


conversion

Batch_2 Page 5
SAP BW/4HANA
Readiness check

SAP BW/4HANA transfer


cockpit

Batch_2 Page 6
SAP BW/4HANA
Readiness check

Batch_2 Page 7
Readiness check first

Batch_2 Page 8
Readiness check first
Then pre-checks (detailed
line-item level)

Additional pgm to cleanup


unused objects

Which path is right for

Batch_2 Page 9
Which path is right for
you

Batch_2 Page 10
Batch_2 Page 11
Introducing the In-Place Conversion Approach

Process of in-place
conversion

BW/4HANA Starter Add-on

System modes provided by


BW/4HANA starter Add-on

Batch_2 Page 12
BW Mode

Compatibility mode

B4H Mode

Ready for conversion Mode

Length of time in different

Batch_2 Page 13
Length of time in different
modes

Tasks processed during


switch from:
Compatibility -> B4H

Tasks processed during


switch from:
B4H -> Ready for
conversion

In-place conversion tools

Batch_2 Page 14
Transfer of InfoCubes to
Advanced DSO

Transfer of DSOs to
Advanced DSOs

Example of transfer of old


objects to new BW/4HANA
objects

Executing the in-place

Batch_2 Page 15
Executing the in-place
conversion

Role of BW/4HANA starter


Add-on

Summary

Batch_2 Page 16
Summary

Technical activities during


in-place migration

Batch_2 Page 17
Batch_2 Page 18
Introducing the Remote Conversion and Shell Conversion Approaches

Remote conversion Key


characteristics

Batch_2 Page 19
Shell conversion Key
characteristics

Batch_2 Page 20
Batch_2 Page 21
Batch_2 Page 22
Assessment

Question

Batch_2 Page 23
Learning assessment - Answers

Question Correct Answer


1. B
2. True
3. C-1,
A-2,
B-3,
D-4

Batch_2 Page 24
BW Query Enhancement - Requirement

Sales Item Customer Exit (ABAP Layer, Can accept multiple values or ranges for a variable)
Sales Item
1. Take manual input from user for Fiscal period in a manual input variable.
This manual input variable must be auto populated with current fiscal period.
2. Get the fiscal period from the manual fiscal period variable and create a range (calculation)
Take the year and get the 1st period of the year (similar to YTD requirements) - This is the from value of the
interval.
Take the fiscal period entered in the manual fiscal period variable and treat this as To value of the interval.
Sales Header HANA Exit (AMDP based. HANA Layer and can only accept single value for a variable)
Sales Header
1. Get the calendar day input from user in a manual input variable.
This variable must be auto populated by current day -1.
1 variable
2. Take the manual input calday and create a range:
From: Start of the year.
To: till the manual input calday
2 variables

Batch_2 Page 25
HANA Exit Variables

SAP HANA Exit

HANA Exit: (AMDP code)

Enhancement Spot: RSROA_VARIABLES_HANA_EXIT.


BADI: RSROA_VAR_HANA_EXIT_BADI
AMDP Class: The BAdI implementation class requires an AMDP class containing the following interfaces:
IF_BADI_INTERFACE,
IF_AMDP_MARKER_HDB
IF_RSROA_VAR_HANA_EXIT

HANA Exit variables can only process single values or multiple single values.
Therefore we need to use a range selection with two single value variables for from and to.

Sample Code given by SAP:


CL_RSROA_HANA_EXIT_FALLBACK

Methods:
1. if_rsroa_var_hana_exit~ get_properties

• Parameter C_IS_ACTIVE should have the value 'X'. This stipulates that this coding should be used to define the value of the variable
The system can contain no more than one BAdI implementation with the value 'X for the query/variable name combination.

• Parameter C_TS_VNAM_INDEX defines the allocation of variable values from the query to the I_VAR_VALUE_X parameters of
method if_rsroa_var_hana_exit~process.
The specification of row {VNAM_COUNTRY, 1} in parameter C_TS_VNAM_INDEX stipulates that the value of variable
VNAM_COUNTRY is assigned to parameter I_VAR_VALUE_1.
A maximum of 20 entries of this type can be made.

2. if_rsroa_var_hana_exit~ process
• Parameter c_value should specify the value of the variable.
If the variable represents multiple single values, they must be in a comma-separated format, for example 'DE' ,'AT'.

Important system-defined stnd variables:

1. i_vnam - Provides variables name.

BRFplus Exit

Batch_2 Page 26
BRFplus Exit

Batch_2 Page 27
Code Blocks

HANA Exit CLASS zcl_var_hana_badi DEFINITION


PUBLIC
FINAL
CREATE PUBLIC .

PUBLIC SECTION.

INTERFACES if_badi_interface .
INTERFACES if_amdp_marker_hdb .
INTERFACES if_rsroa_var_hana_exit .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.

CLASS zcl_var_hana_badi IMPLEMENTATION.

* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_BPC_CL_RSROA_HANA_EXIT->IF_RSROA_VAR_HANA_EXIT~GET_PROPERTIES
* +-------------------------------------------------------------------------------------------------+
* | [--->] I_VNAM TYPE RSZVNAM
* | [--->] I_VARTYP TYPE RSZVARTYP
* | [--->] I_IOBJNM TYPE RSIOBJNM
* | [--->] I_INFOPROV TYPE RSINFOPROV
* | [--->] I_COMPID TYPE RSZCOMPID
* | [<-->] C_IS_ACTIVE TYPE RS_BOOL
* | [<-->] C_TS_VNAM_INDEX TYPE NT_TS_VNAM_INDEX
* +--------------------------------------------------------------------------------------</SIGNATURE>

METHOD if_rsroa_var_hana_exit~get_properties BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT.


* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_BPC_CL_RSROA_HANA_EXIT->IF_RSROA_VAR_HANA_EXIT~PROCESS
* +-------------------------------------------------------------------------------------------------+
* | [--->] I_VNAM TYPE RSZVNAM
* | [--->] I_VARTYP TYPE RSZVARTYP
* | [--->] I_IOBJNM TYPE RSIOBJNM
* | [--->] I_INFOPROV TYPE RSINFOPROV
* | [--->] I_COMPID TYPE RSZCOMPID
* | [--->] I_VAR_VALUE_1 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_2 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_3 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_4 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_5 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_6 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_7 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_8 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_9 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_10 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_11 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_12 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_13 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_14 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_15 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_16 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_17 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_18 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_19 TYPE RSCHAVL
* | [--->] I_VAR_VALUE_20 TYPE RSCHAVL

Batch_2 Page 28
* | [--->] I_VAR_VALUE_20 TYPE RSCHAVL
* | [<-->] C_VALUE TYPE RSCHAVL
* C_IS_ACTIVE stipulates that this coding should be used to define the value of the variable

c_is_active := 'X';

IF :i_vnam = 'ZVAR_HE_S_CALDAY'
THEN
c_ts_vnam_index = SELECT 'ZVAR_HE_S_CALDAY' AS vnam, 1 as index from sys.dummy;
end if;

IF (:i_vnam = 'ZVAR_HE_S_CALDAY_FR' OR :i_vnam = 'ZVAR_HE_S_CALDAY_TO')


THEN
c_ts_vnam_index = SELECT 'ZVAR_HE_S_CALDAY' AS vnam, 1 as index from sys.dummy;
end if;

endmethod.

METHOD if_rsroa_var_hana_exit~process BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT.


* Parameter c_value should specify the value of the variable.

DECLARE lv_mth NVARCHAR( 2 ) := '01';


DECLARE lv_day NVARCHAR( 2 ) := '01';

c_value:= '';

IF :i_vnam = 'ZVAR_HE_S_CALDAY'
THEN
c_value := to_dats(add_days( current_date, -1 ));
END IF;

IF :i_vnam = 'ZVAR_HE_S_CALDAY_FR'
THEN
c_value := left(:i_var_value_1,4) || lv_day || lv_mth;
END IF;

IF :i_vnam = 'ZVAR_HE_S_CALDAY_TO'
THEN
c_value := :i_var_value_1;
END IF;

ENDMETHOD.
ENDCLASS.

Batch_2 Page 29

You might also like