Population of Customer Exit Variables in Web Template Queries
Hello,
Desired Scenario:
I have three Queries: Q1, Q2, Q3, attached to one Web Template in the same order. Queries Q2 and Q3 have exit variables which are populated from the Input Variable of Query Q1 (these customer Exit variables are mandatory, not available for user input and are populated in STEP=2).
Problem:
Sometimes on execution of the template, Q1 is executed first and then the exit variables are populted (which is OK) BUT sometimes Query Q2 or Q3 is executed first and exit variables don't get populated.
As such, I am not sure of the order these three queries are executed. Please suggest how do I ensure that Q1 is always executed first, followed by Q2 or Q3.
Thanks for your suggestions.
Best Regards,
Sumita
Hi,
The Infoobjects are different in all the three queries. In Q1, the variable is on 0CALWEEK. In Q2, the variable is on XWEEKD (which is reference to 0CALWEEK). IN Q3, it is on XFORWEEK (which is again reference to 0CALWEEK). So, I can't use the same variable in all three queries. But all these variables have to have the Week from to Week To as the input and that input remains same for all three variables.
To prevent the user from entering this week from & to thrice, we populate the other two in customer exit depending on the value input by the user.
So, now I want to know the order in which the queries attached to a Web Template are executed.
Best Regards,
Sumita
Similar Messages
-
Passing messages from BW customer-exit variables to WebI
Hi
Is it possible to pass messages from a BW customer-exit variable to WebI?
We have a scenario where we have some validation done on a customer-exit variable, and under certain conditions a message should be returned to the user running the WebI report. Ideally, then report should stop executing at this time.
The ABAP is in place, and I can return an error message. If the query is run in RSRT / Web Template, the error message is correctly displayed and processing stops.
However, in WebI, if the error condition is met, a rather messy looking generic error message is displayed. In this case, the error number I've used in the ABAP is 000, which WebI then interprets as somthing to do with query dimensions could not be retrieved, or a null pointer exception.
I am not interested in the WebI error message that is being generated ... I know why it is being generated.
All I'd like to know is whether it is possible to pass an error message from within the customer exit code back to WebI.
Any ideas?
Regards,
AndrewHi,
I think that the problem is the User Exit is called anew for every query, so the global tables you declared will be empty for the query2.
One way to do this is create a table using the SE11 and populate it with the Variable from Query1, and use this data to populate the Variable2 of Query2.
Hope it helps. -
Default value of BeX customer Exit variable not Displayed in WeBI??
Hello Experts,
We are stuck with a problem where WeBI report is created on top of BeX query and we are not able to see the default value of Bex Customer exit variable in WeBI run. Here is the complete scenario:
1. One restricted KF is created in BeX, restricted with Customer exit variable on net Due date. And this variable is mandatory, ready for input, and Default value in calculated is user exit as current Week's Monday.
2. So, by default KF data should be restricted to Monday of current week, if user does not change this value.
3. Now, WeBI report is created on top of this Bex query, and all is working fine, i.e. we are getting variable as Prompt in WeBI, but Default value is not shown while Running the Webi Report.
So, need your inputs on the same, if default values from BeX in WeBI is supported or not? If yes, why this is happening, and how to resolve it?
Please notice, the restrcition is in KF only, it is not a separate restrcition on Net Due date in Filter area or in Defualt area of BeX
and we are on SAP BW 7.1 and BOXI 3.1 SP4.
Regards,
Vipul
Edited by: VIPUL GOYAL on Nov 23, 2011 9:44 PMHi,
See 1285993 - Support of Customer Exit Variables from BEx query into WebIntelligence via OLAP universe
WebI will prompt when executed, but the default values calculated by the user exit - do not appear.
Note: If the BEx variable has property 'ready for input' set / enabled, then its WebI prompt shows ok, but no default value appears.
Cause
This behaviour expected 'by design' (in the context of the product's current limitations) as explained in the online guide below:
Please refer to Chapter 7, page 44, document link here: http://help.sap.com/businessobject/product_guides/boexir3/en/xi3_sap_olap_universes_en.pdf
Characteristic variable > processing type > Customer Exit is "Supported, without user entry"
--> This should be understood as meaning "User will not be shown a prompt"
regards,
H -
Executing customer exit variable in dropdown box. in WAD
hi Experts,
i have implemented two customer exit variables for current month and next síx months in a query and it is working well, and the code for customer exit variable is correct.
we have a requirement to use the customer exit variables in dropdown box in web application designer. in the dropdown box in web application designer i used command SET_SELECTION_STATE_SIMPLE in that 'command specific Parameters' i had given the exit variables current month and next six months.but after executing the web application designer and if i drill down the report with current month and next six months it's giving error message .
can anyone please tell me how to implement customer exit variables in web application designer through drop down box. i am using this in bi7 reports.
Regards
Sruthi ReddyHi,
Customer Exit Variable in SAP BI : is used to calculata MTD,YTD, and some other calculations.
You can define variables with Customer Exits and then write code in CMOD. See the Article/Blogs in the same
https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
CHeck the Following Articles.
Customer Exit Variables in BW/BI Reports
Using Customer Exit Variables in BW or BI Reports Part - 1
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/s-u/using%20customer%20exit%20variables%20in%20bw%20or%20bi%20reports%20part%20-%201.pdf
How to use Customer Exit Variables in BW Reports: Part - 2
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/g-i/how%20to%20use%20customer%20exit%20variables%20in%20bw%20reports%3a%20part%202.pdf
Using Customer Exit Variables in BW/BI Reports Part - 3
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10fc4382-afa6-2c10-1380-fa224fe4324f&overridelayout=true
Using Customer Exit Variables in BW/BI Reports: Part - 4
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0fefc77-40e3-2c10-8da3-d4bfcb013387?quicklink=index&overridelayout=true
Calculating the Ageing of the Materials
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/a-c/calculating%20the%20ageing%20of%20the%20materials.pdf
Thanks
Reddy -
BW customer-exit variable in WebItnelligence
Hi all.
Did anybody try to use BW customer-exit variables in WebI report. In documentstion I've found that this type of variable 'supported without user entry', what does it mean?
Thanks.Hi,
Yes, I have used BW queries in which a customer-exit variable was used and that works fine in WebI.
When you define variables in BW, there is a checkmark saying "Variable is ready for input", i.e. BW customer exit variables are only supported in BO, when this checkmark is not set (which means, that the user can not enter a value directly for the variable).
Best regards,
Jacob -
Customer exit variable to get weekly report
Hi All,
I have a requirement as following. there are 2 user selection variables.
Selection variables are v1: start date: Period Range (d1-d2)
V2: Period : Values should be 1month, 3 months, 6months (these values should be populated from Customer exit variable itself)
The report layout shoud show:
Actual sales by week (for period selected in v1)
Plan sales by week (for period value selected in v2)
Can you please reply with the abap?
Quick replies are much apprciated.
Thanks
SumanHello,
You can try with the following way:
1) Create a new infoobject with master data tick on and load it via flat file with the needed values like 1 month, 2 months etc.
2) Now include this infoobject in the MPRO along with the other infoprovider. If not using MPRO please create and use one.
3) IN the MPRO include and assign this infobject in one of the dimension.
4) Now in the query include this infoobject in the filter and create an user entry variable and in its default value include #
5) Now include calmonth in the query and create a variable of type user exit not ready for input and include iit for calmonth.
6) Now create a user exit for variable on calmonth at i_step = 2.
7) The logic can be simply reading the value from the i_t_var_range table for variable on the new infobject and based on the selection write routine to populate the months needed.
8) Here note that while writing routine please make sure you read i_t_var_range for all values NE #.
9) The only disadvantage is that we need to always include # entry along with other entries.
Hope it helps!!
Regards,
Shashank -
Customer Exit Variable not working in BO-Webi Report
Hi All,
I have created a universe based on Bex Query.
Bex query consists of a customer exit variable on Calendar year/month where in it will populate current calendar year month by default while executing the query. It works fine while executing in SAP BI Bex Analyser.
I have created a universe based on the query. For Calender year/Month i got L00, L01, LOV values in universe.
Based on the universe I have created a Webi report. I did not specify calendar year/month as query filters. While directly executing the Webi report, I get the calendar year/month variable screen. But the value for it not populated based on customer Exit code written in BI.
What has to be done to get the customer exit values in variable screen.
Thanks for your understanding.
-- SelvaSince you have customer exit variable in your bex query, it will be like a global filter in your universe.
Execute the webi report and check whether you are getting only current month data.
--- Thanks -
Query: Customer Exit variable not getting populated
Hello Experts, I created a Customer Exit variable (ZPREV_MTH_OPS) in the query designer (7.0). I also put the necessary code in the function module "Z_BWFI_QUERY_CELL_MANIPULTN", but the query variable is not getting populated when I run the query using RSRT. The boxes for "Variable is ready for input" and "variable is without context" boxes when defining the variable.
This is my code in the exit:
case i_vnam.
when 'ZPREV_MTH_OPS'.
break-point.
if i_step = 2.
clear l_s_range.
if sy-datum+4(2) = '01'.
wa_prev_month = '12'.
wa_prev_year = sy-datum+0(4).
wa_prev_year = wa_prev_year - 1.
else.
wa_prev_month = sy-datum+4(2) - 1.
wa_prev_year = sy-datum+0(4).
endif.
concatenate wa_prev_year wa_prev_month '01' into wa_datum.
call function 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
exporting
day_in = wa_datum
importing
last_day_of_month = wa_datum2.
concatenate wa_prev_year wa_prev_month '01' into wa_datum.
* l_s_range-low = wa_datum.
* l_s_range-sign = 'I'.
* l_s_range-opt = 'BT'.
* l_s_range-high = wa_datum2.
* l_s_range-sign = 'I'.
* append l_s_range to e_t_range.
l_s_range-low = '20080901'.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
l_s_range-high = '20080930'.
l_s_range-sign = 'I'.
append l_s_range to e_t_range.
endif.
endcase.
I also put a break point the exit, but it's not coming to the breakpoint.
Any suggestions?
Thanks.Josh, the link you provided reminded me to include the code in the include ZXRSRU01 also, instead of just changing the function module. Thanks for your help and all those who tried to help me.
case i_vnam.
when 'ZREL12MTH' or 'ZPREV_MTH_OPS'.
call function 'Z_BWFI_QUERY_CELL_MANIPULTN'
EXPORTING
i_vnam = i_vnam
i_vartyp = i_vartyp
i_iobjnm = i_iobjnm
i_s_cob_pro = i_s_cob_pro
i_s_rkb1d = i_s_rkb1d
i_periv = i_periv
i_t_var_range = i_t_var_range
i_step = i_step
IMPORTING
e_t_range = e_t_range
e_meeht = e_meeht
e_mefac = e_mefac
e_waers = e_waers
e_whfac = e_whfac
CHANGING
c_s_customer = c_s_customer.
endcase. -
WAD Variable screen not displaying when using a customer exit variable
Hello,
I have a query which has 3 variables, one of which is of type customer exit and gets populated with a default value.
When I run this query on the web from within BEX it works fine, however when I run it within any BI7 web template the variable screen does not pop up. Of course if I remove or change the offending customer exit variable the variable screen pops up.
I have switched the display variable check-box to on, and it still doesn't work.
Is this a 'feature' of BI7?
Many thanks
SarahFixed it myself by tweaking the URL....
Added &VARIABLE_SCREEN=X to the end of the url and the variable screen now pops up. Its not an ideal solution but it works.
Anyone have any better ideas? -
Change customer exit variable in selections over Dropdownbox
Hello Experts,
we are on NW2004s, SP12.
I have a customer exit variable (0CALYEAR) in two columns. In the first column the customer exit variable and in the second column the customer exit variable with an offset -1.
Now I want to change the year in a dropdownbox. Under <=BW3.5 that was not possible, only over a how to paper.
I can fill the dropdownbox in the web template but when I change the year, it jumps back to the year selected by the customer exit. How can I change the variable in the new web application designer (2004s) during the navigation? Has any one experience with such a problem?Hallo Frank,
how can I change the variable values in the WAD?
The parameters of the variable: mandatory, customer exit, reference characteristic: 0calyear, single value, not ready for input.
My coding:
DATA: l_s_range TYPE rsr_s_rangesid.
DATA: i_s_var_range TYPE rrs0_s_var_range.
DATA: i_calyear(4) TYPE c,
i_duedate(4) TYPE c.
IF i_step = 1. " Variable nach Selektionsbild bearbeiten
READ TABLE i_t_var_range
WITH KEY vnam = 'CALYEAR_X01'
INTO i_s_var_range.
i_calyear = i_s_var_range-low.
i_duedate = '0210'.
IF sy-datum+4(4) GE i_duedate.
i_calyear = sy-datum(4).
ELSE.
i_calyear = sy-datum(4) - 1.
ENDIF.
Rückgabetabelle füllen
CLEAR l_s_range. " Range-Tabelle füllen
l_s_range-low = i_calyear.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
ENDIF.
Thank you for your fast reply!
Regards
Jens -
I_step = 2 : Customer Exit Variables
Has anyone had problems with i_step = 2 in customer exit variables in 2004s queries and web templates.
When the web template is first executed the call takes place directly after the variables values are entered. This works as expected.
If you return to the variable screen to change the variable values the call does not take place.
We are on SP11.
I have tested the same customer exit variable using a 3.5 Query and Web template and it works in both cases explained above.
Has anyone had a similar problem?Hi MM
Thanks for the pointer. Unfortunately this did not help.
It is interesting to note with 2 identical queries, 1 developed in the 3.5 Query Designer and the Other in the 2004s Query Designer.
Both queries have the same customer exit variable. The variable exit is called correctly on all calls (1st and 2nd) when the 3.5 query is executed.
The 2004s query does not yield the correct result in the new BI Web runtime.
Also as we have just applied SPS11 to our development system, only our Development System has been effected. Our QA and Production systems on SPS 10 are not effected.
Cheers
Ian
PS> I have submitted a OSS note to SAP.
Message was edited by:
Ian Carbonel -
Error in the ABAP Code for Customer Exit Variable
Could you please update me what is the wrong with the below ABAP Code developed for Customer Exit Variable in BW
i created a Variable (ZVWKNO) of Customer Exit,Single Value ,Mandatory and Variable is ready for input
In CMOD i had written the below Code:
When 'ZVWKNO'.
DATA: WEEK(2) TYPE N,
WEEKNO(2) TYPE N.
IF i_step = 1.
l_st_date = SY-DATUM.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
DATE = l_st_date
IMPORTING
WEEK = l_fn_week.
CHECK sy-subrc = 0.
WEEK = l_fn_week+4(2).
If WEEK 0.
WEEKNO = WEEK - 1.
l_s_range-low = WEEKNO.
l_s_range-sign = k_sign_inclusive.
l_s_range-opt = k_option_equals.
APPEND l_s_range to e_t_range.
ENDIF.
ENDIF.
But when i execute the query the default value is not populated with Week-1 No in the variable screen
Please update me what went wrong
ThanksCase ZVWKNO. "write this with out comments
When '1'. "write the value that needs to equal with value in varaible ZVWKNO after when in sungle quotes
DATA: WEEK(2) TYPE N,
WEEKNO(2) TYPE N.
IF i_step = 1.
l_st_date = SY-DATUM.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
DATE = l_st_date
IMPORTING
WEEK = l_fn_week.
CHECK sy-subrc = 0.
WEEK = l_fn_week+4(2).
If WEEK 0. "check this Week Minimum is '01' and Maximum '52'
WEEKNO = WEEK - 1.
l_s_range-low = WEEKNO.
l_s_range-sign = k_sign_inclusive.
l_s_range-opt = k_option_equals.
APPEND l_s_range to e_t_range.
ENDIF.
ENDIF.
Prabhudas -
Problem with customer exit variable in BeX Query
Hi All,
We have created a customer exit variable in a query and populated with few patterns in customer exit.
My query has to bring all the records where the address line is containg the patterns passed through customer exit. Here the query is not working as expected.
It is bringing the values where the address line is exactly same as the pattern and not bringing the records where the pattern is part of the address line.
For example: Pattern passed in customer exit = 'HOSPITAL'
The record where address line = 'HOSPITAL' is shown in the rpeort, where the record with address line = 'HOSPITAL ROAD' is not shown in the report.
I would appreciate your help on this.
Regards,
RakeshHi Diogo,
Below is the code I am using in the customer exit.
SELECT * FROM zae_tt_pbuild INTO TABLE gt_pbuild.
IF sy-subrc = 0.
LOOP AT gt_pbuild INTO gs_pbuild.
CONCATENATE '*' gs_pbuild-pbuild '*' into lv_pattern.
ls_range-low = lv_pattern.
ls_range-sign = lc_sign_i.
ls_range-opt = 'CP'.
APPEND ls_range TO e_t_range.
CLEAR: ls_range,
lv_pattern.
ENDLOOP.
ENDIF.
ENDIF.
I have tried using '%' instead of '*' aswell but the result is same.
Thanks,
Rakesh -
Behavior of customer exit variables (used as prompt) in a workbook
Hi All,
We are on NW2004s. I am using a customer exit variable in the prompt for my query then saved the query as a workbook.
1. When I run the query the customer exit routine/program is called and the selection screen variable is populated with the correct value.
Ex. Calendar year variable is a prompt variable defined as customer exit variable that gets the current year.
when you run the query the prompt for calendar year shows "2007" as default value. this is correct.
2. when I run the workbook using this same query, it looks like it is not executing the customer exit program. The value in the calendar year prompt is whatever the last value used when the workbook was last ran.
I also placed a breakpoint in the customer exit program (EXIT_SAPLRRS0_001) to check if it is being called and it looks like it isn't.
Is there a configuration/property that I should enable/check to make sure that customer exit variables used as prompts works in workbooks? Is this a bug? Anybody else have issues with using customer exit variables as prompts in their workbooks?
Thanks in advance,
MalouHello Marilou,
See the abswer I got from the 1st response on my question
Save and reuse variable option in 7.0
It may be a good help.
Variables seem to be an understated item in the documents.
Kind regards
Message was edited by:
BI developer -
How to insert a code for a function module into a Customer Exit Variable?
I have two Key Figures viz., Net Prchs Rtl, and Net Prchs Unt. Both these Key figures have This Week (TW) and Last Week (LW). There is a variable for This week but there is no variable defined for Last week.
I need to get data in the column LW (Last Week) for both the key figures.
In function module EXIT_SAPLRRS0_001 one of the functions I have is:
Get the previous Fiscal Week
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
I need to create a new variable to get values in the Last week column for different key figures and use function 'DATE_TO_PERIOD_CONVERT' in that variable.
Can anyone please explain me the steps as to how to use a function module in a variable so that when the variable is used in a key figure it shows the output.
In other words what I want to know is after creating a Customer exit variable of type Characteristic value how do I refer the above mentioned function moduel and insert the code for the function module into the Customer exit variable that I created.
Thank you.
TR.Hi Wond,
Thanks a lot for your reply. I understand what you mean but I have never done this before so can you please explain it in a detailed manner. I have the following code:
Get the previous Fiscal Week
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = ld_date
i_periv = lc_periv
IMPORTING
e_buper = ln_poper
e_gjahr = ln_bdatj
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
lc_poper = ln_poper.
CONCATENATE ln_bdatj lc_poper+1(2) INTO wa_e_t_range-low.
wa_e_t_range-sign = 'I'.
wa_e_t_range-opt = 'EQ'.
APPEND wa_e_t_range TO e_t_range.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
I believe I should now use the above code in my customer exit variable. If that's right can you please explain me the steps as to how should I do this so that the variable gets populated.
Thank you.
Regards,
TR.
Maybe you are looking for
-
I have a library (Library6.iPhoto) and it won't open...
I tried to open it and it said I needed to update my iphoto, which then led me to updating my operating system. I still cannot open the library. HELP! I tried to hold the command and option keys down while opening the library, and it brought me to
-
Importing Development Objects in Integration Repository ?
Hi , How do i import development objects that have been exported ? e.g , i export a "message mapping" object using Tools->Export Development Objects, could see it stored in a folder in the XI server m/c , however , when i try import development objct
-
I am be Blocked by a scand place call Trend Micro Titanium Internet Secuity. I can't even get in to Microsft with a notes comes up saying DANGEROUS BLOCKED this was install by a place in LA I think. The sofware was install by a place call P C SPEEDY
-
MSS Content only seeable over "Open in New Window" Function
Hello, we have established EP 7.0 with SP10 and MSS. First we saw all the content in the Webdynpros-iView in Portal. Now we can see this content only if we click onto upper right corner and select "Open in New Window". This works with all users activ
-
Hi Experts, I would like to ask you is it possible to organize the warehose activity using barcode solution without WMS? Regards