Ansicht
Dokumentation

RSPLS_SQL_SCRIPT_TOOL - BW-Planning: Tool for SQL-Script Exits

RSPLS_SQL_SCRIPT_TOOL - BW-Planning: Tool for SQL-Script Exits

General Data in Customer Master   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Purpose

This program contains four areas of useful resources (spread over four tabs) to help you with SAP HANA exit implementations (SQLScript):

1.,,List of available SAP HANA exit implementations

2.,,Sample code for planning function exits

3.,,Examples of characteristic combinations and data slice exits

4.,,SAP HANA exit objects

We recommend implementing the SQLScript exits using ABAP Managed Procedures (AMDP). If you use AMDP, you do not need to manually trigger the transport of procedures between different systems.

List of available SAP HANA exit implementations

On the first tab (Display SQLScript implementations) you can display the available SQLScript exits:

·,,From planning function exits

·,,For planning functions: list of classes, planning function types and functions

·,,From characteristic combination exits

·,,From data slice exits

Basic information about SQLScript exits

SQLScript requires a typed interface. You therefore need to know the aggregation level (or the characteristic combination step or data slice number) that you want to create SQLScript for. The system suggests the relevant types.

For SQLScripts, you can use custom parameters. You can specify a structure type for these parameters. The components of the structure are passed to the SQLScript where they can be used.

Recommendation:

There is a difficulty associated with the implementation of SQLScripts, as you need to deal with dynamic selection conditions. When the SQLScript is called, there is no preset parameter for the corresponding internal table (of type RSDD_TSX_SELDR). Even if this table were available for SQLScript, the problem is that SQLScript does not allow any dynamic “where” conditions (unlike in ABAP).

To overcome this difficulty, we recommend the following: Park the selection conditions in method IF_RSPLS_CHAR_RELATION~SET_SELECTION in a local attribute of your class. Then convert the “where” condition - based on this attribute in method IF_RSPLS_CR_EXIT_HDB~GET_SQLSCRIPT_PARAMETERS - into one or more “where” conditions, and pass these conditions in one or more components of the structure explained above. In SQLScript, these “where” conditions can be applied using the HANA function APPLY_FILTER ( , );.

Sample code for planning function exits

On the second tab (example: planning function type) you can create sample code for AMDP implementations for planning function types. You can then copy this code into the implementing class.

An iterative process is used for implementation, in order to create the implementing class and the planning function type. The planning function type requires the class; the implementation of class must take the settings in the planning function type (parameters of the planning function type) into consideration.

Depending on where you are in the iterative process, you can create a code suggestion for an ABAP class or for a planning function type.

Besides passing parameters via a structure, you can also pass parameters in a list (name, InfoObject, value) for planning function types. In the sample code, this option is suggested (call of l_r_sql_script->get_parameter_values), in order to collect the values of the elementary parameters of the planning function with the values of the planning function in table l_t_iobj_param.

Examples of characteristic combinations and data slice exits

On the third tab, you can create sample code for characteristic combinations and data slices.

The corresponding characteristic combination step or data slice must have already been created of type “Exit”.

Please note that characteristic combinations and data slices are sometimes executed in ABAP due to performance reasons - even if an SQLScript is available. You therefore need to create identical implementations from the result for SAP HANA and ABAP.

SAP HANA exit objects

On the fourth tab, you can display structure types and SQL procedures defined on HANA (including, for example, the AMDP methods and the structure types used in the AMDP interface).

If you want to write SQLScripts for planning functions directly to SAP HANA, you can create an empty procedure body with the required types and then delete them again later on.

Prerequisites

Features

Selection

Standard Variants

Output

Activities

Example






ROGBILLS - Synchronize billing plans   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 5085 Date: 20240601 Time: 162013     sap01-206 ( 86 ms )