on ‎2009 Aug 31 2:27 PM
We have 2 queries. In the first query I have variables on A, B and C. In the 2nd query I have variables on E and F. Now I need to embedd both these queries in to Workbook.
Requirement is when I give a value to variable on A, this variable value should be my Input variable value (using user exit) for my variable on E & F which is 2nd query. Replacement path can not be a solution, coz i need to perform some coding based on variable value A and then use the result as values for E & F.
Can this be possible! I mean using a variable value as input variable value for a diff variable on a diff query!
Request clarification before answering.
Hi Madhu,
While creating second query, you can use variable A as your input variable and in customer exit (I_STEP = 2) you can read value for A to get variable E & F. At the same time you can use variabe A along with B & C in first query. When using the variables in workbook you can select option display repeated variable once. When workbook will be executed user will get A, B & C variable as input.
Regards,
Kams
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
We can code in CMOD by checking teh report name only as below:
CASE I_S_RKB1D-COMPID.
WHEN 'QUERY1' OR 'QUERY2' OR 'Query 3'.
CASE I_VNAM.
WHEN ' A or B or E or F'.
IF I_STEP = 2. "This is to process the variables
Please use the idea to implement your functionality , the ideas are already been discussed.
Hope that helps you.
Thanks
Mukesh
Mukesh,
How can I use I_S_RKB1D-COMPI in my case? Coz' my Exit variable E is in Query2 and my input variable A is in Query1! Plz let me know
whether the following is correct.
CASE I_S_RKB1D-COMPID.
WHEN 'QUERY1'.
CASE I_VNAM.
WHEN 'E'.
.......
....
Above cant be rite,. coz I need to call the user exit when Query is executed, not Query 1. If i take WHEN 'QUERY2', it cant be rite coz
I need to get the variable A value from Query1.
Please suggest.
Hi Madhu,
I meean to say we can try like this:
CASE I_S_RKB1D-COMPID.
WHEN 'QUERY2'.
CASE I_VNAM.
WHEN 'E'. " Your Query 2 variable
data: yy(4).
IF i_step = 2.
LOOP AT i_t_var_range INTO loc_var_range
WHERE iobjnm = 'A' " Your Query 1 variable.
CLEAR l_s_range.
l_s_range-low = loc_var_range-low.
l_s_range-high = loc_var_range-high.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
endloop.
ENDIF.
Please try if that works
Varaible A might have been used in different queries other than Query1. So in your code, where are you contrlloling that variable E whould get the variable A value from Query1! I see only Query2.
Your code means, when the Query execution is 2, and when V_NAM = E, then E = A.?? How does this code know that A should get value from Query 1!
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.