Quarter Range

Hi All
I have quaretrs in the follwing range:
Q1- JAN,FEB,MARCH
Q2-APRIL,MAY,JUNE
Q3-JULY,AUG,SEP
Q4-OCT,NOV,DEC
how can i chane it to :
Q1-JUL,AUG,SEP
Q2-OCT,NOV,DEC
Q3-JAN,FEB,MAR
Q4-APRIL,MAY,JUNE
thnks

There are a lot of things you could do:
Create a table that has dates, and month, quarter, and year you want,
Use a decode/case statement, or
Add 6 months to the date, and then get the quarter
are the first 3 that come to mind

Similar Messages

  • Quarter date...

    Hello
    I need to write a program to do the following:
    User enters calendar quarter range on variable screen
    if the "To" calquarter falls in the current quarter, data as of today-7days needs to be picked up
    The issue is, how do I determine which quarter today falls in.. because the fiscal quarter we use is not the same as the calendar quarter. If March is 1st quarter in the regular calendar, for us it is the second quarter. Is there a way for me to maintain the quarter start and end dates for the program to read?
    Thanks
    Kashka.

    SQL> with t as (
      2             select 'Q1 2007' d from dual union all
      3             select 'Q2 2007' d from dual union all
      4             select 'Q3 2007' d from dual union all
      5             select 'Q4 2007' d from dual union all
      6             select 'Q1 2008' d from dual union all
      7             select 'Q2 2008' d from dual union all
      8             select 'Q3 2008' d from dual union all
      9             select 'Q4 2008' d from dual
    10            )
    11  select  *
    12    from  t
    13    where to_date(d,'"Q"MM YYYY') > to_date('Q3 2007','"Q"MM YYYY')
    14  /
    D
    Q4 2007
    Q1 2008
    Q2 2008
    Q3 2008
    Q4 2008
    SQL> SY.

  • Change in Report layout if no of Quarters=16

    Hi Experts,
                    In a Query i hav a variable fiscal yera/quarter(range). When ever i enter the range the report must be generated for all the Quarters with in the range. But there is a situation in which if the diffrence between the FROM & TO (Range) is 16(4 Years) Instead of generating the report for each Quarter,The result must be displayed for each Year(between the range).
    2001.1  |   2001.2  |  2001.3   |----so on if  the difference between the range is <16.
    2001   |     2002     |    2003    |    2004 if the difference between the range is = 16.
    How can i achieve this .
    Thanks in Advance .
    Bhargava

    Hi Bhargava,
    AFAIK there is not any way to achieve this automatically.
    You could however just add the year as a free char. The users would then have the possibility to swap the quarters with years.
    Hope it helps.
    BR
    Stefan

  • When ever  enter the date start date up to next year same date between the days divided into 8 parts

    when ever  enter the date start date up to next year same date between the days divided into 8 parts
    Q1.1 (YYYY) = 1st half of Quarter 1 for year YYYY
    Q1.2 (YYYY) = 2nd half of Quarter1 for year YYYY
    Q2.1 (YYYY) = 1st half of Quarter 2 for year YYYY
    Q2.2 (YYYY) = 2nd half of Quarter 2 for year YYYY
    Q3.1 (YYYY) = 1st half of Quarter 3 for year YYYY
    Q3.2 (YYYY) = 2nd half of QuarterQ3 for year YYYY
    Q4.1 (YYYY) = 1st half of Quarter 4 for year YYYY
    Q4.2 (YYYY) = 2nd half of Quarter 4 for year YYYY
    Here YYYY depicts the year.
    e.g. Q1.2 (2014) depicts the 2nd half of Quarter 1 for year 2014.
    The description of these values are explained below.
    The table below provides the description about each value:
    Quarter     Quarter Range      Start Date
    Q1.1      1 Jan - 15 Feb         1st  Jan
    Q1.2      16 Feb-31 Mar         16th Feb
    Q2.1      1 Apr- 15 May          1st Apr
    Q2.2      16 May-30 June       16th May
    Q3.1      1 Jul-15 Aug             1th Jul
    Q3.2      16 Aug -30 Sep       16th Aug
    Q4.1      1 Oct -15 Nov           1st Oct
    Q4.2      16 Nov – 31 Dec      16th Nov
    The dropdown values in time window needs to be updated as per date entered by the user in the Audit Plan start date and
    should display the next four Quarter (each divided in 2 half  i.e. Eight values ) along with the year  from the selected Audit plan start date.
    for eg. If the Plan start date is given as August 10 2013 then the Time window will display the following options:                      
    Q3.2 (2013)                
    Q 4.1 (2013)               
    Q 4.2 (2013)               
    Q 1.1 (2014)               
    Q1.2 (2014)                
    Q2.1 (2014)                
    Q 2.2 (2014)               
    Q 3.1 (2014)               
    You can refer to the Table above and look that 10 Aug 2013 falls under the Q3.1 so Time window will display the next next 8 half Quarters ( Total 4 Quarter) till Q 3.1 for the year 2014.

    Hello,
    WITH half_quarters AS(
        SELECT  ADD_MONTHS(TRUNC(DATE '2013-08-15','Q'), 3*(LEVEL - 1)) hq_start
               ,1 part
        FROM    dual
        CONNECT BY ROWNUM <= 5
        UNION ALL
        SELECT  ADD_MONTHS(TRUNC(DATE '2013-08-15','Q'), 3*(LEVEL - 1) + 1) + 15 hq_start
               ,2 part
        FROM    dual
        CONNECT BY ROWNUM <= 5
    ,ordered_half_quarters AS(
        SELECT  hq_start
               ,part
               ,ROW_NUMBER() OVER (ORDER BY hq_start) r
        FROM    half_quarters
        WHERE   hq_start > DATE '2013-08-15'
    SELECT  'Q '||TO_CHAR(hq_start,'Q')||'.'||part||' ('||TO_CHAR(hq_start,'YYYY')||')' q
    FROM    ordered_half_quarters
    WHERE   r <= 8
    ORDER BY r;
    Q       
    Q 3.2 (2013) 
    Q 4.1 (2013) 
    Q 4.2 (2013) 
    Q 1.1 (2014) 
    Q 1.2 (2014) 
    Q 2.1 (2014) 
    Q 2.2 (2014) 
    Q 3.1 (2014) 
    half_quarters generates the start dates of every half of a quarter, starting with the begin of the first quarter that contains the sample date.
    The next step is to order the dates and to select only those after the sample date.
    The last part formats the output and orders the data.
    Regards
    Marcus

  • MDX Prior Quarter Day Range

    I've been tasked with a rather odd Time intelligence function by my finance group that I'm trying to puzzle out.
    I've been asked with creating a measure within our SSAS Cube to allow for seeing previous quarter to date based on how far we are in the current quarter. But instead of seeing a standard idea of days elapsed currently versus days elapsed previously, they would
    like to see days remaining versus previous days remaining.
    What I mean by that is, take 1/22/2015 for example. We have 48 days remaining in our current quarter, which I have by means of a calculated measure. I need to find the corresponding working day from the previous quarter where it is also at 48 days remaining.
    At that point I could create a date range with some aggregate functions off of the first date in the previous quarter to the corresponding date found in the above and come up with what they are looking for.
    The best idea I've had so far is to possibly do this in the database section itself, by creating a new column that is essentially the calculated number of days remaining but stored. But at that point I'm not sure how to take a calculated measure in SSAS and
    filter a previous quarter date member to use that property as it were.
    Any direction would be much appreciated here.

    Hi thebyob, 
    Thank you for your question.  
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.  
    Thank you for your understanding and support. 
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Calculate Quarter within Date Range

    I have question regarding a date range.  I created a formula like so
    {SO_SalesOrderHistoryHeader.OrderDate} >=DateValue (2008,04,01) and {SO_SalesOrderHistoryHeader.OrderDate}<=DateValue (2008,06,30)
    I get my "True" which is fine, my problem is, what happens when it goes to the next year? Or I want to look at a previous year?  Do I have to go back and edit my formula? 
    Or is there a way to tell my formula to go by whatever year is entered?

    You can use the date range but the problem I forsee with it is which date are you going to use?  The start date or end date?  The choice also determines which date to use if the two dates span across years.  For example, if your date range is 2008-10-01 to 2009-03-31. 
    If the above situation will not occur, then you can use the dates of your date range thus:
    Modify your formula thus to use the year of the start date of your date range
    {SO_SalesOrderHistoryHeader.OrderDate} >=DateValue (year(minimum(?date range})) ,04,01) and {SO_SalesOrderHistoryHeader.OrderDate}<=DateValue (year(minimum(?date range})) ,06,30)
    Modify your formula thus to use the year of the end date of your date range
    {SO_SalesOrderHistoryHeader.OrderDate} >=DateValue (year(maximum(?date range})) ,04,01) and {SO_SalesOrderHistoryHeader.OrderDate}<=DateValue (year(maximum(?date range})) ,06,30)
    Hope this made things clear as mud

  • Modification in MB5B prg...material stock between a date range

    Hi experts
    I have to modify mb5b tranx prg . presently we are using date as selection criteria..but now onwards user wants G/L account along with date as selection criteria. I created one selec-option for field HKONT type hkont-bseg. Now in select queries i need ur help ..Kindly tell me where i need to use this field in my select queries to fetch RELEVANT data.
    Regards
    Anu
    CODE:
    REPORT ZRM07MLBD NO STANDARD PAGE HEADING MESSAGE-ID M7 LINE-SIZE 280.
    ********my change*******
    tables : BSEG.
    TYPE-POOLS:  IMREP,                   " Typen Bestandsführungsreporting
                 SLIS.                    " Typen Listviewer
    INCLUDE ZRM07MLDD.
    DATA FLAG(1) TYPE C VALUE ' '.
    DATA BAL_QTY TYPE P DECIMALS 2.
    DATA BAL_AMT TYPE P DECIMALS 2.
    *include:  rm07mldd.     " reportspezifische Datendefinitionen
    "n571473
    define the selection screen here                          "n571473
    "n571473
    SELECTION-SCREEN BEGIN OF BLOCK DATABASE-SELECTION
              WITH FRAME TITLE TEXT-001.
    Text-001: Datenbankabgrenzungen
    SELECT-OPTIONS: MATNR FOR MARD-MATNR MEMORY ID MAT
                                         MATCHCODE OBJECT MAT1,
                    BUKRS FOR T001-BUKRS  MEMORY ID BUK,
                    WERKS FOR T001W-WERKS MEMORY ID WRK,
                    LGORT FOR T001L-LGORT,
                    CHARG FOR MCHB-CHARG,
                    BWTAR FOR MBEW-BWTAR,
                    BWART FOR MSEG-BWART.
    PARAMETERS SOBKZ LIKE MSEG-SOBKZ.
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS: DATUM FOR MKPF-BUDAT NO-EXTENSION,
    **********my change**************
              HKONT FOR BSEG-HKONT.
    ********END CHANGE************
    SELECTION-SCREEN END OF BLOCK DATABASE-SELECTION.
    SELECTION-SCREEN BEGIN OF BLOCK BESTANDSART
    WITH FRAME TITLE TEXT-002.
    Text-002: Bestandsart
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS LGBST LIKE AM07M-LGBST RADIOBUTTON GROUP BART DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 4(50) TEXT-010 FOR FIELD LGBST.
    Text-010: Lagerort-/Chargenbestand
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS BWBST LIKE AM07M-BWBST RADIOBUTTON GROUP BART.
    SELECTION-SCREEN COMMENT 4(50) TEXT-011 FOR FIELD BWBST.
    Text-011: bewerteter Bestand
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS SBBST LIKE AM07M-SBBST RADIOBUTTON GROUP BART.
    SELECTION-SCREEN COMMENT 4(50) TEXT-012 FOR FIELD SBBST.
    Text-012: Sonderbestand
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BESTANDSART.
    Commented By Rachit Material group Not Required
    improved definition of parameters for scope of list       "n599218
    *SELECTION-SCREEN BEGIN OF BLOCK MARA WITH FRAME TITLE TEXT-040.
    **selection-screen begin of line.
    *PARAMETERS P_MATKL LIKE MARA-MATKL.
    **selection-screen end of line.
    **SELECTION-SCREEN COMMENT 4(50) TEXT-030 for fieLD s_matkl.
    *SELECTION-SCREEN END OF BLOCK MARA.
    SELECTION-SCREEN BEGIN OF BLOCK LISTUMFANG
      WITH FRAME TITLE TEXT-003.  "Listumfang
    the following 3 parameters became obsolete do not use     "n599218
    anymor. They are still here to inform the user about      "n599218
    that he is using old variants or SUBMIT commands          "n599218
    PARAMETERS :                                                "n599218
      XONUL  LIKE AM07M-XONUL            NO-DISPLAY,            "n599218
      XVBST  LIKE AM07M-XVBST            NO-DISPLAY,            "n599218
      XNVBST LIKE AM07M-XNVBS            NO-DISPLAY.            "n599218
    7 new categories for the scope of list                    "n599218
                                                              "n599218
    cat. I docs I stock on   I    I stock on I Parameter      "n599218
         I      I start date I    I end date I                "n599218
    ---+--+--------++------+--------      "n599218
    1   I yes  I =  zero    I =  I =  zero  I pa_wdzer       "n599218
    2   I yes  I =  zero    I <> I <> zero  I pa_wdzew       "n599218
    3   I yes  I <> zero    I <> I =  zero  I pa_wdwiz       "n599218
    4   I yes  I <> zero    I <> I <> zero  I pa_wdwuw       "n599218
    5   I yes  I <> zero    I =  I <> zero  I pa_wdwew       "n599218
         I      I            I    I          I                "n599218
    6   I no   I =  zero    I =  I =  zero  I pa_ndzer       "n599218
    7   I no   I <> zero    I =  I <> zero  I pa_ndsto       "n599218
                                                              "n599218
    definition of the pushbutton : show or hide the following "n599218
    parameters for the scope of list                          "n599218
    SELECTION-SCREEN PUSHBUTTON /1(20) PB_LIU                   "n599218
                               USER-COMMAND LIU.                "n599218
                                                                "n599218
    text line : materials with movements                      "n599218
    SELECTION-SCREEN BEGIN OF LINE.                             "n599218
    SELECTION-SCREEN COMMENT 1(55) TEXT-072                     "n599218
                             MODIF ID LIU.                      "n599218
    SELECTION-SCREEN END OF LINE.                               "n599218
                                                                "n599218
    with movements / start = zero  =  end = zero              "n599218
    1   I yes  I =  zero    I =  I =  zero  I pa_wdzer       "n599218
    SELECTION-SCREEN BEGIN OF LINE.                             "n599218
    SELECTION-SCREEN POSITION 2.                                "n599218
    PARAMETERS : PA_WDZER    LIKE AM07M-MB5B_XONUL              "n599218
                             MODIF ID LIU.                      "n599218
      text-083 : no opening stock ; no closing stock          "n599218
    SELECTION-SCREEN COMMENT 5(70) TEXT-083                     "n599218
                             FOR FIELD PA_WDZER                 "n599218
                             MODIF ID LIU.                      "n599218
    SELECTION-SCREEN END OF LINE.                               "n599218
                                                                "n599218
    with movements / start = zero  =  end <> zero             "n599218
    2   I yes  I =  zero    I <> I <> zero  I pa_wdzew       "n599218
    SELECTION-SCREEN BEGIN OF LINE.                             "n599218
    SELECTION-SCREEN POSITION 2.                                "n599218
    PARAMETERS : PA_WDZEW    LIKE AM07M-MB5B_XONUL              "n599218
                             MODIF ID LIU.                      "n599218
      text-084 : no opening stock ; with closing stock        "n599218
    SELECTION-SCREEN COMMENT 5(70) TEXT-084                     "n599218
                             FOR FIELD PA_WDZEW                 "n599218
                             MODIF ID LIU.                      "n599218
    SELECTION-SCREEN END OF LINE.                               "n599218
                                                                "n599218
    with movements / start stock <> 0 / end stock = 0         "n599218
    3   I yes  I <> zero    I <> I =  zero  I pa_wdwiz       "n599218
    SELECTION-SCREEN BEGIN OF LINE.                             "n599218
    SELECTION-SCREEN POSITION 2.                                "n599218
    PARAMETERS : PA_WDWIZ    LIKE AM07M-MB5B_XONUL              "n599218
                             MODIF ID LIU.                      "n599218
      text-085 : with opening stock ; no closing stock        "n599218
    SELECTION-SCREEN COMMENT 5(70) TEXT-085                     "n599218
                             FOR FIELD PA_WDWIZ                 "n599218
                             MODIF ID LIU.                      "n599218
    SELECTION-SCREEN END OF LINE.                               "n599218
                                                                "n599218
    with movements / with start and end stocks / different    "n599218
    4   I yes  I <> zero    I <> I <> zero  I pa_wdwuw       "n599218
    SELECTION-SCREEN BEGIN OF LINE.                             "n599218
    SELECTION-SCREEN POSITION 2.                                "n599218
    PARAMETERS : PA_WDWUW    LIKE AM07M-MB5B_XONUL              "n599218
                             MODIF ID LIU.                      "n599218
      with opening stock ; with closing stock ; changed       "n599218
    SELECTION-SCREEN COMMENT 5(70) TEXT-086                     "n599218
                             FOR FIELD PA_WDWUW                 "n599218
                             MODIF ID LIU.                      "n599218
    SELECTION-SCREEN END OF LINE.                               "n599218
                                                                "n599218
    with movements / with start and end stock / equal         "n599218
    5   I yes  I <> zero    I =  I <> zero  I pa_wdwew       "n599218
    SELECTION-SCREEN BEGIN OF LINE.                             "n599218
    SELECTION-SCREEN POSITION 2.                                "n599218
    PARAMETERS : PA_WDWEW    LIKE AM07M-MB5B_XONUL              "n599218
                             MODIF ID LIU.                      "n599218
      with opening stock ; with closing stock ; non-changed   "n599218
    SELECTION-SCREEN COMMENT 5(70) TEXT-087                     "n599218
                             FOR FIELD PA_WDWEW                 "n599218
                             MODIF ID LIU.                      "n599218
    SELECTION-SCREEN END OF LINE.                               "n599218
                                                                "n599218
    text line : materials without movements                   "n599218
    SELECTION-SCREEN BEGIN OF LINE.                             "n599218
    SELECTION-SCREEN COMMENT 1(55) TEXT-073                     "n599218
                             MODIF ID LIU.                      "n599218
    SELECTION-SCREEN END OF LINE.                               "n599218
                                                                "n599218
    materials without movements / stocks = zero               "n599218
    6   I no   I =  zero    I =  I =  zero  I pa_ndzer       "n599218
    SELECTION-SCREEN BEGIN OF LINE.                             "n599218
    SELECTION-SCREEN POSITION 2.                                "n599218
    PARAMETERS : PA_NDZER    LIKE AM07M-MB5B_XONUL              "n599218
                             MODIF ID LIU.                      "n599218
      text-083 : no opening stock ; no closing stock          "n599218
    SELECTION-SCREEN COMMENT 5(70) TEXT-083                     "n599218
                             FOR FIELD PA_NDZER                 "n599218
                             MODIF ID LIU.                      "n599218
    SELECTION-SCREEN END OF LINE.                               "n599218
                                                                "n599218
    materials without movements / with start or end stock     "n599218
    7   I no   I <> zero    I =  I <> zero  I pa_ndsto       "n599218
    SELECTION-SCREEN BEGIN OF LINE.                             "n599218
    SELECTION-SCREEN POSITION 2.                                "n599218
    PARAMETERS : PA_NDSTO    LIKE AM07M-MB5B_XONUL              "n599218
                             MODIF ID LIU.                      "n599218
      with opening stock ; with closing stock ; non-changed   "n599218
    SELECTION-SCREEN COMMENT 5(70) TEXT-087                     "n599218
                             FOR FIELD PA_NDSTO                 "n599218
                             MODIF ID LIU.                      "n599218
    SELECTION-SCREEN END OF LINE.                               "n599218
                                                                "n599218
    SELECTION-SCREEN END OF BLOCK LISTUMFANG.
    SELECTION-SCREEN BEGIN OF BLOCK EINSTELLUNGEN
       WITH FRAME TITLE TEXT-068.  "Settings
    parameter for totals only - hierseq. list
    corresponding display variant
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 1.
    PARAMETERS XSUM          LIKE AM07M-XSUM.
    SELECTION-SCREEN COMMENT 4(60) TEXT-090 FOR FIELD XSUM.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(30) TEXT-091 FOR FIELD PA_SUVAR.
    *Commented by Rachit
    SELECTION-SCREEN POSITION 40.
    PARAMETERS: PA_SUVAR LIKE DISVARIANT-VARIANT.
    SELECTION-SCREEN END OF LINE.
    parameter for totals only - flat list + corresponding display variant
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 1.
    PARAMETERS PA_SUMFL LIKE AM07M-XSUM.
    SELECTION-SCREEN COMMENT 4(60) TEXT-092 FOR FIELD PA_SUMFL.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(30) TEXT-091 FOR FIELD PA_SFLVA.
    SELECTION-SCREEN POSITION 40.
    PARAMETERS: PA_SFLVA LIKE DISVARIANT-VARIANT.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 1.
    PARAMETERS XCHAR LIKE AM07M-XCHRG.
    SELECTION-SCREEN COMMENT 4(50) TEXT-015 FOR FIELD XCHAR.
    Text-015: nur chargenpflichtige Materialien
    Das Kennzeichen 'xchar' bestimmt die Art der Listausgabe entweder
    auf Material- oder Chargenebene.
    SELECTION-SCREEN END OF LINE.
    the function "No reversal movements" is only         "n571473
    available from relaese 4.5B and higher               "n571473
    ( TEXT-026 : No reversal movements )                 "n571473
    SELECTION-SCREEN BEGIN OF LINE.                             "n571473
    SELECTION-SCREEN POSITION 1.                                "n571473
    PARAMETERS NOSTO LIKE AM07M-NOSTO.                          "n571473
    SELECTION-SCREEN COMMENT 4(50) TEXT-026                     "n571473
                           FOR FIELD NOSTO.                     "n571473
    SELECTION-SCREEN END OF LINE.                               "n571473
    SELECTION-SCREEN END OF BLOCK EINSTELLUNGEN.
    *Rachit
    SELECTION-SCREEN BEGIN OF BLOCK LISTE WITH FRAME TITLE TEXT-040.
    PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT.
    SELECTION-SCREEN END OF BLOCK LISTE.
    HAUPTPROGRAMM *********************************
    F4-Hilfe für Reportvariante -
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
      PERFORM F4_FOR_VARIANT.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR PA_SFLVA.
      PERFORM                    VARIANT_VALUE_REQUEST_F4
                                 USING  PA_SFLVA  G_S_VARI_SUMFL.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR PA_SUVAR.
      PERFORM                    VARIANT_VALUE_REQUEST_F4
                                 USING  PA_SUVAR G_S_VARI_SUMHQ.
    "n599218
    INITIALIZATION                                            "n599218
    "n599218
                                                                "n599218
    INITIALIZATION.
      CLEAR : G_S_VARI_SUMHQ, G_S_VARI_SUMFL.
      REPID = SY-REPID.
      VARIANT_SAVE = 'A'.
    preprae the working areas for the variants
      MOVE  : REPID              TO  G_S_VARI_SUMHQ-REPORT,
              'SUHQ'             TO  G_S_VARI_SUMHQ-HANDLE,
              REPID              TO  G_S_VARI_SUMFL-REPORT,
              'SUFL'             TO  G_S_VARI_SUMFL-HANDLE.
      MOVE-CORRESPONDING : G_S_VARI_SUMHQ  TO  G_S_VARI_SUMHQ_DEF,
                           G_S_VARI_SUMFL  TO  G_S_VARI_SUMFL_DEF.
      PERFORM  GET_THE_DEFAULT_VARIANT
                                 USING  PA_SFLVA
                                        G_S_VARI_SUMFL
                                        G_S_VARI_SUMFL_DEF.
      PERFORM  GET_THE_DEFAULT_VARIANT
                                 USING  PA_SUVAR
                                        G_S_VARI_SUMHQ
                                        G_S_VARI_SUMHQ_DEF.
      PERFORM INITIALISIERUNG.
    get the parameters from the last run                      "n547170
      PERFORM                    ESDUS_GET_PARAMETERS.          "n547170
    set flag when INITILIZATION is processed
      MOVE  'X'        TO  G_FLAG_INITIALIZATION.
    "n599218
    AT SELECTION-SCREEN                                       "n599218
    "n599218
    Prüfung der eingegebenen Selektionsparameter, -
    Berechtigungsprüfung -
    AT SELECTION-SCREEN.
    the following 3 parameters XONUL, XVBST, and XNVBST       "n599218
    became obsolete; send error when they should be filled.   "n599218
    This could be possible if the user works with old         "n599218
    selection variants or this report is launched by a        "n599218
    SUBMIT command                                            "n599218
      IF  XONUL  IS INITIAL  AND                                "n599218
          XVBST  IS INITIAL  AND                                "n599218
          XNVBST IS INITIAL.                                    "n599218
    ok, the old parameters are empty                         "n599218
      ELSE.                                                     "n599218
      text-088 : note 599218 : obsolete parameter used        "n599218
        MESSAGE E895             WITH  TEXT-088.                "n599218
      ENDIF.
    did the user hit the pushbutton "Category" ?              "n599218
      CASE     SSCRFIELDS-UCOMM.                                "n599218
        WHEN  'LIU '.                                           "n599218
        yes, the pushbutton "Category" was hit                "n599218
          IF  G_FLAG_STATUS_LIU  =  C_HIDE.                     "n599218
          show the 7 parameters on the selection srceen       "n599218
            MOVE  C_SHOW         TO  G_FLAG_STATUS_LIU.         "n599218
          ELSE.                                                 "n599218
          hide the 7 paramaters                               "n599218
            MOVE  C_HIDE         TO  G_FLAG_STATUS_LIU.         "n599218
          ENDIF.                                                "n599218
      ENDCASE.                                                  "n599218
                                                                "n599218
    go on only if the user wants to launch this report        "n599218
      CHECK : SY-UCOMM = 'ONLI'  OR                             "n599218
              SY-UCOMM = 'PRIN'  OR                             "n599218
              SY-UCOMM = 'SJOB'.                                "n599218
    only one sum function can be processed
      IF  XSUM     = 'X' AND
          PA_SUMFL = 'X'.
        SET CURSOR               FIELD 'XSUM'.
      select one sum list only
        MESSAGE  E895            WITH  TEXT-093.
      ENDIF.
      PERFORM EINGABEN_PRUEFEN.
      SET CURSOR                 FIELD 'PA_SFLVA'.
      PERFORM  VARIANT_CHECK_EXISTENCE
                                 USING     PA_SFLVA
                                           G_S_VARI_SUMFL
                                           G_S_VARI_SUMFL_DEF.
      SET CURSOR                 FIELD 'PA_SUVAR'.
      PERFORM  VARIANT_CHECK_EXISTENCE
                                 USING     PA_SUVAR
                                           G_S_VARI_SUMHQ
                                           G_S_VARI_SUMHQ_DEF.
    check whether FI summarization is active and other        "n547170
    restrictions could deliver wrong results                  "n547170
      PERFORM                    F0800_CHECK_RESTRICTIONS.      "n547170
    - the user wants to surpress the reversal movements :     "n497992
      process warning M7 392                                  "n497992
      IF NOT NOSTO IS INITIAL.                                  "n497992
      emerge warning ?                                        "n497992
        CALL FUNCTION            'ME_CHECK_T160M'               "n497992
            EXPORTING                                           "n497992
              I_ARBGB          = 'M7'                           "n497992
              I_MSGNR          = '392'                          "n497992
            EXCEPTIONS                                          "n497992
              NOTHING          = 0                              "n497992
              OTHERS           = 1.                             "n497992
                                                                "n497992
        IF SY-SUBRC <> 0.                                       "n497992
          SET CURSOR               FIELD  'NOSTO'.              "n497992
          to surpress the reversal movements could cause ...  "n497992
          MESSAGE                  W392.                        "n497992
        ENDIF.                                                  "n497992
      ENDIF.                                                    "n497992
    carry out special authotity check for the tax auditor     "n547170
      PERFORM                    TPC_CHECK_TAX_AUDITOR.         "n547170
    does the user wants a selection via company code or a plant ?
    fill range table g_ra_werks
      REFRESH : G_RA_BWKEY,  G_RA_WERKS, G_T_ORGAN.
      CLEAR   : G_RA_BWKEY,  G_RA_WERKS, G_T_ORGAN, G_S_ORGAN.
      REFRESH : G_0000_RA_BWKEY,  G_0000_RA_WERKS,  G_0000_RA_BUKRS.
      CLEAR   : G_0000_RA_BWKEY,  G_0000_RA_WERKS,  G_0000_RA_BUKRS.
      DESCRIBE TABLE  BUKRS      LINES  G_F_CNT_LINES_BUKRS.
      DESCRIBE TABLE  WERKS      LINES  G_F_CNT_LINES_WERKS.
      IF  G_F_CNT_LINES_BUKRS  > 0  OR
          G_F_CNT_LINES_WERKS  > 0.
      fill range tables for the CREATION OF TABLE G_T_ORGAN
        MOVE : WERKS[]           TO  G_0000_RA_WERKS[],
               BUKRS[]           TO  G_0000_RA_BUKRS[].
        PERFORM  F0000_CREATE_TABLE_G_T_ORGAN
                                 USING  C_ERROR.
      ENDIF.
    save the parameters of this run                           "n547170
      PERFORM                    ESDUS_SAVE_PARAMETERS.         "n547170
    "n599218
    AT SELECTION-SCREEN OUTPUT                                "n599218
    "n599218
                                                                "n599218
    AT SELECTION-SCREEN OUTPUT.                                 "n599218
                                                                "n599218
      IF  G_FLAG_INITIALIZATION IS INITIAL.                     "n599218
      the process time INITIALIZATION was not done, so        "n599218
      carry out the functions here                            "n599218
        MOVE  'X'                TO G_FLAG_INITIALIZATION.      "n599218
                                                                "n599218
        PERFORM                  INITIALISIERUNG.               "n599218
                                                                "n599218
      get the parameters from the last run                    "n599218
        PERFORM                  ESDUS_GET_PARAMETERS.          "n599218
      ENDIF.                                                    "n599218
                                                                "n599218
    how to handle the 7 paramaters for the scope of list ?    "n599218
      LOOP AT SCREEN.                                           "n599218
      modify the selection screen                             "n599218
        CASE    SCREEN-GROUP1.                                  "n599218
          WHEN  'LIU'.                                          "n599218
            IF  G_FLAG_STATUS_LIU  = C_SHOW.                    "n599218
              SCREEN-ACTIVE = '1'.         "show parameters     "n599218
            ELSE.                                               "n599218
              SCREEN-ACTIVE = '0'.         "Hide parameters     "n599218
            ENDIF.                                              "n599218
                                                                "n599218
            MODIFY SCREEN.                                      "n599218
        ENDCASE.                                                "n599218
      ENDLOOP.                                                  "n599218
                                                                "n599218
    adapt the icon on the pushbutton depending on the status  "n599218
      CASE    G_FLAG_STATUS_LIU.                                "n599218
        WHEN  C_HIDE.                                           "n599218
          MOVE  TEXT-081         TO  PB_LIU.  "@0EQ@ Scope ... "n599218
        WHEN  C_SHOW.                                           "n599218
          MOVE  TEXT-082         TO  PB_LIU.  "@0HQ@ Scope ... "n599218
        WHEN  OTHERS.                                           "n599218
      ENDCASE.                                                  "n599218
                                                                "n599218
    "n599218
    START-OF-SELECTION
    START-OF-SELECTION.
    *SET PF-STATUS 'TEST'.
    create the title line
    If no date is given at all, the range is set to the maximum
    extend (1.1.0000 - 31.12.9999).
    If only datum-low is set, it is interpreted as the day for
    which the analysis is wanted --> datum-high is filled up.
      IF DATUM-LOW IS INITIAL.
        DATUM-LOW = '00000101'.
        IF DATUM-HIGH IS INITIAL.
          DATUM-HIGH = '99991231'.
        ENDIF.
      ELSE.
        IF DATUM-HIGH IS INITIAL.
          DATUM-HIGH = DATUM-LOW.
        ENDIF.
      ENDIF.
      MOVE: DATUM-LOW(4)    TO JAHRLOW,
            DATUM-LOW+4(2)  TO MONATLOW,
            DATUM-LOW+6(2)  TO TAGLOW,
            DATUM-HIGH(4)   TO JAHRHIGH,
            DATUM-HIGH+4(2) TO MONATHIGH,
            DATUM-HIGH+6(2) TO TAGHIGH.
      SET TITLEBAR 'MAN'
      WITH TAGLOW MONATLOW JAHRLOW TAGHIGH MONATHIGH JAHRHIGH.
    create the headlines using the titelbar                   "n599218
      PERFORM                    CREATE_HEADLINE.               "n599218
    calculate the offsets for the list header
      PERFORM                    CALCULATE_OFFSETS.
    for the representation of tied empties                    "n547170
      PERFORM                    F0700_PREPARE_TIED_EMPTIES.    "n547170
    create table g_t_mseg_fields with the names of all
    wanted fields from MSEG and MKPF
      PERFORM                    F0300_GET_FIELDS.
    set a break-point : is IS-OIL active ?                    "n599218 A
                                                                "n599218 A
    check whether this is a IS-OIL system                     "n599218 A
      PERFORM                    CHECK_IS_OIL_SYSTEM.           "n599218 A
                                                                "n599218 A
      IF  G_FLAG_IS_OIL_ACTIVE = 'X'.           "IS-OIL ?       "n599218 A
      the 2 IS-OIL specific data fields will be inserted into "n599218 A
      working table G_T_MSEG_FIELDS. Then these fields will   "n599218 A
      transported from database table MSEG, too               "n599218 A
        APPEND  'MSEG~OIGLCALC'  TO  G_T_MSEG_FIELDS.           "n599218 A
        APPEND  'MSEG~OIGLSKU'   TO  G_T_MSEG_FIELDS.           "n599218 A
      ENDIF.                                                    "n599218 A
    create the ALV fieldcatalog for the main list always
      MOVE  'G_T_BELEGE'         TO  G_F_TABNAME.
      PERFORM                    F0400_CREATE_FIELDCAT.
    do not print the ALV-statistics and selection criteria
      CLEAR                      G_S_PRINT.
      G_S_PRINT-NO_PRINT_SELINFOS   = 'X'.
      G_S_PRINT-NO_PRINT_LISTINFOS = 'X'."
    create the range table for the storage location
      PERFORM                    F0600_CREATE_RANGE_LGORT.
    - show the current activity and the progress              "n599218
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'                 "n599218
        EXPORTING                                               "n599218
          TEXT = TEXT-063.       "Reading current stocks        "n599218
    get the stock tables
      PERFORM                    AKTUELLE_BESTAENDE.
      PERFORM TABELLEN_LESEN.
    - show the current activity and the progress              "n599218
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'                 "n599218
        EXPORTING                                               "n599218
          TEXT = TEXT-064.       "Reading MM documents          "n599218
      PERFORM                    F1000_SELECT_MSEG_MKPF.
      PERFORM                    BELEGSELEKTION.
    END-OF-SELECTION
    END-OF-SELECTION.
    results of all the autority checks
      PERFORM                    F9100_AUTH_PLANT_RESULT.
    - show the current activity and the progress              "n599218
      IF BWBST = 'X'.                                           "n599218
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'               "n599218
          EXPORTING                                             "n599218
            TEXT = TEXT-066.     "Calculating Stocks and Values "n599218
      ELSE.                                                     "n599218
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'               "n599218
          EXPORTING                                             "n599218
            TEXT = TEXT-067.     "Calculating Stocks            "n599218
      ENDIF.                                                    "n599218
      PERFORM SUMMEN_BILDEN.
      PERFORM BESTAENDE_BERECHNEN.
      PERFORM LISTUMFANG.
    - show the current activity and the progress              "n599218
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'                 "n599218
        EXPORTING                                               "n599218
          TEXT = TEXT-065.       "Preparing list output         "n599218
    stop if table bestand is empty
      LOOP AT BESTAND.
        SELECT SINGLE MATKL FROM MARA INTO CORRESPONDING FIELDS OF BESTAND
        WHERE
         MATNR = BESTAND-MATNR.
        MODIFY BESTAND INDEX SY-TABIX.
      ENDLOOP.
      DESCRIBE TABLE BESTAND     LINES G_F_CNT_LINES.
      IF  G_F_CNT_LINES IS INITIAL.
      Keinen Eintrag zu den Suchbegriffen gefunden/selektiert
        MESSAGE                  S083.
      perform                  anforderungsbild.
      ELSE.
      process log function if the use is a tax auditor        "n555246
      and the database selection was successful               "n555246
        IF  G_FLAG_TPCUSER = '1'.                               "n555246
          PERFORM                TPC_WRITE_LOG.                 "n555246
        ENDIF.                                                  "n555246
        PERFORM FELDGRUPPEN_AUFBAUEN.
      sort table with header data per material
        IF BWBST IS INITIAL.
          SORT BESTAND BY MATNR WERKS CHARG.
        ELSE.
          SORT BESTAND BY MATNR BWKEY.
        ENDIF.
      which function does the user want ?
        IF      XSUM = 'X'.
        hierseq. alv with sums
          PERFORM                CREATE_TABLE_TOTALS_HQ.
          PERFORM                CREATE_FIELDCAT_TOTALS_HQ.
          PERFORM                ALV_HIERSEQ_LIST_TOTALS.
        ENDIF.
        IF FLAG NE 'X'.
          IF PA_SUMFL = 'X'.
       elseif  pa_sumfl = 'X'.
        show the sums only in a flat ALV
            PERFORM                CREATE_TABLE_TOTALS_FLAT.
            PERFORM                CREATE_FIELDCAT_TOTALS_FLAT.
            PERFORM                ALV_FLAT_LIST_SUMS_ONLY.
          ELSE.
        display the full list using the APPEND ALV
         PERFORM                BESTAENDE_AUSGEBEN.
          ENDIF.
        ENDIF.
        FLAG = ' '.
      ENDIF.
      CLEAR: G_T_MSEG_LEAN, G_T_BSIM_LEAN, BESTAND.             "n443935
    *&   PF_STATUS_SET_TOTALS
    FORM PF_STATUS_SET_TOTALS                                   "#EC CALLED
                       USING     EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STANDARD'   EXCLUDING EXTAB.
    ENDFORM.                     "PF_STATUS_SET_TOTALS
       user_parameters_save
    FORM USER_PARAMETERS_SAVE.
      GET PARAMETER ID 'BUK'     FIELD  G_SAVE_PARAMS-BUKRS.
      GET PARAMETER ID 'WRK'     FIELD  G_SAVE_PARAMS-WERKS.
      GET PARAMETER ID 'MAT'     FIELD  G_SAVE_PARAMS-MATNR.
      GET PARAMETER ID 'CHA'     FIELD  G_SAVE_PARAMS-CHARG.
      GET PARAMETER ID 'BLN'     FIELD  G_SAVE_PARAMS-BELNR.
      GET PARAMETER ID 'BUK'     FIELD  G_SAVE_PARAMS-BUKRS.
      GET PARAMETER ID 'GJR'     FIELD  G_SAVE_PARAMS-GJAHR.
    ENDFORM.                     "user_parameters_save
       user_parameters_restore
    FORM USER_PARAMETERS_RESTORE.
      SET PARAMETER ID 'BUK'     FIELD  G_SAVE_PARAMS-BUKRS.
      SET PARAMETER ID 'WRK'     FIELD  G_SAVE_PARAMS-WERKS.
      SET PARAMETER ID 'MAT'     FIELD  G_SAVE_PARAMS-MATNR.
      SET PARAMETER ID 'CHA'     FIELD  G_SAVE_PARAMS-CHARG.
      GET PARAMETER ID 'BLN'     FIELD  G_SAVE_PARAMS-BELNR.
      GET PARAMETER ID 'BUK'     FIELD  G_SAVE_PARAMS-BUKRS.
      GET PARAMETER ID 'GJR'     FIELD  G_SAVE_PARAMS-GJAHR.
    ENDFORM.                     "user_parameters_restore
    *&   USER_COMMAND_TOTALS
    FORM USER_COMMAND_TOTALS                                    "#EC CALLED
                       USING     R_UCOMM     LIKE  SY-UCOMM
                                 RS_SELFIELD TYPE  SLIS_SELFIELD.
      CLEAR                      G_S_BESTAND_KEY.
      CASE R_UCOMM.
        WHEN '&GRPT'.
          SORT BESTAND BY BWKEY MATKL.
          FLAG = 'X'.
          PERFORM GRP_TOTAL(ZGRP_TOTAL) TABLES BESTAND.
          IF FLAG = 'X'.
            EXIT.
          ENDIF.
        WHEN '&STR'.
          IF BWBST = 'X'.
            IF FLAG = 'X'.
        clear: LGBST,BWBST ,SBBST.
          PERFORM GRP_TOTAL(ZGRP_TOTAL1) TABLES BESTAND.
              SUBMIT ZRM07MLBD2 WITH  LGBST = 'X'
                               WITH WERKS = '1000'
                               WITH BUKRS = '1001'
                               WITH XSUM = 'X'
                               WITH PA_WDZER =  PA_WDZER
                               WITH PA_WDZEW = PA_WDZEW
                               WITH PA_WDWIZ = PA_WDWIZ
                               WITH PA_WDWUW = PA_WDWUW
                               WITH PA_WDWEW = PA_WDWEW
                               WITH PA_NDZER = PA_NDZER
                               WITH PA_NDSTO = PA_NDSTO
                               WITH LGORT IN LGORT
                               WITH DATUM IN DATUM
                               WITH MATNR IN MATNR VIA SELECTION-SCREEN
                                                       AND RETURN.
              CLEAR:      LGBST.
            ELSE.
              MESSAGE E345(0) WITH 'First see the grp total'.
            ENDIF.
          ELSE.
            MESSAGE E345(0) WITH 'Stock type chosen was not valuated'.
          ENDIF.
    Quarter Ending----
        WHEN '&QTRE'.
          TYPES: BEGIN OF TY_MTART,
                  MATNR LIKE MARA-MATNR,
                  MTART LIKE MARA-MTART,
                 END OF TY_MTART.
          DATA: L_REC_QTY TYPE P DECIMALS 3,
                L_ISS_QTY TYPE P DECIMALS 3,
                L_REC_AMT TYPE P DECIMALS 3,
                L_ISS_AMT TYPE P DECIMALS 3,
                L_OTHERS_QTY TYPE P DECIMALS 3,
                L_SALE_QTY TYPE P DECIMALS 3,
                L_SALE_AMT TYPE P DECIMALS 3,
                L_OTHERS_AMT TYPE P DECIMALS 3.
          DATA: IT_MAKT TYPE STANDARD TABLE OF MAKT WITH HEADER LINE,
                IT_T023T TYPE STANDARD TABLE OF T023T WITH HEADER LINE,
                IT_T134 TYPE STANDARD TABLE OF T134T WITH HEADER LINE.
          DATA: IT_MTART TYPE STANDARD TABLE OF TY_MTART WITH HEADER LINE.

    Dear Experts,
    Thanks all for the reply.
    I have followed the OSS notes 194788
    Only enter the selection criteria which are required for the selection of the stock management unit for which the opening stock balance and closing stock should be determined.
    In MB5B I key in selection criteria which are :
    material number : xxxxxx
    company code : 1000
    plant : 1500
    batch : xxxxxx
    special stock indicator : orders on hand
    selection date : 01.08.2009 to current date
    stock type :special stock
    and the result comes out :
    there is initial balance of 3000 kg on 01.08.2009 - INCORRECT ( our team never enter this initial balance but still came out )
    therefore the stock of current date also WRONG
    if the total stock is adjusted using stock take , the accounting journal will be created, and reduce the financial asset with the same amount of 3000 kg (WRONG EFFECT)
    how to solve this issue without affecting the accounting journal ?
    Thanks
    Pauline

  • Balance sheet required for current quarter and previous quarter

    Hi Guys,
                 I am using 0FIGL_C10 cube for balance sheet report,i need to create balances for current quarter and previous quarter.
    user will enter the fisper, based on fisper it has to show the current quarter and previous quarter balance.
    how to calculate the quarter using fisper.

    you can use offset with ranges.
    or
    just offset of -1 , -2 & -3 seperately in 3 selections and add it in one column in formula (this will give u current quarter).
    similarly offset of -4, -5 , -6 will give u previous quarter result.
    total of 6 selection and 2 formulas. hide all selections from display.

  • How to get the weekends days for a specific date range

    I want to select list of only weekend dates from a given date range. Is it possible in SQL?
    For example if the range is '08/01/2011' and '08/30/2011'
    I want a list
    08/06/2011
    08/07/2011
    08/13/2011
    08/14/2011
    08/20/2011
    08/21/2011
    08/27/2011
    08/28/2011Thank You, Naveen email:[email protected]

    First and easy to do is having a Calendar table, which over there you can have those information.
    http://arbibaghdanian.blogspot.com/2011/05/calendar-table.html
    Declare @beginDate Date, @EndDate Date
    Select @beginDate = '08/01/2011', @EndDate = '08/31/2011'
    Declare @Calendar Table
    (CalendarDate Date Primary key, IsWeekend Bit, YearNo SmallInt, QuarterNo TinyInt, MonthNo TinyInt, DayOfYearNo SmallInt, DayNo TinyInt, WeekNo TinyInt, WeekDayNo TinyInt)
    While @beginDate <= @endDate
    Begin
    Insert Into @Calendar
    Select
    @beginDate As CalendarDate
    ,(Case When DATEPART(Weekday, @beginDate) In (7, 1) Then 1 Else 0 End) As IsWeekend
    ,DATEPART(Year, @beginDate) As YearNo
    ,DATEPART(QUARTER, @beginDate) As QuarterNo
    ,DATEPART(MONTH, @beginDate) As MonthNo
    ,DATEPART(DayOfYear, @beginDate) As DayOfYearNo
    ,DATEPART(Day, @beginDate) As DayNo
    ,DATEPART(Week, @beginDate) As WeekNo
    ,DATEPART(WEEKDAY, @beginDate) As WeekDayNo
    Set @beginDate = DateAdd(Day, 1, @beginDate)
    End
    Select * From @Calendar Where IsWeekend = 1
    Best Wishes, Arbi --- MCC 2011; Please vote if you find this posting was helpful or Mark it as answered.

  • Posting Period Range variable - Using Offset

    Hi:
    I need to create queries for each quarter.  Without going through detail, some of my columns in my report I need to use the first two months of the quarter and some of the other columns I need to use the 3 months in each quarter.
    So for example:  We are right now in quarter 1; Jan, Feb, and Mar. Some columns I will be using a range of 1 to 2 and the rest I will be using a range of 1 to 3.  The same type of logic for the other 3 quarters.  I have a posting period variable (Characteristic value) and I was hoping that I was going to be able to use the offset option when I restricted my variable in each column that I only want period 1 and 2.  But when I run the query I don't get any results.  I know that the offset works with "fix" values but it seems not to work with a "range".
    I'm trying to stay way of creating the same queries for each quarter where the difference is only the posting period.
    Does anybody have any idea how I can accomplish this?  Has anybody ever had to do something like this?
    Your thoughts comments will be greatly appreciated!
    Regards,
    Helena

    Hi Arun:
    I know I can restrict the values that I want but I'm trying to avoid in having to create 4 queries..One per quarter.  I'm trying to see if I can just have 1 query and use a range variable which I have already defined as a characteristic value and it's a range.  I use the user exit to populate the initial values depending on the posting period at the time the query runs.  Right now the variable screen will show 1 on the from and a 3 on the to.
    The columns that need all three months are coming out fine in the report.  The issue that I'm encountering is the columns that I only need the two months in this case 1 and 2.  What I did here is still using the same range variable and restrict it with an offset of -1.  When the query  runs, this column comes up with no data.
    How can I get around this?
    Thanks for your help!
    Helena

  • Quarter

    Hi,
    I need to get the last day (working day) of the prior quarter.
    DateA is the date from my facttable, and DateB have values to use (history).
    I use an expression operator to calculate the correct day
    ID_DateB Between (TO_DATE(CONCAT('/01',
    DECODE(WB_CAL_QTR("FT_INSTRUMENTOS"."ID_DateA "),1,'JAN',2,'APR',3,'Jul',4,'Oct'),
    TO_CHAR("FT_INSTRUMENTOS"."ID_DateA ",'YYYY')))) - 8 )
    AND
    (TO_DATE(CONCAT('/01',DECODE(WB_CAL_QTR("FT_INSTRUMENTOS"."ID_DateA "),1,'JAN',2,'APR',3,'Jul',4,'Oct'),
    TO_CHAR("FT_INSTRUMENTOS"."ID_DateA ",'YYYY')))) - 1 )
    But OWB put the full statment directly in my joiner-where, and the "DECODE" don't work there
    I need this operation in a nested select, how can change the query code??? or what operator I must use?? other way to do this??
    ---After set a range of day, I use a aggregator operator and use a MAX command in the having clause to return the last day of the prior quarter.---
    Thanks

    see if this function is of any help to you.
    /* Formatted on 2009/02/11 22:06 (Formatter Plus v4.8.8) */
    CREATE OR REPLACE PROCEDURE previous_records
    AS
       CURSOR c1
       IS
          SELECT h_date
            FROM holiday;
       previous_date         DATE;
       previous_week_date    DATE;
       previous_month_date   DATE;
       previous_year_date    DATE;
    BEGIN
       SELECT SYSDATE - 1
         INTO previous_date
         FROM DUAL;
       SELECT SYSDATE - 7
         INTO previous_week_date
         FROM DUAL;
       SELECT ADD_MONTHS (SYSDATE, -1)
         INTO previous_month_date
         FROM DUAL;
       SELECT ADD_MONTHS (SYSDATE, -12)
         INTO previous_year_date
         FROM DUAL;
       FOR c1rec IN c1
       LOOP
          BEGIN
             IF (TRUNC (previous_date) = TRUNC (c1rec.h_date))
             THEN
                SELECT (previous_date - 1)
                  INTO previous_date
                  FROM DUAL;
             END IF;
             IF (TRUNC (previous_week_date) = TRUNC (c1rec.h_date))
             THEN
                SELECT (previous_week_date - 7)
                  INTO previous_week_date
                  FROM DUAL;
             END IF;
             IF (TRUNC (previous_month_date) = TRUNC (c1rec.h_date))
             THEN
                SELECT ADD_MONTHS (previous_month_date, -1)
                  INTO previous_month_date
                  FROM DUAL;
             END IF;
             IF (TRUNC (previous_year_date) = TRUNC (c1rec.h_date))
             THEN
                SELECT ADD_MONTHS (previous_year_date, - 12)
                  INTO previous_year_date
                  FROM DUAL;
             END IF;
          END;
       END LOOP;
       DBMS_OUTPUT.put_line ('Previous Day is:' || previous_date);
       DBMS_OUTPUT.put_line ('Previous Week Day is:' || previous_week_date);
       DBMS_OUTPUT.put_line ('Previous Month Day is:' || previous_month_date);
       DBMS_OUTPUT.put_line ('Previous Year Day is:' || previous_year_date);
    END previous_records;
    /

  • What EXACTLY does q-range in logic pro do?

    I read the manual and it said that it is "A very musical quantization strategy that requires a certain amount of technical musical prowess. Q-Range is ideal for recordings that already have the right groove but are too hurried or laid back in places. It allows you to retain the original feel, but positions the rhythmic center precisely in the groove. A value of 0 means that every note or transient marker is quantized. If you enter negative Q-Range values, only notes or transient markers that fall outside the set range are moved to ideal quantization grid positions, whereas those closer to an ideal position remain unquantized. This moves the most poorly played notes or transient markers—those outside the range—to perfect timing positions on the quantization grid, or at least moves them toward these positions, depending on the Q-Strength setting." Can someone tell me the values that are meant by "range" and why when i set a value in both the negative and positive range, it seems to move notes at the same exact positions to different places?

    I can get you a bit closer, no pun intended. 
    The range # is in ticks.  Looky here:
    The blue D is 74 ticks shy of the quarter note, the red Bflat on the 2.3 line is 20 ticks past the line.  I set the quantize grid to 1/8 because there are a couple notes on the grid there (the two C's).  Everything pops into strict quantize.  As the q-range is dragged down, when the value = the number of ticks that the original note is off the grid that note is no longer quantized.  So when I set the range to -21 the red note doesn't quantize any more.  As I continue, more of the notes fall off the grid and back to the location you see above.  The blue note stays on the grid until I get to -74.  Incidentally, if you go slow you will see that at certain values the display changes from -60 to 1/64, letting you know the musical equivalent of the tick values.
    As you go positive, you will see that a value of 1 kicks everybody off the grid, and then teases them in as you dial in their tick values.  With positive values, however, there seems to be a 'relativity' to the relationships between the notes.  In my above pic, the orange Bflat that is roughly at the same time as the blue note is 40 ticks shy.  At a range of 10 it moves 2 ticks further away, and at a range of 20 it is 7 ticks closer.  At a range of 40 it is 15 ticks shy, and at 41 it is on the grid.  When I get to a range of 75, the blue note is on the grid and the orange note above it is 32 ticks past.  There seems to be some relationships that affect the quantization (like it averages all the quarter notes and splits the differences, then looks at notes that are roughly at the same time and splits the difference again) but the manual doesn't really explain how that works.
    Make a region and by holding cntrl+shift you can move notes by the tick value.  Move some around and then play with the Q-range to see it in action.  In the piano roll you can go View>Event float and a floating window will appear that has the info you want to monitor.  Just select the note in the piano roll that you want to see the info for.  You can also open an event list to see the info on all the notes at once.

  • OMX4 - FBN1 - Number range for Material document and FI document

    47 - is for FI document number range in Material ledger FBN1.  OMX4 gives number range for Material document.  My question is how big the number range must be?  Since thousands of Materials involved, I couldn't imagin this?
    Anybody knows, how to determine the size of no. ranges in Material Ledger configuration?  SAP simply says, check no. ranges whether it meets the requirement....
    I don't expect an answer again, just check your business, how many transactions would be in a period, which is not quantifiable now?
    I would like to understand this from somebody's experience of using insufficient or excessive no. ranges, especially in this area.
    Cheers,
    Ashok

    What is the number range you are using? Year Dependent or Independent?
    When you don't know the document number consumption pattern you should use Year dependent number range in both OMX4 & FBN1. Observing this for a month will give a rough Idea and observing for a Quarter will give you a fair Idea and the result for a year gives almost near to accurate consumption of number ranges.
    The generation of documents is dependent on the number of materials and Profit centers involved. As much as possibe use Summarization at profit center level when posting to FI. This will reduce the number of documents and line items that are getting generated.

  • Passive FTP Port Range -- Server 10.3.x Panther

    I know that the port range for Passive FTP is >1024, but I want to define that to a smaller group of unused ports so that I can specify that those ports are open in the Firewall.
    Can, how, and where do I define this port range??

    I just opened from 13658-65534 and this seems to be fine (although not been running very long). I took the view that opening a stack of ports was not really any worse than just opening a quarter as much. Arguably, it's no worse than just opening one.
    However, we only use it from time to time and FTP services is off unless specifically required. If I was going to run it for serious use I think I would put it on a dedicated server and put it in a DMZ.
    Reading up on FTP security is on my To-Do list...
    -david
    [EDIT] The server is also well locked down for SSH.

  • Using TC to extend network range.

    My home network is currently set up with 2x b/g AX's in a WDS configuration. I also have a TC (b/g and n capable) for backups. I am wondering if I can add the TC into the wireless network (rather than just joining it) to increase my range. I am thinking of using the TC as the main and the two AX as remotes to extend the network. Will this slow down my TC backups? Also would this now allow me to use TC backup from a larger range (obviously I imagine if im out of the n 5.0ghz range and its connecting to the TC via the AX this would decrease the speed, but the extra backup range would be very useful)?

    I guess I did not make myself clear when I said that everything would drop down to "g" wireless if you choose WDS. If you configure the TC to "participate in a WDS arrangement", everything...both bands on your TC....automatically drop down to 2.4 GHz "g" wireless, so the maximum speed you will attain will be "g" levels on your "n" Time Capsule.
    WDS is a "g" technology. it cannot operate at "n" level speeds.
    But, with the other 2 AirPort Express devices on the WDS network, the first will drop the bandwidth in half on the entire network and the second will drop that in half again on the entire network.
    Your entire WDS network will be operating at maximum "g" wireless with only one quarter of the original bandwidth on the network. The maximum speed that you will able to attain on the network will be approximately 13 Mbps.
    Since "n" wireless at 2.4 GHz can attain speeds of up to 130 Mbps and up to 300 Mbps at 5 GHz, your WDS network will be operating at only a small fraction of it's capability.
    If you want to use wireless only to "extend", (I suggested using ethernet with your two "g" AirPort Express devices) and you replaced the two "g" AirPort Express devices you have now with two new "n" versions, you could use Apple's "Extend a wireless network" feature and extend using wireless only.
    The "Extend a wireless network" setup will maintain "n" speeds throughout the network with a much smaller bandwidth loss (about 10-15% per device), so your network would still be working at 60-70% of it's capability. Unfortunately, you cannot use your "g" AirPort Express devices for this purpose.

Maybe you are looking for

  • How do I transfer photos from iphoto to my ipad 2

    how do I transfer photos from iPhoto to my iPad 2

  • Purchase order to pdf conertion

    Hi,   I am working on 4.7 version. I need to generate pdf file for po fom. My senario is when i am executing in me9f in back ground at the end of the day it should genarate po forms in pdf files in application server.

  • Want to change network name.... and other.

    Ok, Hi all.... so new to Apple and just a novice computer user... just purchased a macbook pro and a airport extreme wireless N router ( finally after 5 years of dial up)... so my questions is/are... first my network is named with my first and last n

  • CDHDR entries for chaning LFA1-LNRZA

    Hi, If I change any of the main fields of vendor data then there is one entry in CDHDR Even if I change multiple fields, eg I change name, city and bank data Then there is only entry in CDHDR and multiple entries in CDPOS for LFA1, LFBK tables etc bu

  • I wanna assign you ALL my Duke Dollars....

    ...for a new question i have BUT b4 I can do that I need to retrive back the duke dollars from my earlier messages that haven't been answered and have my dollars gathering dust...how on earth do i do that?