Variable of Type Customer Exit

HI All,
   Below is the code to derive a Time Band through a Customer Exit. But when i execute the query its going to Debugging mode automatically..... and throwing a message
Value " is too long for variable XMON12
>> Row: 73 Inc: LRRMSU13 Prog: SAPLRRMS
System error in program SAPLRRS2 and form GET_SID-1- (see long text)
WHEN 'XXXXXX'.
       read table i_t_var_range with key vnam = 'DATE_1' INTO i_s_var.
       L_S_RANGE-LOW   = '00000000'.
       L_S_RANGE-HIGH  = I_S_VAR-LOW.
       L_S_RANGE-SIGN  = 'I'.
       L_S_RANGE-OPT   = 'BT'.
       APPEND L_S_RANGE TO E_T_RANGE.
       WHEN 'XMON12'.
       L_S_RANGE-LOW   = 0.
       L_S_RANGE-HIGH  = 365.
       L_S_RANGE-SIGN  = 'I'.
       L_S_RANGE-OPT   = 'BT'.
       APPEND L_S_RANGE TO E_T_RANGE.
Did i miss anything.
Regards.

Ramana,
Variable: XMON12 for Days or Months ....??
Write code below I_STEP = 2, and remove variable for ready for input(value will be populated via user exit).
WHEN 'XMON12'.
IF I_STEP = 2 "Variable get populated after providing input values.
L_S_RANGE-LOW = 0.
L_S_RANGE-HIGH = 365.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDIF.
Hope it Helps
Srini

Similar Messages

  • How to display text variable of type customer exit

    Hi to all,
    I have created a query in query designer which display sales value according to plant.
    There i have also used a variable which will take input from user and restricted on 0CALDAY.
    I have also created 2 text variable to display the text for sales based on input in variable.
    I need when user enter the 01.02.2010 - 31.12.2010 value in variable , text variable should display SALES FROM 01.02.2010 TO 31.12.2010
    i knew how to do that by using text variable of processing type customer exit.
    But display of text variable is like SALES FROM 01022010 TO  31122010  ,
    But i need that SALES  01.02.2010 TO 31.12.2010
    i shall be thankfull to you for this.
    Regards
    Pavneet Rana
    Edited by: pavneet rana on Dec 22, 2010 7:46 AM
    Edited by: pavneet rana on Dec 22, 2010 8:03 AM

    Hi,
    Give Description on Sales Amount  as SALES FROM &ZVAR_YEAR1& TO &ZVAR_YEAR2&.
    ZVAR_YEAR1 & ZVAR_YEAR2 are the two text variables. These two variables should NOT be input enabled.
    In the Exit - under I_STEP = 2, write the below code.
    WHEN 'ZVAR_YEAR1'.
      DATA:   l_s_range       TYPE rs_s_range,
                   loc_var_range TYPE rrs0_s_var_range.
      READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZVAR_INPUT_CALDAY'.
      l_s_range-sign = 'I'.
      l_s_range-opt  = 'EQ'.
      l_s_range-low  = loc_var_range-low.
      APPEND l_s_range to e_t_range.
    WHEN 'ZVAR_YEAR2'.
      DATA:   l_s_range       TYPE rs_s_range,
                   loc_var_range TYPE rrs0_s_var_range.
      READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZVAR_INPUT_CALDAY'.
      l_s_range-sign = 'I'.
      l_s_range-opt  = 'EQ'.
      l_s_range-low  = loc_var_range-high.
      APPEND l_s_range to e_t_range.

  • Populating text variable of type Customer Exit dynamically

    Hi,
    I have a report with 3 columns as following.
    "Current period", "Previous period" and "Previous period - 1".
    The text variable name is "ZQTR_TXT".
    My input variable name is "ZALLOC_PRD".
    If I enter 200709 as input, I want to see column headings as
    2007Q3    2007Q2    2007Q1.
    but I am getting 2007Q3 for all 3 columns though I use variable offset to -1 and -2 for other columns.
    Could you please throw some light here as I got stuck with this issue quite a long time? I am using BI 7.0 Query Designer.
    Thanks in advance,
    Hanuma

    There is another variable "ZCUST_QTD" where "ZQTD_TXT" variable is restricted by offsets.
    Input variable is "ZALLOC_PRD" ex: 200709
    I have written Customer exit for the following.
    when 'ZCUST_QTD'.
    ZCUST_QTD will be low 200707 high 200709.
    when 'ZQTD_TXT'.
    "ZQTD_TXT" is 2007Q3.
    But I want "ZQTD_TXT" to be dynamic and different for 3 columns.
    Thanks for your reply.
    Thanks,
    Hanuma

  • Node variable in query - Processing type customer exit?

    We are on NW 2004S. I created a hierarchy for an info-object along with several nodes and child nodes.
    I also created a node variable in a query for this info-object. I have the following questions with regards to using node variables in a query.
    1) Can I use a node variable with processing type 'Customer Exit". My objective is to set the value of the node variable in the user exit.
    2) If answer to first question is "Yes", how would I code the node value in the user-exit - Example code or some pointers to that effect.
    I really appreciate your thoughts on this issue.
    Thanks,
    Sanjay

    Hi Sanjay,
    As far as I'm aware this hasn't changed in NW2004s, (in any case it still works), so:
    1)Yes you can, no difference with other type variables.
    2)In userexit EXIT_SAPLRRS0_001 (include ZXRSRU01).
    There's different options depending on at which stage you want to change it:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm
    If you do a forum search on above technical names I think you'll find plenty of coding samples, but if you want something more specific, I'd be happy to help you out.
    Regards,
    Pieter

  • Formula variable type customer exit

    Hi all,
    Can you explain me how link variable formula processing type customer exit to an infoobject?
    Can you give an example of the exit?
    Thanks
    Gianmarco

    Hi Gianmarco,
    Here's an example of some CMOD code that converts yesterday's date to the factory date - in this case it refers to Factory Calendar Z1. You'll have to create a formula variable (in this case the technical name of the formula variable is ZVFCYEST) to call the code. I'm not much of an ABAPer so it might not be the most efficient code in the world, but at least it works.....
    WHEN 'ZVFCYEST'.
    IF i_step = 1. " BEFORE THE POPUP
    z_today = sy-datum.
    z_yesterday = z_today - 1.
    CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
    EXPORTING
    correct_option = '-'
    date = z_yesterday
    factory_calendar_id = 'Z1'
    IMPORTING
    factorydate = z_yestfact.
    CLEAR l_s_range.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    l_s_range-low = z_yestfact.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    Hope this helps,
    Janet

  • Query variable type Customer Exit problem

    Hi All,
    I need to set a Profit Center variable value by Customer Exit. My Exit has to results a Profit Center Hierarachy NODE value. The problem is that the Query handles my return value as a single Profit Center (10 char long) but my Profit Center Nodes are longer than 10 characters and they are truncated to 10 chars. Therefore I get an error message, namely 'XYZ... PC is not exists in PC Hierarchy ABC...'
    How can I set that the Query or the code to get my result value not as a Profit Center but a Profit Center Hierarchy NODE?
    Thanks in Advance,
    Dezso

    Hello,
    Yes, I have set the right Hierarchy. If I change the PC variable to 'Characteristic variable' and set it on the selection screen everything is OK so the Hierarchy is good.
    Thanks,
    Dezso

  • Calculating with formula variables of type user exit

    I created the following query:
    Rows: Characteristic = Employee
    Column: KYF = Status
    Filter: Year, Month
    The KYF ist a formula containing a formula variable. This variable of type user exit should return a value recording to the value of employee and has to be read in a customizing (data-) table by the user exit.
    Is it possible to read the values of employee row by row from the internal table which contains the amount of data before processing to output screen and fill the 'Status'-KYF or should I create a virtual keyfigure for this case.
    Thanks for all your feedback,
    Angelika

    Hi,
    It seems like Status is master data of Employee.
    As per your process, if you do either formula variable or virtual keyfigure you will face query performance problem. More over you cant simply access record by record characteristic value in formula variable. It will be another complex process like you have to call the characteristic value via replacement path.
    You have the following choices:
    You mentioned master data is availabe in custom table. Try to pull the custom table master data into employee info object. Maintain  status as one of the attribute of the master data. Then you can display Status value simply in the report. This will be global access like you use this Status value n number of info providers which is having Employee as one of the info object in the info provider.
    If the previous way is not possible, include the Status in the info provider level and write a simple update routine to populate the values. This will be info provider level.
    I am not sure whether you are in development environment or productive. If developement, then you can choose simply any one of the above ways.
    Regards,
    Vivek

  • BEx Variable I_Step 2, Custom Exit, IF Condition fail for "var ready Inp"

    Hi all,
    could someone please help with the following issue.
    Variable definition is as followed.
    processing type = Customer Exit
    in the Details Tab I chose "Multiple Singles"
    and variable as "Optional"
    and "Variable is ready for Input".
    objective is, once the user enter fiscperiod like 004.2011, in the customer exit, using my own logic I would need to derive some set of periods and send back to query.
    In code, I am doing a check of I_STEP =2, then do the loop on the i_t_var_range, then capture the "LOW" value, then use my own logic to derive my own fiscperiods, then append the e_t_range, then Endif.
    when I debug, control is going to IF condition, but I see that I_step contained "1" not 2 as expected, that's where the condition is failing, and control is skipping the whole block of the code inside the If condition.
    this is giving me an impression that, the definition of the variable has some problem.
    Any Insights are greatly appreciated.

    I guess you need to use 2 variable.
    Var1 will store the value of user entered fiscal year period and then. this is normal Variable and is ready for Input".
    Var2 to will read that value of Var1 -
    then you write your logic -
    to populate Var2 correctly.
    And use Var2 in your query.
    Note : Var2 is not ready for input, and its exit variable
    Regards,
    Vinod

  • Variable Offset for Customer Exit??

    Hi,
    is it possible to have a variable offset for customer exit time variables?
    E.g. I have a variable current month but can I also create a one-year offset of that?
    In our system that doesn't work (but also the current month variable doesn't work...)
    thanks
    Sabine

    Hi,
    As it is mentioned by Mr.Voodi,it definately works.
    You only has given the answer for your problem .i.e you need to make sure the Customer exit variable is working proper.So take a look on the code used for it.
    With rgds,
    Anil Kumar Sharma .P

  • Include character value variable processed by customer exit in the report

    I have defined a character value variable' processed by 'customer exit'. i am troubleshooting a problem so I need to see the value of this variable. Is there a way to display this variable in the report. If so, what section, rows or columns? And how to configure?
    Thanks,
    Sharon

    Hi,
    You can add directly the variable, in BEx Analyzer 7.0 you can add variables in the Excel Cell that you would.
    Steps:
    - Select the Excel Cell
    - In the BEx Design Toolbox, select Insert text
    - When you are in Design Mode - click over the text element
    - Go to Constants tab and select the Custom Exit Variable
    - Save the workwook
    Regards,
    Dani

  • Variable of type user exit

    Hi all,
    I have a variable of type user exit which is used to let the user enter a characteristic value in a popup-box.
    I am able to display the box and let the user enter a value, but then I'm stuck. Where does this value go?? How can I make sure that this value actually is used in the variable??
    I am attaching my current code cause I feel like something is missing with regards to exporting the correct value.
    Thanks and regards,
    TM
    DATA: i_sval Like sval occurs 0 with Header Line.
    data: v_subrc like sy-subrc.
    i_sval-tabname = 'ZASSET_AREA'.
    i_sval-fieldname = 'AREA'.
    i_sval-fieldtext = 'Asset Area'.
    i_sval-field_obl = 'X'.
    append i_sval.
    CALL FUNCTION 'POPUP_GET_VALUES'
    EXPORTING
    NO_VALUE_CHECK = ' '
    POPUP_TITLE = 'Asset Area'
    START_COLUMN = '5'
    START_ROW = '5'
    IMPORTING
    RETURNCODE = v_subrc
    TABLES
    FIELDS = i_sval
    EXCEPTIONS
    ERROR_IN_FIELDS = 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.

    Hi,
    From the code you have written, I observe that after capturing the value in the pop-up, you are not passing the value back to the variable table.
    What I would suggest is, pass the variable value to the upc_var_cha_act table explicitly. This might resolve the problem.
    Sunil

  • Code help for formula variable with processing type customer exit

    Hi Gurus,
    I need help in user exit code. I am calculating a formula variable ( demand variability) in the user exit for a range of values given in the selection screen ( i.e processing based on the values given I_STEP = 2).
    i am able to populate the E_T_RANGE table  but the output is sending a single value output.
    Expected Output
    Plant ( sel screen Input) I Material ( Sel screen Input) I Demand Var(calculated O/P)
    1800   I  12345 I   0.609
    1700  I   21355 I   1.234                     
    Actual Result
    Plant ( sel screen Input) I Material ( Sel screen Input) I Demand Var(calculated O/P)
    1800   I  12345 I   0.609
    1700  I   21355 I   0.609(WRONG )               
    Here you can see that its sending the same values for all the plant and material combination.
    I found in debugging that it populates 2 values into E_T_RANGE table in loop. But it is giving out only one value to all.
    I tried to refresh and clear that but its giving the same output. Can we use E_T_RANGE in loop to give out range of values?. how to out put this throught user exit?
    did anyone face this kind of issue and solved it?. Help is needed urgently. any help or guidance is greatly appreciated.
    Regards
    satish.

    Hi Oliver,
    Thanks for the reply. Dont get confused here please. It was an example . For example
    I give one plant as input and 2 materials as input .
    You see the sample code :
    WHEN 'ZPRDEMVA'. ( formula variable name)
        IF i_step = 2.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                  WHERE VNAM = 'ZPRPLTSV'. ( plant variable input)
          CLEAR L_S_RANGE.
            v_werks          = LOC_VAR_RANGE-LOW.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                  WHERE VNAM = 'ZPRMATSV'.
          CLEAR L_S_RANGE.
            v_matnr          = LOC_VAR_RANGE-LOW.
    CALCULATES THE FORMULA VARIABLE (DEMAND VARIABILITY)    
    WE TAKE DATA FROM ANOTHER ODS AND DOES CALCULATION.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          l_s_range-low = sum2.
    DOES ALL CALCULATIONS PERFECTLY AND SINCE THERE ARE 2 MATERIALS AS INPUT, PUTS 2 VALUES IN E_T_RANGE. BUT IN THE OUPUT IT DUPLICATES SAME VALUE TO 2 RECORDS AS I POSTED IN THE FIRST
          Append l_s_range to E_T_RANGE.
          ENDLOOP.
          ENDLOOP.
        ENDIF.

  • Text Variable replace with Customer Exit Variable

    Dear Experts,
    I created a text variable based on replacementh path (instead of customer exit). The reference characteristic is same that as my customer exit Variable and replace it by Key.
    I want to replace it with already Existing Customer Exit Variable but it is not displaying in the List Box even though existing variable option is mandatory.
    Can any one Suggest me the answer for this.
    Regards
    Supraja.K

    I do not think you can select Customer Exit variable, if you see the type is selected to Char Value Variables and it is not editable.
    It would be suggested to go for Customer Exit procesing type for your text variable.
    Cheers,
    Neel.

  • Variable offset in customer exit

    Hello,
    I need to calculate the Date based on the user entered the values in the selection criteria 0calmonth.   Say the user entered the calmonth as 05/2008, i need to calculate the date and i can achieve this in customer exit.  But under calmonth variable if we use offset (as -1 or -2), it is not considerding.  Ex.  in selection criteria the value entered as 05/2008 and offset as -1,  then then date i need to calculate is based on value 04/2008 not 05/2008.   But in customer exit not sure how can i consider this offset value as well.
    Appreciate your earlier response.
    Thanks
    Sreedh

    Sreedh,
    if the offset is not fixed, then can you provide a formula variable for entering this offset and then pass on both the cal month and the offset to the customer exit?
    Lets assume calmonth is by variable V1 and formula variable is by v2, then pass to the customer exit v1-v2.
    Hope this helps
    Naveen.A

  • How to make BEX Customer Exit Variable inactive through Customer Exit Code

    Hi,
    I had created two variables VAR1 and VAR2 as Customer Exit variables
    If VAR1 is entered then it should automatically make the VAR2 as NO Entry Variable.
    vice versa also required.
    can u help me with any code in CMOD so that we can make it inactive through Customer Exit Code.
    Thanks in Advance.
    Sunil.

    What i want is not commenting the code
    I want to make the BEX Variable as inactive by using the Customer Exit Code
    EX : If value in VAR1 is entered  then VAR2 should become automatically inactive.
           If value in VAR2 is entered  then VAR1 should become automatically inactive.
    how can this be done
    Thanks in advance.
    Sunil

Maybe you are looking for

  • Create a ready to use image for SharePoint 2013 development environment.

    Hi  I have a requirement in which we are required to have an Image of the whole SharePoint 2013 environment, (ideally single server installation/standalone as I believe multi-tier would not be possible, or if possible suggest on that also), with all

  • Can't compile wsdl file provided by XI

    When I want to call the XI, I compile the wsdl file provided by XI,the error messages shows below: "ZTRRETURN.java": cannot resolve symbol: variable __hshCodeCalc in class functions.rfc.sap.document.sap_com.ZTRRETURN at line 233, column 9 "MI_SLOF_TR

  • Nokia 7100 Supernova!!

    Hello There! Can anyone tell me if this phone has a memory card place? At nokia.com says that there isn't but i think i see that in picture.. Does anyone know and tell me? Please!! Thanks for help!

  • Typing letters and suddenly get numbers and then nothing

    This is the second time in a week I've had this happen and I can't seem to find a similar thread on these very helpful forums, so maybe someone has some ideas? I was working on an email and started typing "Form 4562 when it becomes..." and then hit t

  • Version Cue with Dreamweaver

    How am I supposed to use Version Cue CS3 with Dreamweaver CS3. Am I supposed to install VC on the production server? I imported a web site as a project but what am I supposed to do now. Also I have the Mac version of CS3, can I still install windows