Hello,
I am implementing a Virtual Characteristic in a cube using BADI RSR_OLAP_BADI.
I have an Info Object loaded in the cube (ZPMORDER). My virtual characteristic (ZVIRTUAL) should be ZXPMORDER+2(3).
ZVIRTUAL = ZXPMORDER+2(3).
My steps were:
- Transaction SE19
- Definition name: RSR_OLAP_BADI
- Go to\Sample code\ Copy
Does anyone now how to update the Methods DEFINE, INITIALIZE and COMPUTE? Could you please give me samples of code?
Thank you.
Kind regards,
Alex
Next steps:
Put your cube name into the filter value by adding a new line.
Create attributes p_cha_zvirtual and p_cha_zpmorder (I assume that the name is zpmorder, if it's zxpmorder you need to replace it here and below).
The attributes are instance/public/type I.
The coding for DEFINE is
DATA: l_s_chanm TYPE rrke_s_chanm,
l_kyfnm TYPE rsd_kyfnm.
FIELD-SYMBOLS:
<l_s_chanm> TYPE rrke_s_chanm.
CASE i_s_rkb1d-infocube.
WHEN 'MYCUBE'.
characteristic
l_s_chanm-chanm = 'ZVIRTUAL'.
l_s_chanm-mode = rrke_c_mode-no_selection.
APPEND l_s_chanm TO c_t_chanm.
l_s_chanm-chanm = 'ZPMORDER'.
l_s_chanm-mode = rrke_c_mode-read.
APPEND l_s_chanm TO c_t_chanm.
The coding for compute is:
field-symbols: <f_virt> type /bic/oizvirtual,
<f_ord> type /bic/oizpmorder.
if P_CHA_zvirtual > 0.
assign component P_CHA_zvirtual of structure C_S_DATA to <f_virt>.
if P_CHA_zpmorder > 0.
assign component P_CHA_zpmorder of structure C_S_DATA to <f_ord>.
<f_virt> = <f_ord>+2(3).
else.
clear <f_virt>.
endif.
else.
clear <f_virt>.
endif.
Activate the implementation and build a query.
Best regards
Dirk
Hi,
Samles for using the OLAP BADI can be found for example in
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/how to realize summarized display of stock values on storage.zip
Heike
Add a comment