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.

Similar Messages

  • 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

  • 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.

  • Text Variables processing as Customer Exit

    I have posted a similar problem but didnt get any response. Would appreciate if i get some kind of advice in this. I need to display header as Jan FY2007, Feb FY2007 and so on in my report. I want to use same text variable inorder to acheive this as i have a big number of colums displaying fiscal periods for all nearly 4-5 fiscal years. Replacement path doesnt apply as the"Label" option returns the short text. So i guess i need to write a customer exit inorder to fetch the medium text  description from 0FISPER table. I need some kind of help with ABAP code.
    Points will be awarded for any kind of helpful solution.

    Thanks Anil. Yes i am using BI 7.0 I thought of doing that. But as of now the BEx settings for 0FISCPER is Key and still it picks the Short text when i choose the replacament path with Label option. Do you still think if i change the Bex settings as Medium text it should solve the issue? And also please clarify after changing to Medium text do i still need to opt for Label replacement option to achieve my requirement?
    I will try to figure that out and will definitely assign points for your fruitful advice.
    Thanks.

  • 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

  • How to Verify the Variable Input in Customer EXIT

    Hi,
          I have a requirement to find out "Estimated Hours Total Calculation" with User input date range. I know little bit knowledge about Customer Exits please some one give me how to write code in CMOD. I have requirement how to get the Extimated Hours Total Calculation is follows ....
            Actual hours are the Hour Meter Reading used by the truck, it's calculated based on the "from and to" date parameters.       
    Collect the initial hours and adjusted hours from EM.       
    Get the PMN and Service Order data close to or within the Date Range.     
    1) If the Fleet Management Date (Start-up Date on EM) started before the input date Date Range (From-Date), calculate the average usage (in hours) based on the initial hours and the first PMN (or SO) falls within the Date Range to estimate the hour usage at start of Date Range. 
    2) If the Fleet Management Date started after the From-Date, use the Hour Meter (EM) as the Estimated Hours Begin. 
    3)If the last PMN (or SO) fell short of the Date Range (To-Date), obtain the Estimated Hours End by applying the average usage to fill the time-gap.       
    4)If the last PMN (or SO) fell after the Date Range (To-Date), get the Estimated Hours End by getting the next to last PMN performed inside the window parameter,           
         calculate the average usage between the two PMN's (or SO's) then apply the weighted average to fill the time-gap.       
    Adjusted Hours, if not zero or null, needs to be added to the Ending Hours to achieve the real number. 
    For Example
    User Input Date Range:  Jan. 1, 2006 - Dec. 31, 2006          
    Initial Hour (Equipment Master):  10          
    Adjusted Hours (Equipment Master): 0          
    Fleet Management Date (Equipment Master):  Dec. 1, 2005          
    1st PM Notification (Feb. 1, 2006):  410          
    Last PM Notification (Feb. 1, 2007):  2810          
    Second to last PMN (Dec. 1, 2006):  2410          
         Equipment was put into service (12/1/05) before the Date Range, needs to find the Estimated Hours Begin.     
         The first PM was performed (2/1/06) exactly two months from in-service date (12/1/05).
         Average monthly usuage from first PMN = (410 - 10) / 2 = 200
         Estimated Hours Begin = 200 + 10 = 210 (estimated Hour Meter Reading on Jan. 1, 2006)
         Average monthly usuage from the last 2 PMN = (2810 - 2410) / 2 months = 200
         Estimated Hours End = 2410 + 200 + 0 (adjusted hours) = 2610 (estimated Hour Meter Reading on Dec. 31, 2006)
         Estimated Hours Total = 2610 - 210 = 2400
               Please give me your valuable answers. Please let me know if you need any further information.
    Thanks
    Dave Sam.

    hi,
    well, your requirement seems clear but complex and needs more clarification:
    - what kind of infoprovider do you use
    - what is posted in your provider, I mean which characteristics and and key figures (name and descriptions)
    - what is the user input
    depending on that, the implementation may vary
    Please clarifiy
    Olivier.

  • How to create Text Variables in BEx Query Designer

    How  can i create Text Variables in Bex Q.D.
    I am able to create characteristic variables
    but i can't find option to create text variables.
    What's the requirement to create Text variables in Bex Q.D.
    When i try to create Text variable for 0calDay.. the variable type is characteristic by Default and disabled.
    How can i create text variables related to 0CalDay with which i need to work in Customer Exit.

    Hi,
    You have to create characteristic variable processing by Customer Exit by considering 0CalDay as a Reference Characteristic
    After creation of the above variable, you restrict your KF with the above created variable.
    Now you can create a Text variable for the description of your KF. This way it works...........
    Regards,
    Suman

  • Problem in Displaying text Variable

    Hi All,
    I have problem in Displaying text Variable in the column header.
    My requirement is as follows.
    Column Level:
    0Calmonth/Year
    Key figures
    Keyfigure1 - Current Month  - Text Variable1
    Keyfigure2 - Previous Month - Text Variable2
    Keyfigure3 - Previous Month - Same as Text Variable2 - Display same month
    So based on each 0Calmonth/year these three keygirues should display in Header section like.
    Selection screen
    0Calmonth/Year - 03.2005 - 06.2005
    Result should be for each month.
    0Calmonth/Year
    03.2005                                04.2005                              05.2005
    03.2005 | 02.2005 | 02.20005  04.2005 | 03.2005 | 03.2005 05.2005 | 04.2005 | 04.2005.
    I have created two text variable with Customer exit.But not able to show exact months in the header section.
    For first three columns months are coming exactly, but from fourth columns it should display next month, but it is not coming.
    I have tried to code, but not successfull.
    Please help me how to go about this.
    Will assign full points.
    Regards,
    Vijay

    hi
    Check here........
    Re: Customer Exist for "From Current Date To Month End"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Cal month
    it might helpful for you
    assign points if helpful

  • How to display the variable content in message?

    Hi anybody
    please let me know How to display the variable content in message?
    please send few lines of sample code to understand that
    thanks in advance

    Hi,
    Check out the link
    http://help.sap.com/saphelp_nw70/helpdata/en/2c/840b42202cce6ce10000000a155106/content.htm
    REPORT Y9020027 LINE-SIZE 130.    "Release 3.1G, 4.5A                  
    BREAK-POINT.
    MOVE: 'TESTREPORT for    "ASSIGN  FFeld+o(l)  TO  "        '     
            TO SY-TITLE.
          Declaration of variables    **********************
    FIELD-SYMBOLS <FS1>.
    DATA: FFELD8(8)   TYPE F VALUE '1022333'.   "Unusual: Explicit 8 bytes
    *DATA: ZFELD1(2)    TYPE N.            "Here slack bytes are (DW border)
                                         "necessary                      
                  "If you like computing error, please uncomment the above
    DATA: FFELDX(8)   TYPE F VALUE '7777777'.
    DATA: FFELDA(8)   TYPE F VALUE '7333213'.
    DATA: NFELDX(400) TYPE N.
    DATA: OFFX(4) TYPE I VALUE 160.
    DATA: LENX(4) TYPE I VALUE 8.
                  Main Section             *******************
        SKIP.
        WRITE: /5  'Example 1   **** inadmissible ASSIGN ***' COLOR 6.
        WRITE: /10 'Inadmissible ASSIGN: ''ASSIGN FFELD4+1(3) TO <FS1>'' '.
      ASSIGN FFELD4+1(3) TO <FS1>.
        ULINE.
        SKIP 2.
        SKIP.
    ASSIGN FFELD8+8(8) TO <FS1>.     "<-- Assigning of variable  FFELDX  !!
        BREAK-POINT.
        WRITE: / 'ASSIGN command with FFELD8, but FFELDX will be assigned'
                  COLOR 3.
        WRITE: /5 'Example 2'.
        PERFORM DISPLAY-FFELD USING FFELD8 'FFELD8'.
        WRITE: /10 'Content of   FFELDX      :', FFELDX.
        ULINE. SKIP 2.
        SKIP.
    ASSIGN FFELD8+16(8) TO <FS1>.    "<-- Assiging a few FFELDA to <FS1>  
        BREAK-POINT.
        WRITE: / 'ASSIGN with FFELD8, but instead FFELDA is assigned'
                  COLOR 3.
        WRITE: /5 'Example 3'.
        WRITE: /10 'Content of   FFELDA      :', FFELDA.
        PERFORM DISPLAY-FFELD USING FFELD8 'FFELD8'.
        WRITE: /10 'Content of   FFELDA      :', FFELDA.
        ULINE. SKIP 2.
    BREAK-POINT.
       DO 4 TIMES.
         ASSIGN FFELD8+OFFX(LENX) TO <FS1>.     "Zuordnung auf OFFX zu <FS1>
            WRITE: / 'ASSIGN command with FFELD8, es wird NFELDX zugeordnet'
                      COLOR 5.
             WRITE: /5 'Example 4', 'DO-Schleife Nr.:', SY-INDEX.
             PERFORM DISPLAY-FFELD USING FFELD8 'FFELD8'.
             WRITE: /10 'Content of NFELDX145(40)  :', NFELDX145(40).
             ULINE. SKIP 2.
             ADD 8 TO OFFX.
       ENDDO.
                   Subroutines             *******************
               Display of data fields and field symbols                  *
    FORM DISPLAY-FFELD USING FFELD FNAME.
    WRITE: /10 'Content of', FNAME, ':', FFELD.
    PERFORM FELDEIGENSCHAFTEN USING FFELD.
    WRITE: /10 'Content of <FS1> :', <FS1>.
    PERFORM FELDEIGENSCHAFTEN USING <FS1>.
    ADD   111    TO <FS1>.               "<-- Das Feldsybmol wird verwendet
    WRITE: /10 'ADD 111 TO <FS1>'.
    ULINE.
    WRITE: /10 'Content of', FNAME, 35 ':', FFELD.
    WRITE: /10 'Content of <FS1>',  35 ':', <FS1>.
    ENDFORM.
       Determination of field properties (only for information)          *
    FORM FELDEIGENSCHAFTEN USING ALLG.
    DATA: FLAENGE(2) TYPE N.
    DATA: FTYP(1) TYPE C.
    DATA: FOUT(2) TYPE N.
    DATA: FDEZ(2) TYPE N.
      ULINE.
      DESCRIBE FIELD ALLG LENGTH FLAENGE.
      WRITE: /10 'Field length  :', FLAENGE.
      DESCRIBE FIELD ALLG TYPE FTYP.
      WRITE: /10 'Field type    :', FTYP.
      DESCRIBE FIELD ALLG OUTPUT-LENGTH FOUT.
      WRITE: /10 'Output length :', FOUT.
      DESCRIBE FIELD ALLG DECIMALS FDEZ.
      WRITE: /10 'Decimals      :', FDEZ.
      SKIP 1.
    ENDFORM.
    END OF PROGRAM *************************************

  • How to display a variable in the report?

    hi all
    i want to use one complex sql statement which will return only one value and i need to display it in report. i'm new to OBIEE. i thought of creating a repository variable to hold that value. but im not sure of how to display the variable in the report.
    Any idea?
    Your help is appreciated

    Hi where do you want to show that value in answers i mean in which part of answers, you want to show that?
    see this
    http://bischool.wordpress.com/2009/05/05/presentation-variable-values-in-report-titles-or-using-presentation-variable-in-dashboard-text-object-and-narrative-view-directly/
    also see this to where and how to use variables in answers
    http://shivabizint.wordpress.com/2008/10/02/oracle-bi-ee-variables-overview/

  • 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

  • HOW TO DISPLAY A VARIABLE

    hi friends,
    I have a variable in wk_matnr value is 'MATERIAL123'.
    How to display this variable like Material No :-MATERIAL123
    How to code for this in BSP.
    Moosa

    Hi,
    To display any variable in BSP.
    you need to do this:
    <%= varibale name %>
    For your variable,
    <%= wk_matnr %>
    OR
    <htmlb:label for = "wkm"
                       text = "Material No" />
    <htmlb:text id = "wkm"
    text = "<%= wk_matnr %>" />
    Hope this is helpful.
    Regards,
    Abhinav

  • How to display text on last but one page in SAPSCRIPTS

    how to display text on last but one page in SAPSCRIPTS

    u have create one Foooter window , this has to be called in  only One Page.So hardcode /assign this window to only one PAGE number.
    regards
    Prabhu

  • 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

Maybe you are looking for