0% found this document useful (0 votes)
24 views

Using Exit Class For Characteristic Relationship With Derivation

Uploaded by

Halim Susanto
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Using Exit Class For Characteristic Relationship With Derivation

Uploaded by

Halim Susanto
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Using Exit class for Characteristic Relationship with Derivation

Requirement > Kita ingin setiap planned Customer > dimunculkan Cust group pd planning cube.
Kita dapat gunakan attribute tapia da sebuah function module yg dpt digunakan based on Customer and Customer
type utk menentukan Cust group.
CARANYA > gunakan tcode SE24 > Class = CL_RSPLS_CR_EXIT_BASE .
Kita define sebuah characterisitc relationship dgn Customer & Customer type = source characteristic dan Cust Group =
target & Pilih Characteristic Combinations Based On : Exit class & Exit Class: CL_RSPLS_CR_EXIT_BASE

Call function u2018Z_CUST_GROUPu2019


Exporting Customer = <Customer>
Cust_Type = <Customer type>
Importing Cust_Grp = <Cust Group>

For the above function module I get Customer and Customer type from input schedule and it should derive customer
group and save it into the cube.
Can anyone help me with the code. Do I have to make a copy of the exit class to use it. Here is what the help says which I
dont understand
We recommend that you derive your own class from the example class 'CL_RSPLS_CR_EXIT_BASE'. You then only have to
implement the methods u2018CHECKu2019, u2018DERIVEu2019 and u2018CREATEu2019. The class
'CL_RSPLS_CR_EXIT_BASE' itself can be used directly, but it does not execute an action.
Thanks,
SOLUSI
Kita harus copy standard class CL_RSPLS_CR_EXIT_BASE jadi sebuah custom class.
Setelah creating exit class > go to the methods > put your code pada method DERIVE

FIELD-SYMBOLS: <l_customer> TYPE ANY.


FIELD-SYMBOLS: <l_cust_type> TYPE ANY.
FIELD-SYMBOLS: <l_custgroup> TYPE ANY.

ASSIGN COMPONENT '0CUSTOMER' OF STRUCTURE c_s_chas TO <l_customer>.


ASSIGN COMPONENT 'ZCUST_TYPE' OF STRUCTURE c_s_chas TO <l_cust_type>.
ASSIGN COMPONENT '0CUST_GROUP' OF STRUCTURE c_s_chas TO <l_custgroup>.

Call function u2018Z_CUST_GROUPu2019


Exporting Customer = <l_customer>
Cust_Type = <l_cust_type>
Importing Cust_Grp = <l_custgroup>
“=================================================================================
Characteristic Relationships ( CR )
CR mrpkan sebuah option utk derive ( menghasilkan ) atau utk check characteristic values pada info-provider .
SAP provide > predefined generic CR .
Utk customized CR > bisa anda maintain pada info-cube level in transaction RSPLAN.
Contoh : generic CR > time characteristic relations. Ada beberapa time characteristics pada BW (business warehouse)
spt : fiscal period, fiscal year and fiscal year and period together(0fiscper).
Characteristic2 ini dihubungkan dgn generic characteristic relationship. Jika period & fiscal year diisi, maka system aka
nisi characteristic fiscal year/period 0FISCPER secara automatic.
The following rows are about the custom characteristic relationships, which can be used to control the consistency of the
transaction data.
Characteristic relationship types
Based on the function
This classification is based on the checkbox “with derivation” in RSPLAN transaction.
1. Type “Derivation”: With derivation of target characteristics: Type utk menghubungkan source & target
characteristics. Dari selected source characteristics > target characteristics akan diisi saat Record dicreate pada info-
provider.
2. Type “check” – without derivation of any characteristics > ini hanya check the valid combinations.
These relations digunakan utk menghentikan kombinasi chars value yg tidak valid .
Based on the method
Both types Derivation and Check” can be realized with predefined settings using master data attributes and data store
objects or with customer exit using programming code.
1. Attributes – This type is using the attributes of the master data. For example we want to enter in the cube a
record for a material, but we don’t know the material type. Material type can be derived automatically from the
material master data attributes. The derivation happens for every entry in the cube. To set such characteristic
relationship we need to choose the source characteristic material and the target characteristic material type.
2. Hierarchy – this type uses existing hierarchies to read and fill the target characteristics.
3. DSO (data store object) – this type uses data store object to define the characteristic combinations.
4. Exit – type ini menggunakan classes, yg mendefine logic of derivation or check.
Ada standard class yg disediakan oleh SAP (CL_RSPLS_CR_EXIT_BASE), yg hrs kita copy ke new class & logic can
be implemented. Class ini berisi methods check, derive and create.
Method check dpt di implemented jika CR bertype check.
Method derive digunakan utk menghasilkan target characteristics.
System hanya akan menjalankan method DERIVE jika semua source fields terisi .
When the characteristic relationship starts?
CR yg bertype derivation > dijalankan setiap entry or change of the data pada planning cube saat source characteristics
ada pada aggregation level & target characteristics bukan pada level ini .
They start by execution of planning functions and also by manual entry in input ready queries.
The characteristic relationships from type check start when both source and target characteristics are in the aggregation
level.
Tips and tricks
 When creating a characteristic relationship you need to define an error message, which is understandable for
the user. To be visible also in the design studio (Lumira) planning applications you can
use RAISE EXCEPTION TYPE cx_rspls_failed.
 You can use characteristic relationships to lock or unlock specific combinations of data. For example you create
relation from type check with DSO and enter there only the allowed combinations.

You might also like