Problem in transporting the Customer exit variable

Hi all,
i have careated a variable to capture the current date in my report, with the processing type, Customer Exit. and, its getting populated fine in my DEV environment. basically, i have to compute the number of days, in which net due date is being compared to the current date.  when i transport this to the QA environment, the values for number of days is gettting some junk value, wherein in DEV its showing the exact values. It seems i have to take cetain measures in transportation of the Customer Exit.
please advice.
Thanks in advance
Sneel

Hello ,
           In the Quality after you run the report check in the layout option>display text elements> variables and check what value is displayed for the use exit variable , if it is correct then problem may be in the selection you gave when you run the report if the user exit variable value is wrong , then set a break point in the code and run the report from rsrt and check where the error is.
hope it is clear
assign points if useful

Similar Messages

  • Looking for an ABAP-code for the customer-Exit Variable

    Hello,
    I have defined a Variable (Interval) which should be processed through Customer-Exit on characteristic Supplier-Date (date format). This Customer-Exit Variable is called ZDATE.
    We have another time characteristic Fiscal year / period (0FISCPER) which has single mandatory input variable for ex.  003.2011. This input variable is called ZFISCPER.
    Now I have to write an ABAP-Code where the customer exit variable ZDATE is derived (fiscal last year to last period) from input variable ZFISCPER in INCLUDE ZXRSRU01.
    Means when the input variable (ZFISCPER) is 003.2011 then the customer exit variable ZDATE should be calculated in INCLUDE ZXRSRU01 as 01.01.2010 u2013 28.02.2011 (fiscal last year to last period).
    Since I am quite new in ABAP, I will be grateful if you could write me sample ABAP for this.
    Many thanks.

    Hi,
    should be something like:
    DATA: l_s_range TYPE rsr_s_rangesid,
    input LIKE sy-datum.
    When 'ZDATE'
    CONCATENATE '0101' 0FISCPER+3(4)-1 into l_s_range-low. "You get 01012010
    CONCATENATE '01' Fiscper+1(6) into input.                            "You get 01032011
    l_s_range-high = input-1.                                                     "You get 28022011
    APPEND l_s_range TO e_t_range.
    Greetings
    Roman

  • Logic of the  Customer Exit Variable

    Hi Experts,
    Could you please explain me the logic (Functionality) of the below  Customer Exit Variable .....
    WHEN 'AKFR05'. "M-5 monthly forecast version
            CALL FUNCTION 'END_TIME_DETERMINE'
              EXPORTING
                duration         = -5
                unit             = 'MON'
                factory_calendar = l_LACID
              IMPORTING
                end_date         = l_fn_dte
              CHANGING
                start_date       = sy-datum
                start_time       = sy-uzeit.
            CHECK sy-subrc = 0.
            CLEAR l_s_range.
            l_s_range-low(4) = 'LGMN'.
            l_s_range-low+4(6) = l_fn_dte(6).
            l_s_range-sign = k_sign_inclusive.
            l_s_range-opt = k_option_equals.
            APPEND l_s_range TO e_t_range.
    Thanks in Advance

    Thanks for the update...
    The First Part
            CALL FUNCTION 'END_TIME_DETERMINE'
              EXPORTING
                duration         = -5
                unit             = 'MON'
                factory_calendar = l_fcalid
              IMPORTING
                end_date         = l_fn_date
              CHANGING
                start_date       = sy-datum
                start_time       = sy-uzeit.
    For Example:
        Current Date : 27.04.2009
    By using the FM END_TIME_DETERMINE the END_DATE (27.11.2008) is exported to l_fn_date
    Could you please explain me the logic after exporting the end date
    l_s_range-low(4) = 'LGMN'.
            l_s_range-low+4(6) = l_fn_date(6).
            l_s_range-sign = k_sign_inclusive.
            l_s_range-opt = k_option_equals.
            APPEND l_s_range TO e_t_range.
    Thanks in Advance

  • Code (ABAP) for the Customer Exit Variable (CMOD)

    Scenario
    An employee can purchase any no of policies in a day or month.each policy will have start date and expiry date.
    My requirment
    Count all the policies(valid) by employee on a ranges basis exception reporting
    (0-10;10-20;20-30;30-40) and then able to drill down by policy start date and expiry date.
    As per the requirment is to show policies that employee had with in the give date intreval  which are not yet expired (active) i need to write a condition that will count only policies whose Expiry date is > Current calender day
    As Policy Expiry Date is a char i am converting it to KF using fourmala variable so that i can write a condition on it using current cal day formula variable sap exit
    Requirment:
    Need a code for SAP exit variable which will meet the following requirment
    There are the following 2 variables in the query
    1) A variable (User Input)(Date Range) on Policy Start Date and
    2) Authorisation Variable which is based on Authorisation Object(Analysis Authorisations)
    I need a SAP Exit variable (CMOD) that will
    BAsed on the user entered Policy Start date it has to pick all the policy exiry date of the policies and display all the policies whose expiry date is greate than Sy Date (Current Date) and also if Policy Expiry Date is blank or # it has to display
    Arun supplied me with the below code...but i think it doesn't include blank expiry date or #...as i am new to ABAP please update me with releavent code
    Policy Start Date : ZPST_DTE
    Policy Expiry Date: ZPSP_DTE
    Variable (Type:Customer Exit) on Expiry Date: ZEEXP_DTE
    Arun's Code:
    IF I_STEP = 1.
    CASE V_NAME
    WHEN 'X' " X is the variable u created for the exit
    l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.
    END CASE.
    Please modify above code to include Blank or # values of Expiry Date
    Thanks Arun
    Please ask if you need further info as this is urgent
    Thanks

    Hi Arun,
    Thanks for the help...will definetly assign points
    (Closed the previous thread)
    Please spare bit of ur time as this is my first ABAP Code
    Can i include 2 restrictions..# and Variable (Customer Exit)...But how can i include Records with Blank Values
    As the data from Source system the expiry date is filled up with either Date or # or Blank...my requiorment is to include all 3 and
    Question:
    As there are 2 other variables defined ..one on Policy Start Date (User input date intreval) and Location (Authorization Variable..Analysis Authorisations)...Do i need to change I_STEP in the code
    (Req: Reports shows all the(still valid) policies emp has purchased between  2 give date (Variable on Policy Start date)
    IF I_STEP = 1.
    CASE V_NAME
    WHEN 'X' " X is the variable u created for the exit
    l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.
    END CASE.

  • Problem with Bex Customer Exit Variable

    Hi Friends,
    I have a customer exit variable which is getting filled based on the User Input.  I have written the code inside the If condition checking i_step = 2. The code is working as required.
    But the problem is when I try refreshing the query or change the user variable selection, the Customer exit variable is not changing.  I tried to debug the code and realized that the  values for the exit variable based on the previous selection is not cleared and the i_step = 2  is not being executed for the variable.
    While I close and reopen the query, the code is working fine.  
    Does anyone know why this is happening?  Please suggest..
    Thanks in advance..
    Regards,
    Priya

    Hi Binu,
    Here is the code sample.  I am trying to populate the month based on the input Week number '0I_WEKIN'
    .  For eg.  If I give 37.2011, the month value should be 08.2011.  If I give 39.2011, month should be 09.2011.
      WHEN 'ZC_MONTH'.
        IF i_step = 2.     "after the popup
            READ TABLE i_t_var_range INTO lw_var_range WITH KEY vnam =
        '0I_WEKIN'.
           IF lw_var_range-high IS NOT INITIAL.
              l_week  = lw_var_range-high.
              l_week = l_week - 3.
              CALL FUNCTION 'WEEK_GET_FIRST_DAY'
                EXPORTING
                  week = l_week
                IMPORTING
                  date = l_date.
              lw_range-low = l_date+0(6).
            ENDIF.
            lw_range-sign = 'I'.
            lw_range-opt  = 'BT'.
            APPEND lw_range TO e_t_range.
        ENDIF.
    Regards,
    Priya

  • Customer Exit Variable to fetch the data from the cube..

    Hello Gurus,
    I am having a requirement to select the latest changed record from the cube while executing the query.  where we are having the Calday as the date with a variable .
    I suggested my client we can filter it at the DSO leve or Data loading level but my client dont want to distrurb the existing design so he want to perfrom the changes at the Query level only.
    For Example we are having below records in the cube.
    PO             Material     Calday       Qty         Price
    101            ABC          1/12           100         10
    101            ABC          2/12            100         10
    101            ABC          3/12            100         11
    I am having Calday in the selection screen as the variable.
    Now from the above example i need to show the record which has been changed on 3/12.
    For this i am planning to write the customer exit variable on the calday , when the user enter the range of Calday then i will fetch the whole records which fall in between the range and i will sort each PO with respect to the date and i will pick those which are the latest records.
    My Concerns:
    !. Kindly let me know if it is possible and what are the other things that i need to consider.
    2. Did it will impact the performance.
    Waiting for your quick replies
    Thanks & Regards
    KK

    Hi Mate,
    Sorry for late reply.
    By d way in your word.
    initially when the user enter the date range as the vairable input. suppose 1/12 to 31/12 then i will pick all those records which fall in this range.
    suppose the records are
    PO Date
    P1 01/12
    P1 02/12
    P2 02/12
    P2 03/12
    P3 03/12
    P3 04/12
    In the customer exit variable Now for each PO i will sort the date in ascending order and i will pick the last record to display it in the Report.
    The ouput will be
    PO Date
    P1 02/12
    P2 03/12
    P3 04/12
    Now hope you are aware about exit variable concept.
    so what value will pass in the calday filter.
    here after sorting on each PO , you will get 3 different dates, 02/12 for P1
    03/12 for P2
    and 04/12 for P3
    Now if you are aware about exit variable concept, then you will pass this three date to CALDAY(I_t_VAR_Range-low = ...)
    but how query will understand that for P1 calday filter value is 02/12, for P2 calday filter value is 03/12.... and so on...
    actually i have also experienced this kind of issue 1-2 years before, i have tried same thing at that time without thinking and stuck with this problem..
    By d way you can also learn from your mistake.. so just try ur logic and then you will understand what is the problem?
    By d way this will not work, parallel you can work on other solution.

  • Error creating Customer Exit variable, please help

    Hi Experts,
    This is the scenario, I need to obtain the convertion rate from the table TCURR in order to convert several currencies to USD, so I created a Customer Exit variable that gets the Period and based on that obtains the conversion rate for the last day of the given month from TCURR, the problem is when I created the Formula Variable to get the value from the Customer exit variable I got the following error:
    'ZVARREGEXIT' ALREADY EXISTS; SELECT A DIFFERENT NAME.
    But in not using that name anywhere on my variables creation, Im doing something wrong? How can I check wheres is that variable being used.
    Ideas, comments are always welcome and appreciated.
    Regards.

    Hi Ed,
    Open Admin Workbench (RSA1) and choose Transport Connection --> Object Types --> Query Elements --> Variable --> Select Objects. Find the variable of interest and transfer it back to the main screen, then right-click and choose 'Display Description'. That will show you a "where used" list of queries, workbooks, etc.
    Next, you can use the previous technique to open one of the queries, find the variable in the query, and determine which InfoObject it is associated with.
    Hope this helps!
    Regards,
    Saurabh

  • Using Formula Variable in Customer Exit variable

    Hi,
    I want to assign valuees of 2 Formula Variables to one cstomer exit variable based on some Characteristic.
    Example. Formula variables are Early and Late. If Early = 3 and Late = 4 , I want to pass value to the Customer Exit variable as Low = 3 and High = 4.
    The problem is in I_T_VAR_RANGE there is no value for formula variable in LOW field.
    Other variables based on Characteristics have values in this field.
    What can I do in this case?
    Regards
    SSS

    SSS,
    You can restrict your characteristic with two variables in the value range options of restricting.
    One can be used as low and the other can be high.
    Hope that helps.
    Thanks.

  • Query Drilldown does not Invoke Customer Exit Variables

    We have a problem with performing a drilldown in a BEx Analyzer reprot, basically the client is a Trading company and they have inter company trading. We are using the Profit Centre as one of thre u201CFree Characteristicsu201D in the query and hence we are able to drilldown on a Characterictc by Profit Centre.
    We are using a couple of BEx query variables (Customer Exit variables) to determine the inter-area and extrenal area profit centres and these profit centres will be different based on the level of Hieracry node selected when the query is initially executed. For example if we assume a hierarchy with has one root node, 3 children under the root node and 2 grand-children under each of the 3 child nodes, now if we are at the root Node of the Hierarchy then every profit centre is internal and there are no external profit centres,  similarly if we are at the 2nd node (i.e. one of the child nodes) then everything under that node is internal and everything in the other 2 child nodes is external and so on.
    This is where the issue starts for us, since on the report if we select the the node we want to see the results for at the query rumtime (i.e. the Customer Exit Variables are invoked at I_STEP=2 and they select the other nodes of the hierarcy if any and group them into either external or internal)  then the results are correct. Now if we were to drilldown, i.e. We selected the root node and we drilldown on to see for example of the child nodes then the result are not correct, this becomes apparent when we drilldown further to the grand-child nodes.
    One logical explaination is that when we are doing the drilldowns the customer exit variables are not being invoked in the BEx analyzer report and hence they are not grouping the sums for the internal and external profit centres relevent to node selected in the Drill down.
    Does anyone have any suggestions regarding how to make this query work properly or show the correct results in BEx Analyzer (ideally), I have considered the Workbooks option but the client does not want Workbooks.
    Please let me know if there is a program etc we can customise to ensure that the Customer Exit variables logic is used when the user does a drilldown in the query or any other way to make it work.
    Many Thanks
    Jack

    Hi
    Just to aid anyone who is thinking what to do in a similar situation, I am aware that RRI or using workbooks are a couple of good alternatives (just that these are currently not being considered by the client, hence I am asking here).. Also, if someone has Business Objects WEBI then we can satisfy the requirement by creating a new Webi Report for each of the nodes and displaying it (similar to Workbooks but much nicer and faster) or we can get the Webi to execute the variables again during the drilldown... Unfortunately the client is not using Webi either... So the solution has to be in BEx Analyzer / Query designer based...
    If you have any thoughts on how I might be able to do what I want to do then please feel free, I am quite confident that I am not the 1st person to come accross this issue and someone somewhere has solved this issue. 
    Thanks

  • 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

  • Crystal Reports with BEx Query using Custom Exit Variable

    Hi,
    We have BW BEx Query using Customer User Exit variable to derive  the Fiscal Week for Last Year (called it VAR2) based on another user input variable Current Fiscal Week (called it VAR1).
    VAR2 is derived from VAR1 in CMOD via some codings and thus it DOES NOT have the "Variable is Ready for Input" flag ticked in the BEx. VAR1 is user input variable, so it has "Variable is Ready for Input" flag ticked in the BEx.
    When we create a Crystal Reports with the BEx Query using variable VAR2, and when we run it we got an error message saying "Failed to execute query; '[]<java.lang.UnsupportedOperationException: No Selection State Support!ZP_MI_LYPUBWEEK>'. Redesign your query or contact the data source maintainer to solve the problem".  (note: ZP_MI_LYPUBWEEK is VAR2 in this case).
    Could anyone please assist? Surely, CR supports BEx customer user exit variables like the above, right?. I also refer to the forum below as it seems to have a similar issue (except mine with an error message), but it does not provide a solution in it.
    Crystal Reports with BEx Query using Custom Exit Variable
    Thanks,
    Andy

    Hi Vibhav,
    We have the SAP Crystal Reports for Enterprise XI4.0 Version 14.0.0. Not sure if SP0 or other SP, got to check with Basis Team later.
    We tried that "mandatory" option and did not work either.
    Anyway, SAP has now come back again saying it is something they will fix it in next release/version. We got a phone call from them and a reply below to our OSS.
    23.08.2011 - 08:20:49 CET - Info for Customer by SAP  
    I have raised this issue on the Idea#s Place as an enhancement request
    on the below link:
    https://cw.sdn.sap.com/cw/ideas/5586
    This ER contains the information of including the customer exit
    variables in the report without checking the #input for ready# option.
    This ER can be considered for being implemented in the future
    versions. You can refer to SAP Note: 1515837 - How To: Enhancement
    Request Process - "Idea Place" for more information regarding the Idea
    Place.
    Cheers,
    Andy

  • Display Error Message in BW Report based on Customer Exit Variable

    Hi
    I need to display an error message in the BW report based on the value of a customer exit variable - i was able to do this successfully in BW3.5 using the below code.
      WHEN 'ZUPN'. "Here ZUPN is the customer exit variable
        IF i_step = 1.
          <check for condition -- if successful, variable flag = 1, else variable flag = 0>
          IF flag = 0.
            MESSAGE e157(00). "Error Message
          ENDIF.
        ENDIF.
    I have upgraded my system to BI 7.0 now. Whenever the variable check is not successful, it displays a blank screen instead of the error message in the report. Please advice if we need to change the code and how ??

    Bhanu,
      Thanks for u r reply.This warning message appears every time i execute the report through portal.
    Any idea ?
    Regards
    Mano

  • How to use Multiple Single Option for selection in the Customer Exit

    Hi,
    How can we handle the multiple single values in the customer exit variable.
    I have a requirement which is as follows -
    Table A fiields -> Field Coach, Partner 2, Relation between PArtner 1 & Partner 2, Valid from, valid to date.
    Table B ->  Service Month, Start Date, End Date.
    Table C -> Billing Date, Execution Partner,cal month /year.
    For the Field coach in TABLE A, multiple Partner 2 are present.
    Report has to be built on Table C.
    User inputs the Service month and Field Coach . User can enter multiple field coach values.
    For the All the Field Coach values entered, corresponding Partner2's have to be found from Table A and to be passed to the Execution Partner in Table C.
    Now if we want to use customer exit variable on the field Execution Partner, how can we handle the Multiple Single selections in the customer exit.
    Thanks,
    Shubham

    Hi,
    While creating the variable you must have to specify multiple value.
    In customer exit
    write code multiple times and append the values.
    For example:
    when 'variable'.
    l_s_range - sign = 'I'.
    l_s_range - OPT = 'EQ.
    l_s_range - LOW = EXECUTION PARTNER 1.
    APPEND L_S_RANGE TO E_T_RANGE.
    l_s_range - sign = 'I'.
    l_s_range - OPT = 'EQ.
    l_s_range - LOW = EXECUTION PARTNER 2.
    APPEND L_S_RANGE TO E_T_RANGE.
    l_s_range - sign = 'I'.
    l_s_range - OPT = 'EQ.
    l_s_range - LOW = EXECUTION PARTNER 3.
    APPEND L_S_RANGE TO E_T_RANGE.
    Regards,
    Ranganath.

  • 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

  • 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