on 12-11-2012 1:58 AM
Hi Gurus,
I have created a WAD IP report which has two sections.
The first section on top has two input fields which are data binded with the BEx IP variable in the button group I have created which will execute a planning sequence.
The second section below has the IP Query which essentially ouputs the values derived from the execution of the planning sequence in section above. I have a button group which calls a varaible screen and we have to input the same variable values used in the input fields in the first section.
I would like to know if there is a way we can pass the variable values from section one to section two dynamically? So that once the Button with planning sequence is executed, the IP query also runs in the below section. One more information is the variable sits on the same infobject on both the section which is Fiscal Year/Period.
Thanks Much!
Hi Syed,
We had the same requirement earlier and we solved it by having customer exit varaibles.
Try to implement a ABAP solution which will save your first section varaible value into second section .
Please note that the values from first section varaible will be erased after the completing of planning sequence. So try to save values from first variable to memory and read it from second variable .
1. In first section varaible code, try to save the values of variable to memory using EXPORT comnad.
2. And in second section varaible code,fecth the variable values using IMPORT command
You can check the below link for EXPORT and IMPORT syntax.
http://help.sap.com/saphelp_470/helpdata/en/fc/eb3bd1358411d1829f0000e829fbfe/content.htm
Thanks,
Reshma M.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Reshma,
Thanks for sharing this solution. We tried and were sucessful in passing the values from input fields of web item to the variable used in BW Query. However being in the same tab if we use the IP function with different selection range. The BW variable is picking up the older value and the new value range to output the results. What we need is to only have the latest run variable values being passed to the BW query variable.
Example:
IP Planning Sequence Selection: 001/2009 to 003/2009 (Period/Fiscal Year). For this selection the planning sequence will post the results to 004/2009.
We have configured the BW Query variable to read the To value and add +1 offset. This works sucessfully. Now being in the same session if I select different range (004/2009 to 006/2009), the results will post to 007/2009. Once I execute the planning sequence the BW query is giving us output of both the results (004/2009 and 007/2009).
The BW variable is customer exit with optional/ready for input settings. We would like this option so that user has an ability to report of any other values as well.
Please let me know if there is a way to fix this issue.
Thanks Much!
Hi,
Why are you having multiple selection of BW query variable. Is it required to have it?
Is your IP query variable is also customer exit variable? Please copy your customer exit code here so that can suggest changes to your code.
Try to add REFRESH command before calling variable screen in BW Query planning sequence and check it.
Thanks
Reshma M.
Hi Reshma,
Iam using just one variable in BW Query. The IP Query is a customer exit variable as well. The problem what Iam facing is, when I execute the planning sequence for the second time being in the same session or Tab Page, my BW query is giving me results from first sequence run and second sequence run, where in I need only the latest planning sequence results to be displayed in the report.
Thanks
Also I wanted to add, since the BW Query variable is also a customer exit variable, both the IP variable and BW variable are getting executed in Step1,2, so basically we are not able to control the execution of BW Query customer exit variable. Once the planning sequence is run dynamically the values are being passed to the BW query variable and report is being executed along with the planning sequence.
Thanks
Hi ,
This can be possible whith the solution which i suggested earlier like using IMPORT and EXPORT.
1. First EXPORT your variable value to system memory ID and IMPORT it during second variable execution.
2.If you execute the planning function second time, again EXPORT commnad will be executed and it will overwrite old variable value with new value. So using IMPORT you will get only one value any time.
Thanks,
Reshma M.
Also you can try SET_VARIABLES_STATE command. It will allow you to set variable values at the run time of report execution.
For more details on this command , check the below link
http://help.sap.com/saphelp_smehp1/helpdata/en/44/605a2fb5bd6d11e10000000a1553f6/content.htm
Am not sure what do you mean by ' we are not able to control the execution of BW Query customer exit variable ' .
But you can include SET_VARIABLES_STATE command in the same existing button group, after execution of plannig sequence.
Thanks,
Reshma M.
Hi Reshma,
Here is the exact scenario, we have a web template which encompasses both the IP functionality and the report.
As soon as we execute the template both the the planning function and the report are executed together.
In the query we have set an exit variable with "set ready for input" and the variable as optional.
Hence when the template is executed both the planning function and the query are executed at one go, the planning function brings up the input screen and the query brings the dump related to the planning cube.
As the planning function is still waiting for input no values are passed to the query.
Once we input the values and execute the planning function in the exit variable of the planning function we EXPORT the required ID to a memory ID.
Secondly then we IMPORT these values in the exit variable of the query to read from the memory ID.
Hope this is clear. Pls let me know if you need further details. Thanks.
Hi Reshma,
Its the other way around. I have a planning sequence in the button group. I also have two input fields which are used for user entry values. These input fields are binded to the variables in the button group which also calls a planning sequence. These web items are placed in a container layout which is in-turn placed in the Tab Page Web Item. In the same container layout Iam also calling a BW query by adding Analysis Item and associating the query to it.
Now when I launch the WAD report, I enter the values in the two input fields which are and From and To values for a fiscal year and then I execute planning sequence. When I execute the planning sequence the query is also being executed since it has the customer exit variable which reads value from the IP planning sequence (through input ready fields). I have attached the copy of my report.
When I run the planning sequence for the first time, its all fine. i see the report using the correct values derived from IP variable. When i run the sequence for the second time in the same session, the bw variable picks up the current value as well as retains the older values. SO in the report i get the result of the two sequence run.
Thanks
Sure..
one suggestion, try to debug customer exit code from web applciation ,It will helps to findout the exact place where old variable values are getting saved , so that we can correct the code accordingly.
If possible please copy your customer exit code.
And also please check if you are assigning both from and to values with first variable value and make sure that your are using correct variable in bex query.
Thanks,
Reshma M.
Message was edited by: Reshma M
Please see the code we have put in as below;
code in the planning function exit variable
-----------------------------------------------------------
DELETE FROM MEMORY ID 'ZMEM_SYL_FISCPER'.
FREE MEMORY ID 'ZMEM_SYL_FISCPER'.
w_fiscper = wa_var_range-low + 1.
EXPORT w_fiscper w_sylfiscper FROM w_fiscper TO MEMORY ID 'ZMEM_SYL_FISCPER'.
CLEAR w_fiscper.
code return in the BW Query exit variable
-----------------------------------------------------------
WHEN 'ZSYL_CEVAR01'. |
IMPORT w_sylfiscper TO w_fiscper FROM MEMORY ID 'ZMEM_SYL_FISCPER'. | |
l_s_range-sign = 'I'. | |
l_s_range-opt = 'EQ'. |
IF w_fiscper IS INITIAL. | |
l_s_range-low = '0000000'. | |
ELSE. | |
l_s_range-low = w_fiscper. | |
ENDIF. | |
APPEND l_s_range TO e_t_range. |
ENDCASE. |
ENDIF.
DELETE FROM MEMORY ID 'ZMEM_SYL_FISCPER'.
FREE MEMORY ID 'ZMEM_SYL_FISCPER'.
ENDFUNCTION.
we also checked this through rst2 and we were able to pass the values to the bw exit variable sucessfully. But in wad we are not able to pass it as we think.
THanks!
Try to use "Display Same Variable Only Once" checkbox in Web Template properties.
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 | |
7 | |
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.