cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual Characteristics...

Former Member
0 Kudos

Hello,

Can anybody give me information on Virtual Characteristics.

How to create them? Where to use them? etc..

Thanks,

Srini

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I too have a problem using Virtual Characteristic. It is the first tim I am implementing this.

Please answer following doubts :

1) I do not understand where is the perform for this

FORM USER_DEMOCUBE USING I_S_RKB1D TYPE RSR_S_RKB1D

CHANGING C_S_DATA TYPE ANY.

2) I have added code to ZXRSRU02. fine

Added following lines of code to the TOP include

**& Include ZXRSRTOP *

*----

**

DATA: G_POS_CUBENAME_CHARACTERISTICNAME TYPE I.

But the lines of code ZXRSRZZZ do recognize the above variable. Throws and error

FORM USER_cubename USING i_s_rkb1d TYPE rsr_s_rkb1d

CHANGING c_s_data TYPE any.

*

    • Define Field Symbols

  • field-symbols: <zname>

assign: component g_pos_cubename_characteristicname

of structure c_s_data to <zname>.

Error message says : g_pos_cubename_characteristicname is unknow..

Please let me know where I have gone wrong...

Please help me in implementing this successfully.

Former Member
0 Kudos

This problem is now resolved.

Now I need to know how do read the values of input variable in the include ZXRSRZZZ.

Eg: Input Value : PO_number

Use this PO_Number to find the other details.

I need to get the value of PO_NUMBER in the code.

Thankx

Former Member
0 Kudos

so This PO_Number? is that a attribute or what is it?

Former Member
0 Kudos

BW: Virtual characteristics and key figures in Reporting

Enhancement: RSR00002

With this enhancement, you can define and evaluate user-specific virtual

characteristics and key figures.

Components

The components for the enhancement are the function modules

EXIT_SAPMRSRU_001 and EXIT_SAPMRSRU_999.

Using enhancement 001

You must firstly define the characteristics, or key figures within the

InfoCube.

You deposit the customer-specific code in include reports. The include

ZXRSRU02 is intended for function module EXIT_SAPMRSRU_001. In this

include, the fields still to be processed must be listed. The name of a

characteristic in field CHANM and of the processing mode in the field

MODE is located in the table E_T_CHANM. Characteristics can either be

processed reading (constant RRKE_C_MODE-READ) or writing (constant

RRKE_C_MODE-NO_SELECTION). Table E_T_KYFNM contains the name for the key

figures to be processed.

In the include ZXRSRTOP, a global variable must be created for each

InfoCube for each characteristic. Field information for the structure to

be changed is stored in these variables. The name of the variables is

formed from the prefix G_POS_, the name of the InfoCube,_ and the name

of the InfoObject all together.

In the include ZXRSRZZZ, a form (routine) must be created for every

InfoCube. The name of this form must be made up of USER_ and the

technical name of the InfoCube. The specific code for the virtual

characteristics, or key figures, for this InfoCube is stored in this

form. The individuals fields of the structure C_S_DATA to be changed are

accessed using field symbols.

You should note that the data records transferred can be on a different

aggregation level depending on read procedure and drilldown. Moreover,

compound information is not automatically changed with compounded

characteristics after changing a higher-level characterisic. In

addition, the compound characteristic must also be defined in the mode

RRKE_C_MODE-NO_SELECTION.

Furthermore, the fiscal year (0FISCYEAR), the fiscal year period

(0FISCPER) and the fiscal year variant (0FISCVARNT) cannot be read or

changed in the enhancement.

Using enhancement 999

Enhancement 999 may not be changed. Calling up serves to update

information via the structure C_S_DATA. This functionality is completely

taken over by form USER_INIT_GLOBALS.

Example

InfoCube DEMOCUBE has the characteristic PRODUCT PRICE_TP and the key

figure ACT_PRICE and QUANTITY. In the enhancement, the product from the

current price for PRODUCT and the key figure QUANTITY should be

determined. If successful, the characteristic PRICE_TP should contain

the characteristic value '1'.

The include ZXRSRU02: Definition

***INCLUDE ZXRSRU02

DATA: L_S_CHANM TYPE RRKE_S_CHANM.

CASE I_S_RKB1D-INFOCUBE.

WHEN 'DEMOCUBE'.

L_S_CHANM-CHANM = 'PRODUCT'.

L_S_CHANM-MODE = RRKE_C_MODE-READ.

APPEND L_S_CHANM TO E_T_CHANM.

L_S_CHANM-CHANM = 'PRICE_TP'.

L_S_CHANM-MODE = RRKE_C_MODE-NO_SELETION.

APPEND L_S_CHANM TO E_T_CHANM.

APPEND 'ACT_PRICE' TO E_T_KYFNM.

APPEND 'QUANTITY' TO E_T_KYFNM.

ENDCASE.

The include ZXRSRTOP: global data

***INCLUDE ZXRSRTOP .

DATA: G_POS_DEMOCUBE_PRODUCT TYPE I.

DATA: G_POS_DEMOCUBE_PRICE_TP TYPE I.

DATA: G_POS_DEMOCUBE_ACT_PRICE TYPE I.

DATA: G_POS_DEMOCUBE_QUANTITY TYPE I.

Das Include ZXRSRZZZ: Changing the data

***INCLUDE ZXRSRZZZ .

FORM USER_DEMOCUBE USING I_S_RKB1D TYPE RSR_S_RKB1D

CHANGING C_S_DATA TYPE ANY.

FIELD-SYMBOLS <L_PRODUCT>.

FIELD-SYMBOLS <L_PRICE_TP>.

FIELD-SYMBOLS <L_ACT_PRICE>.

FIELD-SYMBOLS <L_QUANTITY>.

ASSIGN COMPONENT G_POS_DEMOCUBE_PRODUCT

OF STRUCTURE C_S_DATA TO <L_PRODUCT>.

ASSIGN COMPONENT G_POS_DEMOCUBE_PRICE_TP

OF STRUCTURE C_S_DATA TO <L_PRICE_TP>.

ASSIGN COMPONENT G_POS_DEMOCUBE_ACT_PRICE

OF STRUCTURE C_S_DATA TO <L_ACT_PRICE>.

ASSIGN COMPONENT G_POS_DEMOCUBE_QUANTITY

OF STRUCTURE C_S_DATA TO <L_QUANTITY>.

  • Routine to get the price

  • PERFORM GET_PRICE USING <L_PRODUCT>

  • CHANGING <L_ACT_PRICE>.

IF <L_ACT_PRICE> GT 0.

<L_ACT_PRICE> = <L_ACT_PRICE> * <L_QUANTITY>.

<L_PRICE_TP> = '1'.

ENDIF.

ENDFORM.

Former Member
0 Kudos

Thanks Shashi.

Former Member
0 Kudos

Hi I have used Virtual Char/KF extensively. let me know if you need any help.

Former Member
0 Kudos

Hi S Reddy,

Good to see that you had used Virtual Char/KF extensively. Do you see any performance issues in BEX reporting?

When we tried to use this feature, we had real performance issues and sometimes Queries are failed due to more run times.

Looks like the code written in these includes works for each query that hits the Cube irrespective of the fields related to Virtual Char/KF are used in that query or not.

Is there any way, we can have the user control the use of this feature, means if the Query doesn't contain VCHAR/VKF then it should not execute any code, if they use then it should execute the code..

Any help in this regard is highly appreciated.

thanks

Sravan

Former Member
0 Kudos

Hi,

yes of course there is.

You should check whether your Keyfigure / Characteristic is in the internal table I_TH_KYFNM_USED , I_TH_CHANM_USED in the method define (if using the badi) or in include zxrsru02.

Heike

Former Member
0 Kudos

Hi Hieke,

Thanks for the response. Could you please throw some more light on how to restrict this while using Include ZXRSRU02. I am not using any BADI for this purpose.

Appreciate your help on this regard..

thanks

Sravan

Former Member
0 Kudos

data: l_kyfnm TYPE rsd_kyfnm,

l_s_chanm TYPE rrke_s_chanm.

CASE i_s_rkb1d-infocube.

WHEN 'Your Cube'.

l_kyfnm = 'Your virtual key figure'.

READ TABLE i_th_kyfnm_used

WITH KEY table_line = l_kyfnm

TRANSPORTING NO FIELDS.

if sy-subrc = 0.

  • Keyfigure is used

endif.

l_s_chanm-chanm = 'Your virtual characteristic'.

READ TABLE i_th_chanm_used

WITH TABLE KEY table_line = l_s_chanm-chanm

TRANSPORTING NO FIELDS.

if sy-subrc = 0.

  • Characteristic is used

endif.

endcase.

Former Member
0 Kudos

Hieke,

Thank you very much for the help. It really worked and helps me in resolving my performance issues.

thanks

Sravan

Former Member
0 Kudos

Hello,

This is a Complaint Transaction in CRM,

A product for suppose a rack of motherboards, is returned and a Complaint is created for return order.

Here Rack is Higher level Material.

One of it's(Rack) mother board is Sub - Level Material

One of it's(M Board) chip is Sub-Sub-Level Material.

Now I have to make a query on Material, for suppose I give Sub level Material( M Board) , I want to see all complaints on selection material and I want the material associated at the Higher level and Lower Level alond with their serial numbers.

Yes I have Product Hierarchy.

The issue here is I can able to go to any higher or lower material in a complaintis the Item No column given above in my earleir message.

ex,

10.000 - Higher Level - Rack

10.100 - Sub- level -Mother Board 1

10.200 - sub level -Mother Board 2

10.201 - sub - sub level - Chip 1 of M board 2

10.202 - sub - sub level - Chip 2 of M board 2.

There can be situation where I am getting only mother board back.

Then

ex,

10.000 - Higher Level - Mother Board

10.100 - Sub- level -Chip 1 of M board

10.200 - sub level -Chip 2 of M board.

Kindly let me know if you require any further Information.

Thank you all, appreciate your help here.

Kris.

Former Member
0 Kudos

Hi Shashi,

I already done everything youve said but it didnt stop on my hard coded break point, do you have any idea on this?

Thanks,

Sid

Former Member
0 Kudos

can you help me with this on virtual keyfigure? -