on 10-09-2013 2:23 PM
Hello Experts,
I have a query built on Multiprovider, I had a requirement where I had to make use of virtual char though I haven't used it before.
I followed steps given in White paper available in SCN on virtual char but seems like BADI I written for Virtual Char is not being called.
May I have necessary checks that I need to make sure that can cause BADI not being called.
ok the DEFINE Method is called during query generation to include the infooobjects, put a breakpoint in there and execute,
Now is the InfoProvider a standard infoProvider or infoset? if not standard the infoobjects names may be different( technical ones)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First thing, as you are saying the break-point is not working, did you activated the BADI.
Then as per my previous experience, you need to give some number assignment which been used in query, and that you will get during the debug only. So first time debug is must and then you will identify which number is assign to which char and based on that what ever the required char will be get assigned.
Please first check the activation of Badi and then try to make it stop at break point.
PS : BADI implementation for virtual Char is really tricky
Thank-You.
Regards,
VB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sorry for delay in reply.
Did you resolved teh issue, if so please close the thread.
If not, please refer below doc and specially the Page 15 talkes about the number assignement, writeten in compute : http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60e34f63-f44c-2c10-488e-c89b04e0c...
Note: This is a simple code to put the constant value 10 in this virtual kf. We can also declare table or other data elements in define method to calculate complex logics as well.
p_kyf_zvirtkf = 16. This statement points to the location of Virtual KF in the <fs_zvirtkf> structure, generated at execution time, it is derived by code debugging at runtime. And we are modifying the value of that location by putting constant value 10 in statement <fs_zvirtkf> = '10.0'.
Thank-You.
Regards,
VB
Hi,
The first thing is to go through the note in detail.
1717880 Virtual Key Figures & Characteristics
I would always start but putting breakpoints in each DEFINE, INITAIZE and COMPUTE methods, are they all getting called?
Is the query based on infoset? multiprovider? check you are using the correct names of the infoobjects in this case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brian,
It is on InfoCube.
Just to check Virtual char is working is used following code
Definition:
METHOD
IF_EX_RSR_OLAP_BADI~DEFINE .
DATA: l_s_chanm TYPE rrke_s_chanm,
l_kyfnm TYPE rsd_kyfnm.
FIELD-SYMBOLS:
<l_s_chanm> TYPE rrke_s_chanm.
BREAK-POINT.
CASE i_s_rkb1d-infocube.
WHEN 'ZUCS_C06'.
l_s_chanm-chanm = '0UCINSTALLA'.
l_s_chanm-mode = rrke_c_mode-read.
APPEND l_s_chanm TO c_t_chanm.
l_s_chanm-chanm = 'ZPRORATE'.
l_s_chanm-mode = rrke_c_mode-no_selection.
APPEND l_s_chanm TO c_t_chanm.
ENDCASE.
ENDMETHOD.
--------------------------------------------------------------------------------------------------------------------------------
Compute:
METHOD
IF_EX_RSR_OLAP_BADI~COMPUTE .
FIELD-SYMBOLS <FS_ZPRORATE> TYPE ANY.
FIELD-SYMBOLS <FS_ucinstalla> TYPE ANY.
ASSIGN COMPONENT P_CHA_ZPRORATE OF STRUCTURE C_S_DATA TO <FS_ZPRORATE>.
ASSIGN COMPONENT P_CHA_0UCINSTALLA OF STRUCTURE C_S_DATA TO <FS_ucinstalla>.
<FS_ZPRORATE> = 'Hello'.
ENDMETHOD.
------------------------------------------------------------------------------------------------------------------------------
If it's not called, it might be due to many reasons.
1. Have you given your infoprovider name in the attribute tab while creating BAdi?
2. Is your implementation class is active?
Your implementation looks correct. Have you checked the include ZXRSRTOP contains the infocube/virtual characteristic defintion?
To answer your other question regarding virtual characteristic, user exits are the alternatives.
You can write your code at i_step = 2, to populate field value at runtime.
Br, H
Hi Sulochan,
Please go through below links.
they might turn out to be of some use.
http://scn.sap.com/thread/2099840
http://help.sap.com/saphelp_dm40/helpdata/en/eb/3e7cf4940e11d295df0000e82de14a/frameset.htm
Regards,
Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you seen this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.