Clearing out user entered variables
I have a BI 7.0 query that displays materials that have not moved in 'X' number of days.
1. My variable screen shows "No movements since <blank>". The user enters a number in this variable (ZV_NUM_DAYS)
e.g. 90.
2. I created a variable (not ready for input) on the movement_date field. This variable gets populated by a range of dates based on the "Number of Days" entered by the user in I_STEP2 of the variable exit.
eg. LOW = 19000101
HIGH = SY-DATUM - the value from user entered variable
I still need to clear out the user entered variable ZV_NUM_DAYS so that a filter of '90' does not get applied to the cube.
I cannot clear out ZV_NUM_DAYS in I_STEP2 as it is user entered. I tried doing so in I_STEP3 - clear out E_T_RANGE for the variable. The debugger shows me E_T_RANGE cleared out however it still sets the filter of '90' in the cube.
Any thoughts on how to clear user entered variables ?
Regards,
- Ash
Thanks for your responses.
@Arunkumar - could you please elaborate on this option ? I don't know of a way to create variables on key figures.
@Dennis - I tried turning the cache off - no effect. Turns out when I change e_t_range values in STEP3, it does not save the change somehow. Although the debugger displays the modified table data.
Regards,
Ash
Similar Messages
-
User exit on User entered Variable
Is it possible to run a user exit that will filter for a particular date, based on what the user enters. For example if the user enters the day May 20, 2008. Can instead filter the report for May 18, 2008 (Always Sunday). How do I go about doing this? I have the code to find the Sunday date, just having difficulty getting it to executing after the user has entered a date.
Hi Vendant
You will need 2 variables, the one the user enters the date against and another customer exit variable executed in step 2 that takes the input date and returns it to sunday.
This CMOD code might help, you may need to tweek it to cater to the date format you use
CASE i_step.
WHEN 2.
CASE i_vnam.
WHEN 'Tech name of customer exit var'.
DATA: loc_var_range LIKE rrrangeexit,
l_s_range TYPE rrrangesid.
DATA: i_t_var_rec LIKE LINE OF i_t_var_range.
DATA: l_text(10) Type C.
READ TABLE i_t_var_range INTO loc_var_range
WITH KEY vnam = 'tech name of first date var'.
use your code to find sunday here on the loc_var_range-low, this is the value the user entered.
you will need to assign loc_var_range-low to a variable like l_text as you cant manipulate it directly
l_text = loc_var_range-low.
l_s_range-low = the result of your find sunday code.
l_s_range-high = ''.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
ENDCASE.
ENDCASE.
Hope this helps
Cheers
Josh -
I am trying to create a form in LiveCycle 8 where a user who has the form open can enter in information, and that information then populates into different locations on the page.
Say that there is a drawing of a door. I'd like there to be a form where they enter the width and height, and those numbers that they enter are then put in their corresponding location on the drawing. Any help would be great!!I had something similar and it was because the denominator was a zero before the user entered the variables. It was fixed with an "if/then/endif".
It looks like the problem in yours is form1 being zero. Try
if([YOUR DENOMINATOR]>0)then[YOUR FORMULA HERE]endif
Example:
if(form1>0)then(this.rawValue=form1.#subform[0].NumericField4.rawValue / form1.#subform[0].NumericField5.rawValue)endif
Your formula is a bit more complicated than I can decipher, so I'm not sure how much after the "/" you need to include to capture the part of your denominator that is making it null. You may need to insert everything after the "/" in the ">0" parameter. The goal is to tell it only to execute the calculation when the denominator is greater than 0. -
Clear BPS user-specific variable values
Hi,
Is there a way to quicly delete all the variable values (user ID and cost center) for a user-specific variable in BPS without access to the configuration (BPS0) or do I need to write a small piece of ABAP for that ?
Thanks
DavidHello David,
You either have to access the BPS0 and delete each of the variable values or write a little ABAP program. You could include this ABAP in a planning function type Exit so the user can press a button in a web interface or planning folder to delete the settings. The coding using internal methods you need is:
DATA:
lr_variable TYPE REF TO cl_sem_variable.
Get variable instance
CALL METHOD cl_sem_variable=>get_instance
EXPORTING
i_area = 'name of area where the variable is defined'
i_variable = 'name of the variable'
RECEIVING
rr_variable = lr_variable
EXCEPTIONS
not_existing = 1
OTHERS = 2.
IF sy-subrc <> 0.
do s.th., eg send a message
EXIT.
ENDIF.
delete the restrictions
CALL METHOD lr_variable->set_user_restriction
EXPORTING
i_user = 'user name, e.g. sy-uname'
i_delete = 'X'
EXCEPTIONS
failed = 1
OTHERS = 2.
Best regards,
Gerd Schoeffl,
SAP NetWeaver RIG BI -
How to Get User entered value in a text variable
Hi,
I have made a text variable to show the user entered value in the column header.
The user enteres value in a formula variable ABC whose default value is say '30'.
I am using customer exit to capture this value in the text variable. The code is as follows
IF i_vnam EQ 'txtvar'.
if i_step = 2.
LOOP AT i_t_var_range INTO loc_var_range
WHERE vnam = 'ABC'.
CLEAR l_s_range.
l_s_range-low = loc_var_range-low.
l_s_range-opt = 'EQ'.
l_s_range-sign = 'I'.
APPEND l_s_range TO e_t_range.
EXIT.
ENDLOOP.
endif.
endif.
Now when I am executing the query I am getting the default value in the column header i,e, 30. But when the user changes this default value to something else while executing the query, I simply get blank in the column. The changed value is not getting captured in the text variable.
ThanksHi,
Insted of going for exit,
just create a Text variable proceesing typr Default/ Manual Entry and set the default value as u wish,
use it in the KF header; dont use the same Text Variable for Query Title.
Now i tried this for you and it is working fine.
Regards
ReddY A -
Clear Flag for BPS user-specific variable values
Hi Experts!
I have a 'user-specific variable' settintg with the flag 'on', then the user should choose only one value.
But now I need execute an abap program which read all values available for this variable. For this reason, I need clear this flag with abap code, and after put on again.
Could somebody show me a small piece of abap code for this?
Thank you in advance!Hi,
Analysis of your question:
<i>Second line of your question "...<b>which read all values available for this variable</b>".</i>
1) When you mean you wish to read all possible values with which the variable could be filled up, then please use the Function Module:
UPC_CHA_VALUES_GET
The parameter <b>ETO_CHAVL</b> would then return all master data of the variable's characteristic
2) When you mean you wish to read all the variable values "<b>selected from the user in the past</b>" then use the function module
API_SEMBPS_VARIABLE_GET_DETAIL
Here the table <b>ETK_VARSEL_ALL</b> returns you all the values selected by user in the past. The "<b>current selected value</b>" for the user is stored in the table "ETK_VARSEL".
Check out these How-To Documents. If these dosen't suffices, then please elaborate your requirement, for me to write a ABAP Pseudo-code.
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/324de5a1-0201-0010-dc9a-a093cde87bb5">How to use Reporting Variables in BPS</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/650ee690-0201-0010-4bb7-83c3e2a74039">How to variable of type Exit</a>
Many regards. -
Not able to clear out a formula field value when variables are equal to 0
I am trying to calculate the difference between a formula field from a main report and a formula field from a subreport. When i run the report i get a correct difference calculation only when both formula fields have a value different than 0. When both values are 0 then the difference calculation shows the last item quantity from the formula field in the subreport that had different values than 0. It looks like the difference calculation is not being clear out before jumping to the next value calculation.
try to clear the variable values once done with calculation like
whileprintingrecords;
shared numbervar i:=0;
regards,
Raghavendra -
I entered the incorrect password for my home wifi network, and now I can't change it. How do I clear out the wrong password so that I can enter a correct one?
Settings > wi-fi then tap on the little blue arrow next to the network you want to change. You have to tap on the blue arrow and not on the name.
Now at the top tap on "forget this network".
After that, the iPhone will think your home network is a new network and will ask you for the password to connect. -
How to clear the data in my page after user enter submit button
hi......
how to clear the data's in my page after user enter submit button. Actually while pressing first time itself the data is uploaded in database.Hi Nazeer,
Instead of doing it on the same button better create a separate button for this functionality, As per my understanding you want to clear these fields to create new record so that you can enter a new record so for this you just need to insert a new row in VO.
Still if you want to do it on the same button then you need to put the check that particular record is not dirty if it is not then create new record else create new record.
One more thing if you will clear on the second click of a button how will you update your record??
Regards,
Reetesh Sharma -
How do I store and retrieve variables end user enters in Dynamic Pages ?
I have 4 dynamic pages, a user enters in variables on first page. At the next 3 dynamic pages I send the user to I have to display the items they entered on the first page in text items.
How do I pass these variables ????
thanks!ok, so on my page 1 I have the parameter "name", if I use <ORACLE> tags on this first dynamic page they are executed upon entering the form. The user has to enter the data and if the <ORACLE> tags have already executed where do I store the value ?
So where do I issue the wwsto_api_session.load_session (in the second dynamic page or the first one) ?
I can see that I'll use the wwsto_api_session.get_attribute_as_varchar2 ('name') in the second dynamic page with the htp.p - is that right ?
You wouln't have an example you could share with us all do you ? Sure seems like this is confusing to a lot of people. Are there any useful examples of this in the PDK that show how to do this with the HTML included ?
thanks again -
Find out queries which contain user-exit variable
Hello.
I want to get a list of BEX queries, which contain my user-exit variable, defined in ZXRSRU01. Could anybody tell me how I can achieve this?Hello, Konstantin.
You can use differnet methods to do this.
Method №1.
You can open one (any) query, that uses your variable in Metadata repository (active objects). If you don't know such query - you can create it.
In the description of your query you can find which variable is used by this query.
Open your variable.
There you can find all queries, that uses you variable.
Method №2.
Open SE11. Choose table RSZELTDIR.
Determine ELTUID of your variable (OBJVERS='A',MAPNAME=Variable ID).
Open SE11. Choose table RSZELTXREF.
Select ALL SELTUID with OBJVERS='A', TELTUID=ELTUID (see above), LAYTP=VAR
Open SE11. Choose table RSZELTDIR.
Select all MAPNAME with OBJVERS='A', ELTUID=lists of SELTUID (see above)
You can take texts from table RSZELTTXT.
Best regards,
Alexander Kuzmich -
Value for user-exit variable is invalid
Hi Gurus,
My Value for a Fiscal Year Prd returns a invalid value for the 12th month of each year( for Example 12/2004, returns the error "Value 200313 for User-exit variable is invalid.
This is the code that is being used.
*Rolling 12 months for entered month
when 'ZCALM12'.
clear: v_mth, v_yr.
REFRESH E_T_RANGE.
CLEAR L_S_RANGE.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = 'ZCALMON'.
exit.
endloop.
v_yr = LOC_VAR_RANGE-LOW+0(4) - 1.
v_mth = LOC_VAR_RANGE-LOW+4(2) + 1.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
concatenate v_yr v_mth into L_S_RANGE-LOW.
L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
APPEND L_S_RANGE TO E_T_RANGE.
Thanks in Advance.Hi Ravi,
when 'ZCALM12'.
clear: v_mth, v_yr.
REFRESH E_T_RANGE.
CLEAR L_S_RANGE.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = 'ZCALMON'.
exit.
endloop.
<b>-->> Here, you are not checking any thing.</b> <i>On which logic you are reducing year by one and increasing month by 1..?</i>
v_yr = LOC_VAR_RANGE-LOW+0(4) - 1.
v_mth = LOC_VAR_RANGE-LOW+4(2) + 1.
-->><i>IF month is 200512 you will get output from above code is :</i> please check.
v_yr = 2005 - 1 = 2004
v_mth = 12 +1 = 13.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
concatenate v_yr v_mth into L_S_RANGE-LOW.
L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
APPEND L_S_RANGE TO E_T_RANGE.
Try to debug the code by keeping break point after When. and execute the report, you will be debugging mode.
Hope it Helps
Srini -
How to find out user exits of t-code va03
hi all
how to find out user exits of any t-code .
regards
deepakHi Deepak,
<b>Try this code.</b>
*& Report Z_USEREXIT *
REPORT Z_USEREXIT
NO STANDARD PAGE HEADING.
*& Enter the transaction code that you want to search through in order
*& to find which Standard SAP User Exits exists.
*& Tables
TABLES : tstc, "SAP Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
*& Variables
DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA : field1(30).
DATA : v_devclass LIKE tadir-devclass.
*& Selection Screen Parameters
SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK a01.
*& Start of main program
START-OF-SELECTION.
Validate Transaction Code
SELECT SINGLE * FROM tstc
WHERE tcode EQ p_tcode.
Find Repository Objects for transaction code
IF sy-subrc EQ 0.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'PROG'
AND obj_name = tstc-pgmna.
MOVE : tadir-devclass TO v_devclass.
IF sy-subrc NE 0.
SELECT SINGLE * FROM trdir
WHERE name = tstc-pgmna.
IF trdir-subc EQ 'F'.
SELECT SINGLE * FROM tfdir
WHERE pname = tstc-pgmna.
SELECT SINGLE * FROM enlfdir
WHERE funcname = tfdir-funcname.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'FUGR'
AND obj_name = enlfdir-area.
MOVE : tadir-devclass TO v_devclass.
ENDIF.
ENDIF.
Find SAP Modifactions
SELECT * FROM tadir
INTO TABLE jtab
WHERE pgmid = 'R3TR'
AND object = 'SMOD'
AND devclass = v_devclass.
SELECT SINGLE * FROM tstct
WHERE sprsl EQ sy-langu
AND tcode EQ p_tcode.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
SKIP.
IF NOT jtab[] IS INITIAL.
WRITE:/(95) sy-uline.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
WRITE:/(95) sy-uline.
LOOP AT jtab.
SELECT SINGLE * FROM modsapt
WHERE sprsl = sy-langu AND
name = jtab-obj_name.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
WRITE:/1 sy-vline,
2 jtab-obj_name HOTSPOT ON,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
ENDLOOP.
WRITE:/(95) sy-uline.
DESCRIBE TABLE jtab.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No of Exits:' , sy-tfill.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'No User Exit exists'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'Transaction Code Does Not Exist'.
ENDIF.
Take the user to SMOD for the Exit that was selected.
AT LINE-SELECTION.
GET CURSOR FIELD field1.
CHECK field1(4) EQ 'JTAB'.
SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
<b>plz reward points if helpful or if it solves ur query.</b>
Thanks
Chinmay -
How do I add a number from one field to another then clear out the first field
In a form I am creating I have a field or a series of fields that have variable numbers in them. I would like to create another set of fields that when I click on a button (or some other method) will add whatever number is placed in another field to that first field.
For example:
Text1a is normally a variable field. I have another field (text2a) that I input another number into. I normally add these two numbers together manually and the total replaces what was in Text1a.
Text1a = 4, I enter in a 2 in Text2a, so now Text1a will become a 6. I would like to have it so that when I click on a button it automatically adds the two numbers together and then replaces the current number in Text1a with the new total and also clears out the number in Text2a.
Note: Text1a and Text2a are columns where the next filed down is Text1b and Text2b and so on.
Can someone please help me on this?
BruceIf you have a nanoSIM that is for your cell provider just activate it and it should set it up.
-
Funtion Module for user exits variables in BEx Queries.
Hi,
This is for BW Query customer exit variable (zvar2) for include ZXRSRU01 and exit :EXIT_SAPLRRS0_001.
Can anyone please suggest the function modules that can be used to do the following.
1)Read value of zvar1 from selection screen whatever
user enters at run time.
2)How to define the zvar2 in the include. zvar2 is the
variable created in BEx to be populated from this
customer exit.
3)How to use case statment where once the value for zvar1
is determined then,
Case zvar1.
when zvar1 = 0 , then zvar2 = 10
when zvar1 = 1 , then zvar2 = 20
3) Assign zvar2 value as computed in the case statement.
Can anyone please help with the code to achieve this.
Any information regarding function modules that can help write user exits for variable reading and input will be greatly helpful.
Thanks
Sarah.Hi Sarah,
You don't need any FM for your issue.
Please try thie sample code :
DATA: VAR_INPIUT LIKE RRRANGEEXIT.
CASE I_VNAM.
WHEN 'ZVAR2'.
CLEAR L_S_RANGE.
IF I_STEP = 2."PROCESSED AFTER VARIABLE INPUT
*Reading value of ZVAR1
LOOP AT I_T_VAR_RANGE INTO VAR_INPIUT
WHERE VNAM = 'ZVAR1'.
CASE VAR_INPIUT-LOW.
*FILLING ZVAR2
WHEN 0.
L_S_RANGE-LOW = 10.
WHEN 1.
L_S_RANGE-LOW = 20.
ENDCASE.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDLOOP.
ENDIF.
ENDCASE.
Hope this helps
Joe
Maybe you are looking for
-
How do I unlock the sim card if my iPhone 5 has not been activated?
I gave my iPhone 5 to my mom, so I restored it first (by going through Find my iPhone and deleting the phone and restoring it), and now my mom got a new nano sim card. When I enter it into the phone, it says "Your iPhone could not be activated becaus
-
JPA Error "No Persistence provider for EntityManager",using org.eclipse.per
Hello Colleagues, I have created JPA project, with out any error have done mapping also. with orm.xml and persistense .xml I am getting No Persistence provider for EntityManager error when calling Entity Manager in Entity class Error >>> EntityManage
-
Can't delete a network I've created
Hi, How do I delete a network that I've created using tool bar > airport > create new network. I've created three not knowing what I'm doing, surprise surprise, I want to keep the name of the third but want to delete the first two which are constantl
-
Editing RAW (*ORF) in Photoshop10
Hi i have photoshop elements 10 and cant edit RAW files in the ORF format, although my camera (EPL5 Olympus) is in the list. I tried to download and install a recent RAW plugin, but this didn't help. Tips are very welcome!
-
Hi all, I have a table with only one col..called...Rno...with unique..constraint. In this table i can enter more than one null value...If i can enter more than one null value...the concept of unique may get false... please explain whether a unique ke