Skip to Content
author's profile photo
Former Member

virtual key figure

Hi guys,

I am looking for a document on how to create virtual key figure and virtual characteristic. Can anybody please mail me the document at zsapbw@gmail.com

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Apr 06, 2007 at 09:01 AM

    Hi,

    Transaction SMOD ENHANCEMENT RSR00002

    See documentation

    In CMOD you'll have to create a projet in order to activate the exists

    included in RSR00002

    All the includes to change are include in previous exemple

    Best regards,

    Christophe

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Does that mean in the Democube,

      field PRICE_TP is empty (because it is virtual)

      and rest of the fields PRODUCT, ACT_PRICE and QUANTITY has values (becuase they are not virtual).

      I am really confused by the following statement,

      In the enhancement, the product from the current price for PRODUCT and the key figure QUANTITY should be determined

  • author's profile photo
    Former Member
    Posted on Apr 06, 2007 at 12:43 AM

    Here is some sample code from service marketplace.

    Ravi Thothadri

    User Exit Virtual Characteristics and Key figures

    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.

    The 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.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Apr 17, 2007 at 04:53 AM

    thnx

    Add comment
    10|10000 characters needed characters exceeded