Hi,
I did looked at most of the postings here on the forum to figure out my mistake/error in BADI implementation 'RSR_OLAP_BADI' (Virtual Char display at query run time).
The <b>steps</b>:
1. Created a new Characteristic InfoObject.
2. Assigned the above InfoObject to the existing InfoCube.
3. Created a Query on the InfoCube.
4. <b>Declared</b> 2 Attributes P_CHA_ZHENTITY and P_CHA_ZCHAR in the <b>Class Interface Attributes</b> with LEVEL: Instance attribute, Visibility: Public, Type I(correct???)
5. In <b>DEFINE</b> method:
a)L_S_CHANM-MODE = RRKE_C_MODE-READ for the one which I want to use as a variable for selecting some other data from the SAP Tables.
b) L_S_CHANM-MODE = RRKE_C_MODE-NO_SELECTION for the Virtual Characteristic.
5. In <b>COMPUTE</b> method:
Using ASSIGN statement trying to read the values of the characteristics
<b>ASSIGN COMPONENT P_CHA_ZHENTITY OF STRUCTURE C_S_DATA TO <L_ZHENTITY>.
assign component P_CHA_ZCHAR of structure C_S_DATA to <l_zVCHAR>.</b>
so that that I can use first char value in SELECT statement to get the value for the 2nd i.e. virtual characteristic...
But the value for the 1st statement is blank?
To make sure, for 2nd char i.e. Virtual char I assigned a <b>constant value</b> as [<L_ZVCHAR> = 'ABC'].
<b>I am able to see the value in all the rows of the report</b>.
However I need the 1st char value based on which I can get the 2nd from Database tables...
Appreciate if one could figure out the mistake/error.
Thanks in advance.
Reagrds,
Sudhakar.