Need help in creating a user exit variable

Hi all,
I have created a query in which a key figure needs to be automated with an user exit variable.I want to derive the value of this key figure 'x' based on calender month.
This key figure should get the cumulative value from the first month of the fiscal year till the calender year month entered while executing the query.
I got a basic understanding on the User exits from SDN. But Im not sure how to implement this logic.
I would really appreciate if you could provide me a detailed explanation of how to do this.
Thanks in advance,
Vinoth

Hi
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50c8e8
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6378ef94-0501-0010-19a5-972687ddc9ef
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2d99121a-0e01-0010-e78c-b1ae566a2413
http://sap.ittoolbox.com/groups/technical-functional/sap-bw/how-can-i-set-bex-variables-in-i_step3-exit_saplrrs0_001-335232

Similar Messages

  • Create new user exit variable

    Hi all,
       I am on BW 3.5.  I need to create a variable where by I take a material qty (from a field in my cube) and in a report multiply it by a dimesnsion figure (from the material master) to get a total volume.  For example, material x has a qty of 3, and a volume of 4 ft3 per unit.  3 times 4 cubic feet equals 12 cubic feet.  What I want to be able to do is go into the BEx, and in my query create a new calculation using a formula variable. 
       I think this is done in CMOD, but I'm not sure.  Does anyone know how to do this?  How do I even create the variable - I don't want it for a specific characteristic - I want a formula variable.  I've got the code I need for the volume calculation - I just need the logisitcs of how to create and implement it.
       Thanks.
    Dave

    HI
    kindly follow the below steps (you will come to know whether the user variable enhancement RSR00001 is already created or you need to create the same
    Go to transaction CMOD to create a project for your enhancement.
    Give a name to the project,
    click on create and save the project.
    Then assign an enhancement RSR00001 to your project and save. (In this step an error message u201CSAP enhancement RSR00001 already belongs to project NAMEu201D may appear.
    That means an active project with the enhancement RSR00001 already exists.
    NOTE: If this is the case, you do not need to create your own project and may terminate this step.
    Go to a transaction SE80
    display a Function Group XRSR,
    open Function Modules Folder and
    double click on an EXIT_SAPLRRS0_001.
    A source code for the EXIT_SAPLRRS0_001 function module opens. Double click on a word ZXRSRU01. You arrive to a source code for the Include ZXRSRU01(at the bottom).
    In the source code for Include ZXRSRU01 insert your code.
    also refer to below link with reference to user exit on the cal day
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
    Thanks

  • How to select several values from a user exit variable in a planning folder

    Hello,
    I have created a user exit variable for limiting the values only to which the user need to access.
    For a simulation part, it is then necessary for him to select several values from these values (not only one, and not all)
    But It seems in this case the user has only two possibilities :
    - keep all the values without any restriction
    - restrain the selection to only one value.
    It seems possible for the user to access to a multiple choice window, but this possibility doesn't seems to work : in all tests we did, only the first value was taken into account by BPS.
    If this method is not good do you know an other manner to permit the user to choice several values amongst a set of pre-selected  (because the original set is too important) values ?
    Thanks for your help.

    Hi Mayank,
    Thanks for your response, but I don't think it corresponds to my problem.
    I my case, I use a user exit variable to filter some data. It seems BPS offers the possibility to the user to select several values amongts the pre-selected values presented by the user exit variable, but it doesn't work. We can use a popup in which we enters the required values, but in final, only the first value is taken into account.
    I don't know if it is due to a BPS bug or if it is not a good solution in regard to BPS philosophy. In this case, the concerned caracteristic isn't in the header but in lead columns.
    I must present a solution to my client next monday, so I have not enough time to open an OSS message.
    An alternate solution should be interesting too.
    My need is to present to a user a selection of values amongst all values from an infoobject (the user exit variable seemed to be a good solution) and the user must have the possibility to select some values amongst these as filter.
    Regards

  • BPS User Exit Variable based on Planning Package Selection

    Hi,
    I'm implementing a SAP BW-BPS planning layout to be integrated into the CRM we user interface.
    Most of the characteristic selections come from the CRM fields that need to be filled by the user when creates a trade promotion.
    The charcteristic selections work (as standard) just if in the planning level I flag "Selection in Package", then in package these selections are dinamically defined from what the user select in the CRM fields at runtime.
    My problem is that I have to build a BPS User Exit variable to filter, in the planning level, the proper Planning Area based on the CRM Sales Organization value.
    The characteristic CRM Sales Organization belongs to whose chararcteristic the value is determined dinamically in the planning package.
    Is it possible for a BPS user exit variable, set in the planning level, to catch the value of a characteristic selection made at planning package?
    Many thanks for your help.
    Alessandro

    Hi Indu,
    Many thanks for your answer.
    I have already took a look at the document posted by you but I didn't find the solution to my problem.
    This because i have to create a user exit variable that need to get the value of the characteristic selection in package.
    I mean in the planning level I will have the user exit variable that restrict the planning area and, his function module, need to read, at runtime, what is the value of the characteristic CRM Sales Organization restricted in package by CRM.
    So I don't have any idea to which BPS internal table I have referred to in my funcion module to catch the value of the CRM Sales Organization dinamically filtered by CRM.
    Many thanks,
    Alessandro

  • 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

  • User-Exit Variable Scenario

    Hi,
    I have a multiprovider M1 over two cubes C1 and C2. User reports on this Multiprovider M1.
    C1 has keyfigure K1 which holds activity values for each Calendar Year Month.
    C2 has keyfigure K2 which holds only Inception to Date values for each Calendar Year Month.
    User needs a report which displays Activity values for both K1+K2 for each calendar year month(for the range he gives).
    To calculate activity value per month for K2, we need to get Change in the Inception to Date values between current month and the prior month.
    So, as per the user requirement, if for example we need activity for Jan 2006, the value he needs would be
    K1(jan 2006) + K2(jan 2006 - dec 2005).
    I created 2 user-exit variables V1 and V2 based on the characteristic Calendar Year Month having a variable V0(Interval, mandatory).
    V1 takes the "low" value and V2 takes the "low + 1" value of V0.
    In the columns panel of the BeX designer, I created a structure S1 which contains keyfigures K1(V1), K2(V1) and K2(V2). I made a formula, "K1(V1) + (K2(V2) - K2(V1))".
    I put the calendar year month characteristic with variable V0 in the filters panel. Ran the query with a wide range 01/2004 to 12/2006. It gave me results for only first 1 month (01/2004).
    I moved the calendar year month characteristic with variable V0 into the columns panel on the top of the structure S1. Ran the query with a wide range 01/2004 to 12/2006. It gave me results for only first two months (01/2004 and 02/2004). But, unfortunately either of K2(V1) or K2(V2) is blank for each month.
    Anyways, I was able to successfully get what user wants by keeping V0 in filter panel, but could make it just for 1 month. But, I want this to be extended over all the months for the range user gives.
    Can anyone suggest a good way to do this? Hope I did not confuse you with lot of information.
    Thanks,
    Sai.

    Hi,
    1.
    Change V0 to single value (mandat.)
    2.
    Put restriction [V0-1; V012] (value restr. from V0-1 to V012) in filter panel for char Calendar Year Month.
    3.
    Define 13 Customer-Exit Variables:
    V1 for -1 period () of time interval (from char. Calendar Year Month),
    V2 for 1 period of time interval (from char. Calendar Year Month),
    V13 for 12 period of time interval (from char. Calendar Year Month).
    4.
    Create 13 Selections (always hidden):
    Sel1 for V1,
    Sel2 for V2,
    Sel13 for V13.
    5.
    Make 12 formulas. In every formula you can use
    all of these 13 selections.
    Yes, it is not a perfect solution, but hope it helps.
    But Cell editor is a killer for perfomance

  • Hi Help on SD Pricing user exit

    Hi Guru's,
    I need help on sd pricing user exit..
    when preceding order document do not have ZW15 condition type,if we try to create the return order using the preceding order , we will not have ZW15 condition type in the returns order. But if we try to enter ZW15 condition type manually in return order,system should  throw a warning message that manual entry of ZW15   is not allowed.
    i need write code for this concept..Please provide exact user exit for this concept.
    Regards
    P.Senthil Kumar

    Hi,
      The error is due to the configuration of the pricing condition type. For the present configuration you will not be able to add the condtion manually. In order to add the condition type in your return order you have to create a new pricing routine and get it configured. Add checks in the routine for the order type while applying it. This routine will get trigerred while creation of the orders.
        Go to trasncation VOFM  and then go to Requirements--->Pricing, you will be able to see the pricing routines here. You can create a routine similar to these.
    Regards,
    Susanta

  • Help me on SD user exit

    Hi Guru's,
    I need help on sd pricing user exit..
    when preceding order document do not have ZW15 condition type,if we try to create the return order using the preceding order , we will not have ZW15 condition type in the returns order. But if we try to enter ZW15 condition type manually in return order,system should throw a warning message that manual entry of ZW15 is not allowed.
    i need write code for this concept..Please provide exact user exit for this concept.
    Regards
    P.Senthil Kumar

    did you find the user exit.
    find the user exit in smod ,what do you want to do..
    accordingly you can find the user exit.
    these are the exists..
    MBCF0002            Customer function exit: Segment text in material doc. item       
    MBCF0005            Material document item for goods receipt/issue slip              
    MBCF0006            Customer function for WBS element                                
    MBCF0007            Customer function exit: Updating a reservation                   
    MBCF0009            Filling the storage location field                               
    MBCF0010            Customer exit: Create reservation BAPI_RESERVATION_CREATE1       
    MBCF0011            Read from RESB and RKPF for print list in  MB26                  
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.
    vijay
    Message was edited by: Vijay Babu Dudla

  • User Exit Variable picking values from InfoProvider

    Hi,
    I've created a User Exit variable (of type Interval, Mandatory) on 0CALMONTH and populating it in exit.
    The problem is at the time of query execution, I get "BRAIN 657" error i.e.  "Value <value> is Invalid for Variable <variable name>".
    After doing some analysis I figured out that once the user-exit code is performed, system validates the entries populated in this Variable against the values in InfoProvider and gives error when it doesn't find those values.
    E.g. lets say InfoProvider has values for 0CALMONTH from 06.2010 till 10.2010 and if I populate my variable with range 03.2009 till 12.2010 then it throws above error. But if I populate the variable with exact values i.e. 06.2010 till 10.2010 then it works.
    Any idea how can I remove this validation and populate with my own value range?
    Regards,
    Vikrant.

    hi remove that default value from the variable.
    and you shd be able to run the query without any problem.
    regards,
    VJ

  • Hi experts i would like to know about user exit variables?

    Hi there experts,
            sorry for being pain, can some one give me an idea about what are user exit variables and where are they used ?cheers thanks.

    Hi,
    1)for example user when ever executes his report he wants only for current date by default
    then u create the user exit variable on 0calday example as 'zcedate'
    then go to the tcode CMOD here create the project then go to the Exit_saplrrso_001
    here u can insert the code like as below
    when 'zcedate'.
    clear l_s_range.
    l_s_range-sign = 'i'.
    l_s_range-option = 'eq'.(if it is between two dates then l_s_range-option = 'bt')
    l_s_range-low = sy-datum(if it is range l_s_range-low  = 'may be any date  or by using sy-datum - ) 
    append l_s_range to e_t_range.
    like this we can start and write for month to date and week to date by using the FM week_get_first_day and dat_get week
    and for year to date by using the FM first_and_last_day_in_year_get
    if u have any detailed  pls ince again tell me which are things u required.
    thanks for giving this oppourtinity.
    Thanks & Regards,
    k.sathish

  • 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

  • How to create an user input variable for customer exit variable? - BW3.5

    Hi Guru,
    I have a requirement for the selection period of my reports. There are 3 possible reporting periods which should be user selectable:
    1. Month: Current reporting month
    2. Fiscal Year to Date
    3. Project Year to Date
    Here I need 2 variable to do these, 1 customer exit and 1 user input variable. I have created a variable customer exit to calculate all these requirement. But can any1 tell on how to create the user input variable for my customer exit? I need a user input variable with drop down list like below.
    01-Current month
    02- Fiscal Year to Date
    03-Project Year to Date
    I have create a new master data for this variable, but it's not working. What I need now is a standalone master data which do not need to link to any exiting records. Can any1 tell me how to create this?

    Just go to the definition of the variable for which you have created a customer exit. There you will find a check box for "Ready for Input". Just tick that checkbox and the variable will be available as a selection variable in the reports selection screen.
    Regards,
    Yogesh

  • ABAP help in user exit variables

    Hi,
    In the selection screen of a query, I have an optional variable CalenderMonth (SOMONTH). I have to calculate another user exit variable (CALMONTH) in ZXRSRU01 by using this SOMONTH. This is how. If the value SOMONTH is entered, then I need to assign SOMONTH to CALMONTH. If SOMONTH is not entered, then I need to set CLAMONTH to current calender month from system date.
    For that, I need to check if SOMONTH is entered or not in the program ZXRSRU01. This is what I am trying to do, and is not working.
    WHEN 'CALMONTH'.
        If I_step = 2.
          Loop at I_T_VAR_RANGE into LOC_VAR_RANGE
                 Where VNAM = 'SO_MONTH'.
           IF LOC_VAR_RANGE-LOW IS INITIAL.
            ELSE
           ENDIF.
    <b>PROBLEM:</b> The statement "IF LOC_VAR_RANGE-LOW IS INITIAL." is not working. When I try to debug the code, program aborts at that line. By this line of code, I mean to check if SOMONTH is initial or not.
    Any suggestions or ideas very much appreciated.
    Thanks alot
    John

    Hi
    When I have tried something similar to this (in BW v3.1), and the (optional) variable I am reading from is not populated by the user; in STEP 2 table I_T_VAR_RANGE does not contain a record for it. Hence, the logic I would use is:
    CASE I_VAM.
    WHEN 'CALMONTH'.
      IF I_STEP = 2.
        READ TABLE i_t_var_range INTO loc_var_range
        WITH KEY vnam = 'SOMONTH'.
        IF SY-SUBRC = 0.
          loc_range-low = loc_var_range-low.
        ELSE.
          loc_range-low = sy-datum+4(2).
        ENDIF.
        loc_range-sign  = 'I'.
        loc_range-opt   = 'EQ'.
        APPEND loc_range TO e_t_range.
       ENDIF.
    Hope this helps.

  • Help with user exit variable

    Hello all,
    I need to create a customer exit variable to get a field (0calmonth) from an infoobject attribute and use this field to filter the query.
    I need some help to finish the code:
    WHEN 'my variable'.
        IF I_STEP = 2. "before the popup
          SELECT 0CALMONTH INTO ???    "0calmonth is the attribute.
          FROM /BIC/TZFECHAVAL            "infoobject table.
          WHERE... "conditions.
    Any help? Thanks. Points will be assigned.

    Hi,
    Pls check the below sample code.. and change the code
    WHEN 'Your Variable' .
          TYPES : BEGIN OF ls_batch ,
                  batch TYPE /bi0/oibatch,
                  END OF ls_batch.
          DATA : lt_batch TYPE TABLE OF ls_batch.
          DATA : wa_batch TYPE ls_batch .
          SELECT batch FROM /bi0/mbatch
          INTO TABLE lt_batch
          WHERE batch = 'XYZ'
             OR batch = 'ABC' .
          SORT lt_batch BY batch .
          DELETE ADJACENT DUPLICATES FROM lt_batch COMPARING batch .
          LOOP AT lt_batch INTO wa_batch .
            l_s_range-low = wa_batch-batch.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
          ENDLOOP.
    Thanks
    Reddy

  • HOW TO CREATE A CUSTOMER EXIT VARIABLE

    <Moderator Message: use lower case letters next time, we don't want you to shout. --> see rules of engagement>
    hi,
          How to create a customer exit variable..!
    in a query designer i  have created the customer exit variable ,in the cmod i have created the project
    for the exit rsap0001 and kept the break-point....but when i executing the query via BEX-Analyzer
    where control not stoping in the break-point..
    can any one help me ..what is the approch i need to do.because i new to BI..
    Regards,
    shahina.....!
    Edited by: Siegfried Szameitat on Dec 17, 2008 10:37 AM

    Hi Shahina,
    1. Create formula variable var1 from to date using replacement path.
    2. Create another formula variable var2 for current date using customer exit or you can use standard
    formula variable for current date
    3. Create calculate key figure ckf using var1 & var2.
    ckf = var1 - var2.
    Thanks == points
    Regards
    Sudheer
    Edited by: SUDHEER on Dec 17, 2008 10:41 AM

Maybe you are looking for

  • How to get edited row values from ADF table?

    JDev 11. I have a table which is populated with data from Bean. I need to save changes after user make changes in any table cell. InputText is defined for table column component. I have defined ValueChangeListener for inputText field and AutoSubmit=t

  • Sound but no video on my 5800

    Hi.  Can anyone help me - when i put mpg4s on my phone it won't play the picture?! Also, are there ways of playing avi videos and other formats? Much thanks for any assistance. Davin Message Edited by scuders on 02-May-2009 05:10 PM

  • ESS Webdynpro u0096 Benefits u0096 Open Enrollment

    We currently have the ITS application for benefits open enrollment (PZ14) up and running. We are trying to setup the Webdynpro service for Open Enrollment. We are on ECC 6.0, EP 7.0 latest SPs and we are using XSS 600 webdynpro Software Components. P

  • Which one is the Best Backup and Recovery Method in your point of view?

    Friends, Currently we are taking hot backup with archive mode. we have backup script to copy the datafile and we will copy the archive files in a separate folder. alter tablespace system begin backup; host cp /u01/app/oracle/oradata/livedb/system.dbf

  • IPhone UK release question

    Right, lets face it, I will be buying an iPhone when it comes out, the question is this, I am an existing O2 customer billing through CARPHONE WAREHOUSE. I have 8 months left running on my existing contract which is BELOW the cost of the lowest iPhon