FORMULA VARIABLE "NO OF DAYS"

Hi
my report is based on infoset(ISARGL) and need one field (No of days)
No of  days = 0CALDAY - POSTING DATE.
BEFORE I WAS NOT HAVING 0CALDAY IN INFOSET(ISARGL)  AND ODS, BUT I ADDED IN BOTH ODS THIS 0CALDAY.
POSTING DATE I HAVE IN INFOSET.
for No of Days i am creating CKF based on formula variable.
here i used replacement path, KEY, DATE.
Formula variable FISFV_CD IS MADE FOR 0CALDAY.
GETTING SYSTEM ERROR.
Formula variable FISFV_CD is used in formula element No of Days and is
to be replaced from characteristic 0CALDAY or from an attribute of
0CALDAY. However, 0CALDAY is not contained in InfoProvider ISARGL.
Neither does it reference any ISARGL characteristic to No of Days and
0CALDAY is not a basic characteristic.

variable FISFV_CD having  (current date)
processing by  -          replacement path
replace variable with -  attribute value
attribute  -                  charac. reference (constant 1)
dimension id -              number
character.   -                calander day
variable FISFV_PD having  (posting date)
processing by  -          replacement path
replace variable with -  attribute value
attribute  -                  charac. reference (constant 1)
dimension id -              number
character.   -                posting date
My selection screen is coming for calender date .
now i am abele to see report but no of records coming 0.0000
plz provide me solution

Similar Messages

  • User Exit Formula Variable - to calculate #days of any month

    Hello Team,
    I need a column in my report layout which shows the #days of any month entered by the user. User entry 01.2014 to 03.2014 report should have 31 28 & 31 according to the Calendar month in the rows.
    To achieve this I'm using a user exit formula variable in my local calculation. An Optional Interval User Entry variable on CALMONTH is also put in at the filter section.
    I created a CLASS with 2 methods CONSTRUCTOR( vNam = 'ZC2C_DSONWDAYS') & GET_VALUES. We may also use FM /OSP/GET_DAYS_IN_MONTH but i need the code because I failed terribly.
    GET_VALUES method code:
    if i_step = 2.
       DATA: wa like line of i_t_var_range[].
       DATA: L_V_INDICATOR TYPE SCAL-INDICATOR.
       data: begin of ccrange ,
               iobjnm(30) type c,
                 sign(1),
                  opt(2),
                  low(7) type c,
                 high(7) type c,
             end of ccrange.
      data: l_s_range type rrrangesid,
            no_of_wrkdays type i value 0,
            startdate     type d,
            enddate       type d,
            startmth(2)   type c,
            endmth(2)     type c,
            startyr(4)    type c,
            endyr(4)      type c,
            endday(2)     type c,
            leapyear      type i value 0,
            dayofmth      type syst-datum.
    DATA:  day           type SCAL-INDICATOR.
      loop at i_t_var_range into wa.
        if wa-iobjnm = '0CALMONTH'.
           ccrange-sign = wa-sign.
           ccrange-opt = wa-opt.
           ccrange-low = wa-low.
           ccrange-high = wa-high.
           exit.
        endif.
      endloop.
      startyr  = ccrange-low+0(4).
      startmth = ccrange-low+4(2).
      endyr    = ccrange-high+0(4).
      endmth   = ccrange-high+4(2).
      concatenate startyr startmth '01' into startdate.
    * determine last day of the end month
      if endmth = '02'.
         leapyear = endyr mod 4.
         if leapyear = 0.
            endday = '29'.
         else.
            endday = '28'.
         endif.
      elseif ( endmth = '04' or endmth = '06' or endmth = '09' or endmth = '11' ).
           endday = '30'.
      else.
           endday = '31'.
      endif.
      concatenate endyr endmth endday into enddate.
      dayofmth = startdate.
    IF startmth <= endmth.
       startmth = startmth+1.
    ENDIF.
    * do it for all days in space of time
       WHILE dayofmth <= enddate.     "to date
         CALL FUNCTION '/OSP/GET_DAYS_IN_MONTH'
         EXPORTING
           input = startmth
         IMPORTING
           output = no_of_wrkdays.
           CLEAR l_s_range.
           l_s_range-sign = 'I'.
           l_s_range-opt = 'EQ'.
           l_s_range-low = no_of_wrkdays.
       append l_s_range to e_t_range.
           startmth = startmth + 1.
           CONCATENATE startyr startmth '01' into dayofmth.
        ENDWHILE.
    endif.
    endmethod.

    Hi Vasavi,
    1)  Create a FV to calculate no.of days  like below, with calmonth in ref characteristics :
    2. If you see number of days is an attribute of calmonth. Please enter that as below :
    3. Create a formula with above variable and make sure calmonth is added in the row.
    Its giving output like this :
    I hope this will help you.
    Thanks,

  • Display Formula Variable in Web Query or RRMX

    Hi, 
         I'm calculating a Formula Variable for Shipping Days in my query.  I would like this to display in my web page in the upper right of my screen.   I'm mostly interested in doing this for the web.  How would I access the value of this variable and display it on the web page outside of the table web item?
    Any ideas are greatly appreciated!...
    Thanks,

    Hi,
    use the web item Text elements
    and specify your variable.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/4e9d39d44cd45ee10000000a11402f/frameset.htm
    Heike

  • BEx Analyzer: Formula Variable with Replacement path change Month with Day

    Hi experts I'm facing this issue in BEx Analyzer.
    I need to have some dates in format DD/MM/YYYY in Index Structure, in order to do this I've created a formula variable with replacement path referenced to 0CALDAY characteristic.
    The formula works but it behaves in a strange way:
    if the day is higher than 12 the displaied result is correct (DD/MM/YYYY)
    if the day is lower or equal 12 the displaied result is wrong (MM/DD/YYYY)
    I'm on BW 7.01 SP6 and BEx Analyzer 7.10 SP12, excel 2007.
    anybody has faced this issue before?
    any help will be appreciated
    Daniele Cortopassi

    Hi Daniele,
    This seems pretty strange. Pls. redo validation with the dump data, as being a flat struture BEx does not apply any logic changes. May be it might have been MM/DD/YYYY format as in workbooks. Else you may change the property of 0calday display as "Text". Business Explorer > Display > KeyMaster Data/Texts > Texts (Plese check this option). If you are using some text table you may maintain the same using BI0/TCALDAY (Similar to BI0/TCALMONTH2). Guess it should be an excel based issue; if not you may try the same in WAD/Report designer to verify the nature of the issue. If you don't face these inconsistencies in WAD/RD then you may change excel formatting options. Lastly, please let us know if the infoobject has some predefined settings in RSA1 > Infoobject > (BEx) Properites.
    Thanks,
    Arun Bala

  • How to use formula variable to calculate the days for a document.

    Hi expert.
    I have a question, I need to calculate how many days it cost for a document, therefore , it should be like this,
    cost days = clearing date - creation date..
    how can I implement this calculated key figure by formula variable..
    Here cost days should be a key figure, but the clearing date and creation date are the characteristics in the document.
    it seems that formula variable by replacement path can not be used, do I have to use the customer exit for this variable ??
    any other good ways to calculate the cost days (beside during the data loading or by virtual key figure).
    I just want to implement this in the query designer..
    Please give a detailed steps if you could,  thanks a lot.

    Hi,
    These steps below are for the query designer in BI 7.0:
    1. First create a Formula in the Columns.
    2. Edit the formula, in the "Available Operands" see for the "Formula Variable".
    3. Right Click on the "Formula Variable" folder and then create a new variable.
    4. Edi the Formula Variable in the edit screen provide the Description and Technical name; select the processing by as Replacement path.
    5. In the reference characteristic select your characteristic "Creation Date".
    6. Save the variable.
    7. Select the variable into the formula and name the formula as Creation Date.
    Repeat the Same steps for the "Clearing Date".
    Then create another formula for the Cost days in which you mention as Clearing date (Formula) - Creation Date (Formula).
    Hope your issue is solved...
    Regards,
    Ravi Kanth

  • Finding no. of days in a month in formula variable

    Hi all
    I wanted to find out no. of days in a month in formula variable customer exit at bex. I did the following code, which returning X value. Can anybody helps here.
    WHEN 'ZFV_NO_DAYS_MONTH'.
         IF I_STEP = 2.
           CLEAR L_S_RANGE.
           READ TABLE I_T_VAR_RANGE INTO XTAB WITH KEY VNAM = 'zdate1'.
           V_DATE = XTAB-LOW.
           P_DATE = V_DATE+6(2).
           CALL FUNCTION 'HR_E_NUM_OF_DAYS_OF_MONTH'
             EXPORTING
               P_FECHA        = V_DATE
             IMPORTING
               NUMBER_OF_DAYS = V_DATE1.
           V_RES = V_DATE1 - P_DATE.
           L_S_RANGE-LOW = V_RES.
           APPEND L_S_RANGE TO E_T_RANGE.
         ENDIF.
    Regrds
    swetha

    Hi Swetha
    in your code itself just change something as mentioned below
    VDATE1 type as integer.
    WHEN 'ZFV_NO_DAYS_MONTH'.
         IF I_STEP = 2.
           CLEAR L_S_RANGE.
           READ TABLE I_T_VAR_RANGE INTO XTAB WITH KEY VNAM = 'zdate1'.
           V_DATE = XTAB-LOW.
        *Hide No need***   P_DATE = V_DATE+6(2).
           CALL FUNCTION 'HR_E_NUM_OF_DAYS_OF_MONTH'
             EXPORTING
               P_FECHA        = V_DATE
             IMPORTING
               NUMBER_OF_DAYS = V_DATE1.
       *hide**    V_RES = V_DATE1 - P_DATE.
       *hide**     L_S_RANGE-LOW = V_RES.
    *Add the below new line
    L_S_RANGE-LOW = V_DATE1.
           APPEND L_S_RANGE TO E_T_RANGE.
         ENDIF.
    Regards
    Sureshkumar C

  • Formula variable with replacement path on system date

    Hi Experts,
    I got a requirement to calculate "Days without payment" in report level.
    Days without payment = System Date - Payment Date.
    (Payment date field is available in CUBE, but system date field is not available in the CUBE)
    As we know, the difference b/w 2 dates is not possible directly.It can be possible by creating 2 formula variables with replacement paths on the dates and by writing aformula on these 2 formula variables.
    But the thing is I dont have system date readily available, and I tried by using SAP Exit. But we cant create formula variable replacement path on another variable (SAP EXIT).
    Do we have any SAP variable  for formula with replacement path readily avaliable to get system date (or) any other suggession.
    Please suggest me.
    Thanks,
    Sai Chand.S

    Hi Arminder,
    Thanks for your valuable answer.
    I tried doing the same previously.As u said we can get system date by creating customer exit variable.
    But the thing is to find difference b/w 2 dates, we cant do it directly, we need to create 2 formula variables with replacement path.
    1) Var1 = Formula variable with replacement path on system date(custoer exit variable).
    2) Var2 = Formula variable with replacement path on paymanet date.
    Number of days = var1 - var2.
    But as in 1st point, we cant create formula variable with replacement path on another variable, as system date is already a variable of type customer exit.
    We can create replacement paths only on characteristics.
    Please suggest me .
    Thanks,
    Sai Chand.S

  • Formula variable / Replacement path issue

    Hi Experts,
    I have a Field which has different status description.
    I want to bring the count of only one preferred description.
    Model Status
    A1     New
    A2     Open
    A3     New
    B1     Closed
    B2      Pending
    B3     New
    I want to view only the closed count of models
    Model Count of Closed
    A1     0
    A2     0
    A3     0
    B1     1
    B2      0
    B3     0
    I tried doing this using the formula variable and Replacement path with Status Field.
    But I'm unsuccessful in selection the desired status.
    Please help me to over come this.
    Thanks

    Hi Dear Prasad,
    I can't restrict the characterstic to Closed. If I do so the output will be only for Closed.
    But here I want to bring every model with value as 0 and 1 for model with closed status.
    Hi Dear Raju,
    The requirement what I have here is more complex. like, the result will be for 6 month displaying every single cal/day.
    and also I have to find out percentage of closed for every cal/day based on number of model we got.
    i have only asked a small portion of it, with this input i will manage to build the percentage etc....
    I  cannot bring counter inside. My report is already too wide to be displayed.
    I have tried similar kind of thing, using CKF, Formula Variable and Replacement path with the Char - InfoObj.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/009819ab-c96e-2910-bbb2-c85f7bdec04a&overridelayout=true
    But I'm not very sure how do I get only count of the my desired status.
    Please help.
    Thanks

  • How can I display a formula variable in the report?

    Hi,
    I have a requirement to display a formula variable value in the report. When the user runs a report this variable value should be called once and displayed below the report title or in a specified cell. Is it possible something like this could be done? if yes, can someone tell me how can I achieve this functionality. I appreciate your time and effort with points.
    Thanks,
    Rao.

    Hi Bhanu,
    In the query properties you can only see text variables and not the formula variables. If I define my number of working days as text variable and I can display in the report. However, I need to use this variable in some calculation in the report, so it has to be formula variable in order to use in calculations. I appreciate your input with points.
    Thanks,
    Rao.

  • Regarding Calculated key figure on Formula variable.

    Hi Gurus
    I have a requirement. My business scinerio in E-recruiting is to find out no of days between requistion creation date and offer made date in each month of year.
    For example we have around 120 requistion created in calyender year .
    10 requistion in jan , 10 in feb , 10 in march , 10 april , ...........10 december.
    my client wants out put as
    jan       no of days between offer made date to requistion creation date.
    feb             ,,
    march        ,,
    april           ,,
    may           ,,
    june           ,,
    july            ,,
    december    ,,
    i have requistion , req creation date ,  offer made date , cal period , cal year , no of requistion in my data model.
    i am unable to this report.
    i have made structure in rows
    jan = no of requistion based on calperiod = 1,
    dec = no of requistion based on calperiod =12.
    in Columns
    i created a calculated keyfigure based on formula variable with replacement path of req created date and offer date.
    i am not getting the data. my guess is i went some where wrong. please give some advice where i am going wrong . plz help me on this
    thanks
    roopa

    Hi
    Thanks for your reply.
    Both req creation date and offered date are in the free characteristics of query.
    main problem for me is how to get no of days between offered date - req creation date in jan month.
    can you give me exact formula how to write it down in query builder
    <b> hi Banu ( Queen of reporting ) can you through ligth n this issue</b>
    Thanks
    Roopa
    Message was edited by:
            roopa chow
    Message was edited by:
            roopa chow
    null

  • Creation of 4 new formula variable in bex.

    Hi All,
    i have one requirement from my customer.Can you please suggest me to achieve on this.
    All,
    Please can 4 new Formula Variables be created in SAP BW for all relevant structures
    Can the Pipe Test Date, Gas On Date, Completed Date and Abandoned Date be all based on Working days rather than calendar days
    My queries to the above requirements is:
    1.Do we need to write a code in customer exit(EXIT_SAPLRRS0_001) to achieve this.
    Please advice.
    Regards,
    Sakthivel S

    Hi,
    Do you have Working days field or data in your system? I think you are talking about Factory calendar.
    You can create 4 Formula variables by taking reference chars as Pipe Test Date, Gas On Date, Completed Date and Abandoned Date
    Yes, you need to write CMOD code to consider Working days.
    Can you explain requirement much more clearly?
    Regards,
    Suman

  • Date Difference between to date formula variable

    Hi Expert,
                    I have create two formula variable one for Document Date and another one for Goods reciept date
    and through formula variable I am subtracting these two formula variable and getting the no. of days between
    document date and GR date.
    This Shows me the correct value for one document date because i am filtering my query according to document
    date,
    while i am giving the date range for document date is shows me incorrect result. bucause document date formula
    variable contains only one date.
    Eg. i am giving the document date range like 01.02.2010 - 28.02.2010.
          In document date formula variable it contains only 01.02..2010 and GR date formula variable it contain correct
    value, thats why the date difference is incorrect because those PO which has PO date like 12.02.2010 for that Doc
    formula variable bring the same date like 01.02.2010.
    Please tell me the solution
    Thanks and Regards
    Lalit Kumar

    Hi Expert,
                     Actually i have created two formula variable on for PO date and another for GR date
    and i've restrict the query through PO date.
    while i am taking the single PO date in Selection parameter it showing me correct difference
    eg: Selection Parameter for PO: 01.01.2010
    But while i am taking the date interval for PO date
    eg: 01.01.2010-30.01.2010
    PO No: XXXXX123 , Doc date: 01.01.2010 GR date: 7.01.2010 then date difference is : 6
    PO No: XXXXX432, Doc date: 03.01.2010 GR date: 8.01.2010 then date difference is : 7 but it is 5
    Thanks and Regards
    Lalit Kumar

  • Decimal places in formula variable

    Hi all,
    I have a formula variable, for an integer (num of days), ready for input, that by default has 5 decimal places in the selection screen (g.e. 5,00000). It is possible, and if so, where can I change the number of decimal places to show in that variable?
    Please advice

    In my case the formula variable is properly displaying the value without any extra decimal places.
    I have done the following settings.
    Variable Entry - Mandatory
    Ready for Input
    Dimension indicator - Number
    Default value - 95.
    When i execute the report i can see just 95.
    Don't know why it is showing extra decimal places?

  • Formula variable in structures

    Hi,
    My report displays material wise (With Hierachy) actual ,budget,LE Quantities in YTD, QTD.(  I used Structures.)
    I am using 2 formula variables  to derive no of working days in month, no of working days gone based on the given input selection variable date(sy-date). formula to find % month gone (i.e no of working days gone/no of working days in month *100)
    I used the variable exit code and derived properly ,It is coming fine.But  I have to display this values only once in the report.
    If I use one more structure actual selection variable is itself is not coming when i execute the report.
    Could you please suggest in this issue.
    Thanks ,
    Joseph

    Hi,
    Please read the following:
    BEx Query Designer: Creating formula variables
    You have loaded data into your InfoProvider. To be able to use sign reversal in reporting, you have to define a formula variable in the query definition:
           1.      You are in the Query Designer. Under Key Figures, use the context menu to choose New Formula. The Formula Builder opens.
           2.      Under Formula Variables, choose New Variable from the context menu. The variables wizard appears.
           3.      Enter a name and a short text for the variable. Choose Replacement Path as the processing type.
           4.      Choose your hierarchy basic characteristic.
           5.      Choose Hierarchy Attribute as the replacement. The attribute Sign Reversal is automatically displayed.
           6.      Save your formula variable. When defining the formula variable, you get the factor 1 or –1, with which you can multiply the required key figure.
    Regards,
    Subha
    If you find it useful, pleae grant me points

  • Formula Variable in WAD (Counts) Not Displaying

    Hi Gurus,
    I am using BI7.0.  I have a query that analyzes a charactersitic, such as Priority, uses 2 date (charactersitic[Create Date and Close Date) fields.  I created a new forumla variable, using a Replacement path, to calculate the difference between the dates to derive the difference between the dates and a formula variable to derive the average number of days between the dates.  That is working well.
    However, when using the Bar Graph or the Pie graph I can not see the value of the formula variable that contains the average number of days. 
    I am assuming that because the key figure is a formula variable and not a 'key figure' then I would need to remodel my date fields as Key Figures in order for the Web Items, such as Pie/Bar Charts to view them.
    Has anyone seen this before.....is there anything I can do at the query level in order for my formula variable to show up in the WAD?
    Thank you

    Pallavi
    You are correct.  I had to select the "show summary/total" on the Web Item properities and the results defaulted.
    Thank you

Maybe you are looking for

  • Mac Network : Path to server folders is not the same for all my iMacs users

    Dear, My company is using 10 iMac with OS 10.8.5 and 1 Mac mini with OS 10.8.5 server. For 7 iMacs, my applescripts works very well because the path to the shared folders on the server are logical. I mean : Volumes/Sharedfolder/folderA/folderAA ... B

  • How to Convert OVM machines to VM Esx (.ova, .ovf) Format

    Hi, Could you pls help me on following issues? 1. How to Convert OVM machines to VM Esx (.OVA or .OVF) Format 2. How to take backup or copy VM from Oracle VM for Converting other formats. 3. Are we need to use the same version of Manager and Server?

  • SAPscript - Fixed position for vline

    Greetings. Hi i'm facing this problem in fixing the position for my vline ( to draw vertical line). The reason i need this solution is because currently i'm using variable that have flexible length. The vline will be push to the left and right depend

  • ZAV 10 Start apps from systemtray via spoon Icon

    Hi, With ZAV10 you can start application via the Spoon icon in systemtray. But this is what i have. I can do a login, but it's empty, even when i synchronize the "applications" stay empty. Also a "repair desktop" will do nothing. What's wrong? Thanks

  • Request: actions detect page view states

    We use buttons and links extensively to create large, complicated PDF publications that include layers and rich media.  Our target audience is casual viewers who are interested in the content, not in how Reader works.  So, we create our own interacti