User Entry Variables and CMOD

Hi SDN,
I asked this question last week but did not get a straight answer, so I am trying again. Please do not refer me to PDF's on 'How to create Customer Exit variable', that is not the issue. Following is the problem.
User enters a value in a User Entry type variable. We use that value to create a new set of restrictions using CMOD/Customer Exit. However, we then want the value in the first variable to go away or become ineffective.
Or does anyone know the actual run time structure where OLAP keeps the variable values after step 2 so we could changes there?
Thanks.
SM

Surely, you can just delete the value of the 1st variable, or remove it from teh variable table.
You could do this in i_step = 2, once you have computed the value of your new variable
Inside CMOD, the variables are all stored within i_t_var_range. I don't see why you can't just loop at that table until you find your 1st variable, then delete it from that table.
If you can't delete, then loop through the table, and check each line. If the variable in question is not your 1st one, then add it to a temp table. Continue till all records have been evaluated, then refresh i_t_var_range and move the contents of the temp table into i_t_var_range.
Cheers,
Andrew

Similar Messages

  • User Entry variable - AND condition

    Hi,
    The requirement is, if the user enters two materials A and B, the query should pull out all the transactions with BOTH materials in it.
    If the user entry variable with selection option is used, it pulls out the records even if one of the materials exist (OR condition).
    Is there a way to have the AND condition without the use of Customer exit variable?
    Thanks.

    Hi,
    The scenario is like this. Transaction 1 has both the materials A and B. Transaction 2 has only material A. Transaction 3 has only material B.
    Trans.No Material
    1             A
    1             B
    2             A
    3             B
    When the user enters materials A and B, the output should contain only trans.no:1.
    Thanks.
    Edited by: P R on Jan 6, 2009 2:52 PM
    Edited by: P R on Jan 6, 2009 2:57 PM

  • Query problem - authorization and user entry variable as filter

    hi,
    I made two variables for the characteristic 0COMP_CODE.
    The first variable is a user entry variable for the selection.
    The second variable is my authorization variable with multiple single values.
    This two variables are defined as filter in the query.
    The problem is as follows:
    A user is authorized to see the data from three companies. For example companies 1, 2 and 3.
    Now he enters on the selection for the 0COMP_CODE the value 2 to see only the data of this company. The query result gets me confused. It shows all data of the companies 2 and others. It basicly shows more companies than he has selected.
    Other companies of the authorization variable are shown.
    It works if the user has the authorization over all companies.
    Did someone has the same problem?
    Thanks for your help/advice.
    regards,
    Pascal

    Hi Pascal,
    this is an issue. The main problem is that you just can't influence via the exit for a vairable "ready for input".
    What could be done is define a dummy element (hidden in the final display) in your query like a restricted KeyFigure to a variable based on COMP_CODE; let's say VAR1 ready for input.
    You char COMP_CODE would then be filtered by a variable not ready for input processed by user exit, VAR2.
    The exit would ready VAR1. If there any value complying with the authorized one then populate VAR2 with it, otherwise remove it (you could use STEP_3 to raise a message "you aren't authorized to use comp_code XYZ" and return to the initial variable screen). If VAR1 is empty, then populate VAR2 wit all corresponding aithorized values.
    The main issue is that
    1- this is bypassing the standard functionality of authorization variables
    2- any report would have to be designed like that!
    What we have done is to add nav_attr / and added more IObjs in the InfoProviders related to 0COMP_CODE reflecting a country, region or any other group of comp_code authorization and then have based our authorizations on those nav....
    hope this helps...
    Olivier.

  • Need help with transporting User Exit Variable in CMOD ZXRSRU01

    Hello Gurus.,
                      I changed the existing user exit variable in CMOD ZXRSRU01.,before changing neither it ask for any transport request,  nor when I activated the include program .
    Well., I tried this........I went to goto-> Object Directory Entry.,
    changed the Package and person responsible for and then it asked for transport request...but this dint work...
    Now., how can I capture the changes in a transport request, so that, i can move the changes to production system?
    is there anyway to solve my problem?
    Regards,
    PNK

    Thanks for ur help VIKRAM...i solved the issue...the changes are captured in someother request, but it was not showing in the Version Management.'
    I checked the Lock Overview in the Object DIrectory Entry and found out that it was capturing in different request. I released the request and when I tried to change the code, it asked for new transport request.
    It worked..
    Thanks for your help..
    Regards,
    PNK

  • User entry variable with exclude values

    Hello All,
    I created a  user entry/ default value variable, which allows multiple single values and is optional entry. And I also got to exclude few values from this infoobject as well as have a variable.  When I select and exclude my value from selsction and run the report, I get a system error and the varibale is converted to mandatory entry. The detail error message is displayed below.  Any useful input will be awarded
    Diagnosis
    Variable &V1& is used in the query in such a way, that an optional entry is not possible.
    For example, you might be using an "Exclude", or the variable might be connected using OR to additional selections for &V2& in the global filter, but is still displayed in the columns selections.
    It is also not possible to use an optional parameter variable to fill an interval selection in either the from-field or the to-field.
    System response
    Procedure
    If you are able to accept the mandatory entry, you need not do anything. Otherwise you must work with several variables in the query. You can use an optional interval variable to do this.
    Procedure for System Administration

    Hello ,
    I did try creating a variable with the foll details:
    Variable Type : User Entry / Default Value
    Variable Represents : Multiple Single values
    Variable entry optional
    When I run the query it converts my variable to mandotary entry.  but I want to have optional user entry variable.
    Any help will be awarded

  • How to show all the user entry variables in a workbook.

    Hi,
    My user need to see in the workbook all variables he had entered in the variable entry popup at the openning of the workbook.
    I know how to show all the variables, included the hardcoded variable in the query (with a text element, select the checkbox "Display All Statics Filters"), but I need only the user entry variables.
    There is a way to print only these variables?
    Thank you

    Thanks, but the problem is that this workbook is my Global default workbook used for all the queries. So I only want the user entry variables visible automaticly.
    There is a way to do that ?
    For information, i'm using Netweaver 7.
    Thank you

  • SAP exit  -- user entry variable

    Hello,
    In my report i need two columns: one is for displaying the value of the current period and the other one is for displaying the cumulated value up to the current period. The info object is 0FISCPER.
    1. The current period should be entered via user entry and based on this, an exit variable should pick up the year's cumulated value. Which variables could I use to fulfill these requirements?
    2. Furthermore i have looked in SE37 to find the code of SAP Exit variable "0FYTCFP". However, the FM for the variable doesn't seem to exist. Why? The variable however exists in table RSZGLOBV. How do I find the code?
    Thanks in advance,
    F C

    If you are gonna use fiscper as a variable parameter, your requirement would need a customer exit. 
    If i get it right, the first would column should be derived from the user entry which wont be possible with the suggested SAP exit as that would bring the current fiscalyear/period (based on sys date) not giving the user the option to enter the fiscalyear/period. And the second column should be a YTD for that particular year the user has entered as a input parameter. the suggested SAP exit will again be calculating based on ur system date not on the user input.
    the only way you can overcome this is if you have the flexibility to use fiscalyear and posting period seperately. if you can do that, you can avoid the customer exit. the procedure would be -
    You can create ur own variable of type user entry on fiscalyear and posting period.
    the first column would have ur KF further restricted by fiscalyear and posting period restricted by the variables you created ... so in the 1st column you would get the value for that period.
    in the second column, the selections would be same (KF further restricted by fiscalyear and posting period ) but while restrict posting period make it a value range - and in the range pick period 1 - the variable u created, that would give you the YTD from period 1 to the user entered period.

  • Simple Feed from user entry variable to customer exit

    Requirement, I am trying to populate the user entry date from variable single value
    <b>ZP_userent'.</b> and then feed that date to customer exit variable <b>'ZP_custexit'.</b> to calculate the range User entry date --  '01012099'.
    but it is not populating any values in report
    Error can not populate 'ZP_custexit'. Please correct error i think date format is not correct
    DATA: L_S_RANGE TYPE RSR_S_RANGESID.
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
    IF I_STEP = 2 AND I_VNAM = 'ZP_custexit'.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZP_userent'.
    CLEAR L_S_RANGE.
    L_s_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(8).
    L_S_RANGE-HIGH = '01012099'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.
    Thanks
    Soniya

    Hi,
    May be a simple solution remove
    CLEAR L_S_RANGE.
    And probably it'll be ok
    Best regards,
    Christophe

  • Assigning a customer exit variable to a user entry variable

    Hello all,
    I'm creating a PCA query and would, in a certain column, like to show the year's cumulated value (key figure amount), based on documents posted up until a certain posting period (specified via a user entry). E.g. from 01.2006 to [user entry] where the "from"-year is also dependent of the user entry.
    1) Where do I do this coding (transaction code/function module etc..)?
    2) How do I do this coding?
    3) Does this kind of variables exist as standard? If yes, which one?
    Thanks!!!
    Best regards,
    Fredrik

    Hello again,
    I have now created a new input variable named 'Z_FPER' (single value)  which I want to read into the exit variable...
    I debugged the query and found out that the value of I_STEP is 1, which is wrong. It should be I_STEP = 2... However, I have definied my user exit variable as "no input" and "mandatory". What else should I do to make it a '2'?
    Thanks,
    Fredrik
    P.S. This is the code:
    *&  Include           ZXRSRU01
    DATA: L_S_RANGE TYPE RSR_S_RANGESID.
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
    CASE I_VNAM.
    WHEN 'Z_FISCPE'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'Z_FPER'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4)."low value, e.g.200001
    L_S_RANGE-LOW+4(3) = '001'.
    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW. "high value = input
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.
    ENDCASE.

  • User Entry Variable - brings back date from several months past - cache?

    Hi ,
    Please excuse this question if this has already been addressed.  I have searched sdn and could not find a posting.
    This may seem silly but in a query that is refreshed weekly, it has several variables that can be populated.
    The data - 0calday - &yrfdyo& is one.
    When I run the query, the variable entry screen appears with all the possbile varibles blank but the 0calday - single day filter - comes back with a date used back in september. 
    Why is this and where is this saved - cache somewhere?  or is this variable saved as a variant somewhere and that is why?
    Thanks for any clarification you can provide.
    Thank you,
    Lynda

    the problem was personalization checkbox.  I have been using portal and 7.0 and forgotten about the bex analyzer settings.
    To change the values to a different set of personalized values
    Step 1.After executing the query, Click on change query icon
    Step 2 Then, click on Change variable values in the drop down selection
    Step 3 You get the selection screen
    Step 4; Click on the selection icon on the right; you get the pop up with buttons for (1)Personalize variable values,(2) Load personalized values, (3) Undo personalization.
    Click Undo personalization button first
    Step 5: Then click Load Personalized Values button: the screen is now returned (with u2018?u2019 in the selected values)
    Step 6: Click on the available values: you get the screen with selection checkboxes on the left; select the desired value
    Step 7: Then click the personalization icon at the bottom
    The new values are now set.
    If you stop at Step 4, the personlaization should be undone

  • User entry variable on navigational attribute

    Hi,
    Can I create a Manual Entry/Default Value variable on a navigational attribute?
    Thanks,
    P R.

    Hi,
    Thanks for your replies.
    The attribute is in the master data carrying infoobject. We changed it from display to navigational after the query was created so that we can create variable. The query is based on ODS. In the query, I don't see the option of creating variable on the navigational attribute. Is there any other step to be done?
    Thanks.

  • Custom Quiz: How to update and report user-defined variable?

    Hello,
    I am a novice Captivate 5.5 user.  Thanks to Lilibiri's blog and articles, I have managed to built a custom quiz (all with user-defined variables and advanced actions). 
    The quiz is composed of 2 questions with 4 possible answers each.  Each of the 4 answers have a different score attached to it (i.e. answer a = 4 points; answer b = 3 points; answer c = 2 points; answer d = 1 point).  I have inlcuded a "Feedback Slide" that may appear after each question.  For example, if a person chooses score d, they will get sent to a Feedback slide that basically says they are wrong.  There is a "back" button on the "Feedback" slide that can take them back to the the prior question sllide and they can change and re-submit their answer.  After they have answered both question slides, they continue to a "Results" slide.  Upon entry to the "Results" slide, using "advanced actions" my user-defined variable adds up all of the scores to get a total.  Based on this total, one of three possible text captions boxes appear, depending on their total.  And....here are my questions (I have checked and re-checked the Forum and blogs for answers - and I am so sorry if I missed them!!) 
    1) I have defined a variable that totals the points that the person received on the quiz.  I would like this variable displayed on the Results slide.  It can get it to  appear in a Text Caption Box.  BUT if a person changes a score and re-submits the score before entering the "Results" slide, the total score reflects EVERY score that the person has chosen (the scores that they originally chose and then changed are still included in the total).
    2) I want the total score a person gets on the quiz reported to the instructor.  I don't know if a user-defined variable can be reported and how to go about doing this.  We will be running our quizzes on an LMS (though we haven't chosen one yet).  I tried using a system variable (cpQuizInfoPointsscored), but I believe (after reading discussions on Forum), it will not work in my quiz if my scores are adjusted/changed.
    3) another question - would you like me to put this in a separate discussion?   I certainly can!!  There is a "Back" button on the "Results" page.  I have tried using "advanced actions" and "on success: move to last slide visited" but neither option will allow the user to move to the last slide visited.  Ideally, I would liek a person to be able to go back through the quiz, look at their answers and adjust them.
    Thanks in advance for your help!  I have learned SO much in the last few weeks from all of you!

    Hello and welcome to the forum,
    That is a lot of questions, thanks for reading my blog. The most difficult part is indeed the reporting in case, you did see perhaps that I have not yet published the blog post about reporting questions with partial scores, third part of my reporting sequence. Have two possibilities that I'm exploring: either with Javascript, or with the brandnew Master Widget that Rod is pointing to. Watch out for the blog post(s), but need some more time. So no real answer to your second question for the moment, because you cannot control the quizzing system variables with advanced actions.
    About your first question: you will have to so sort of 'reset' when re-entering the question slide, so that the total score stored in the user variable is decremented with the score attributed to the user in his previous answer. This means that you have to store this previous score in another user variable. Hope this make sense?
    I do not get the last question totally. Are you using the default Score slide? You have to allow Backwards movement in the Quiz Preferences, but for default Question slides this will not allow the user to change his answer. I thought you were using custom question slides? Do not use the default score slide in that case, but create your own score slide, so that you can add buttons and actions to your wish. Perhaps I misunderstand your question, and it would be better to explain more, eventually in another thread if it is about the default score slide, question slides.
    Lilybiri

  • Formula variable is a user entry ??

    Hi All,
    I have created formula variable as a number and how i can use this formula variable is a user entry variable
    Please help me this
    Regards,
    Ravi

    Thank you very much I have used this formula variable in condition so I was missing some Key figure values, now I am getting total Key figure values 
    I appreciate your help
    Regards,
    Ravi

  • User Created Equations and program Variables

    Is there a way that I can take a user entered equation and apply it as the equation for a value? How can I make a String entered by the user to act as an equation insted of a string?
    I've created a part in my program with various mathematic operators as well as user friendly variables. The user selects the operators as well as variables from JComboBoxes. The user-friendly variables are converted to actual variables via a hash and another string is created to represent an equation.
    Example:
    User selects variables and operators to create:
    String UserEquation="(Average Tip)-(Total Fares *.10)";
    The above isn't much helpful if it doesn't reference real varaibles. The real equation after applying the hash is:
    String RealEquation = "(numbers.get(1) - (numbers.get(3)*.1)";
    Note: numbers is a vector of doubles.
    How can I get the program to evaluate the "Real Equation" instead of treating it like String?
    I would like to do somthing like the following:
    double total=RealEquation;
    Make Sense?? Is there a way to accomplish this? anyone have any idea how I could do this? Thanks in advance!!!

    Or, if speed isnt an issue, search the forum for using J6's scripting support
    to use JavaScript for equation evaluation. I posted an example just a couple weeks ago.
    Here it is:
    http://forum.java.sun.com/thread.jspa?threadID=5228772&messageID=9933551
    Reply #8

  • User Exit Variable for Bex in CMOD (ABAP Code)

    Hi Experts
      My requirment is to develop a Restricted Keyfigure...
      The restriction is based on 0Calmonth (Calendar Year/Month)
    The sales from beginning of calendar year up to last "closed" month in a Calendar.
    Ex: in June i want to see 01.01.2009 to 31.05.2009 data.
        in October i want to see 01.01.2009 to 30.09.2009 data.
    When user execute the report
        in Jan 2010 i want to see 0 as there is no closed month in that particular year.
        in Fed 2010 i want to see 01.01.2010 to 31.01.2010 data.
    For that purpose i need to create a User Exit variable in CMOD...
    I am struggling to get an idea on how to write a code to meet the requirment
    Please help me with code that i can use in cmod
    Thanks in advance

    Hi,
    Use the following code :
    when' variable name ' .
    DATA : year(4) type n,
    month2(2) type n,
    date_in type sy-datum,
    date_op type sy-datum.
    IF I_STEP = 1.
    CLEAR L_S_RANGE.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    month2 = sy-datum+4(2).
    if month2 = '01'.
    concatenate sy-datum+0(4) '01' '01' into l_s_range-low.
    l_s_range-high = sy-datum.
    else.
    month2 = month2 - 1.
    clear : date_in, date_op.
    concatenate sy-datum+0(4) month2 '01' into date_in.
    CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
      EXPORTING
        DAY_IN                  = date_in
    IMPORTING
       LAST_DAY_OF_MONTH       = date_op
    EXCEPTIONS
       DAY_IN_NOT_VALID        = 1
       OTHERS                  = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    concatenate sy-datum+0(4) '01' '01' into l_s_range-low.
    l_s_range-high = date_op.
    endif.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    I dint know what output do you want if the current month is jan.
    I have put it as 1st jan till current date.
    Modify it if you need.
    Regards,
    Mansi

Maybe you are looking for