Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Using Virtual Key Figure / Characteristics in an InfoSet

----


</p>h5. Virtual Key Figures(VKF) / Characteristics can also be used in an InfoSet. An example here to demonstrate is as follows:

Example: The InfoSet ( ZV_IS1) is based on two ODSs (Product-ZV_OPD and Shipper-ZV_OSHPR) . The requirement is to create a virtual Key Figure which is a part of the Shipper ODS( ZV_OSHPR) which will filled up at runtime.
The algorithm of the calculation is a complex calculation and based on a Function Module(ZV_FMPRC1). Moreover ZV_FMPRC1 will input the Product No and Shipper Number, access database table and perform complex calculations and the output would be the required ZVPRV.

Step 4. Go to the Methods Section and Double Click on the Method . Sample code can be used by editing the required changes.

CASE i_s_rkb1d-infocube.
           WHEN 'ZV_IS1'. " When using the InfoSet
                           l_s_chanm-chanm = 'ZV_IS1___F1'.
                           l_s_chanm-mode = rrke_c_mode-read.
                           APPEND l_s_chanm TO c_t_chanm.
                          
                           l_s_chanm-chanm = 'ZV_IS1___F37'.
                           l_s_chanm-mode = rrke_c_mode-read.
                           APPEND l_s_chanm TO c_t_chanm.

                            l_kyfnm = 'ZVPRV'.
                            l_s_chanm-mode = rrke_c_mode-no_selection.
                            APPEND 'ZV_IS1___F38' TO c_t_kyfnm.
          WHEN OTHERS.
ENDCASE.

Step 5. Go to the Method and add the sample code .

11 Comments