Presenting data on a daily or weekly basis in Management Cockpit

Hello all!
I'm working at a manufacturing company that needs to follow up production data at a daily or at least at a weekly basis. Is it possible to present data on these levels in Management Cockpit or are the only options month and year?
Regards,
Peter Estberg
IT-department
Sapa Profiler AB
Vetlanda
Sweden

Hi
If your taking report from SEM / BW, whichever server your taking report there you have to create a time variable for week
You have to do a little bit workaround for this
Create time char for CALWEEK
Write coding in update rules to feed them - feed directly if source is having calweek values,
If not you have to write a routine referring the available time charrs
Then inculde this in time char in your data target and in the query and in the selection screen of the query
To include in the selection screen you need to create a variable for selection referrring this time char for week
Hope this helps
Regards
N Ganesh

Similar Messages

  • How to allow KPIs can keep data as weekly base, SSM7.5 ?

    How to allow KPIs can keep data as weekly base, SSM7.5 ?

    Chamnap,
    I would highly recommend taking some training before embarking on building models in PAS. Although the Help Guide in PAS will give you some of the information you need, I would really recommend training. While some modification of Cube Builder is possible, you do have to make those changes each time you rebuild your Cube Builder model.
    My suggestion would be to sign up for the OKP Training, which is an online training course for SSM 7.5. Being online, the course has recorded presentations and the 22 hours of material go through all aspects of SSM from the user and administration interfaces to an introduction and instruction on how to build models in PAS.
    This is the link to SAP Education and their listing of this offering:
    http://www.sap.com/services/education/catalog/globaltabbedcourse.epx?context=%5b%5bCPM_SM%7cOSM75%7c%7c%7c%7cG%7c%5d%5d%7c
    Regards,
    Bob

  • Alert data is not present in SCOM 2012 Data Warehouse database since two weeks

    Alert data is not present in SCOM 2012 Data Warehouse database since a week though I could see Performance data for the latest dates. Old Alert data is present but I think the latest Alert data is not being inserted to Data warehouse. No activity was done
    on the day from where we are missing data.
    I could see 31554 events on all my Management servers and this proves that Data Insertion is happening. I am not sure why only Alert data is missing (or not getting inserted) in DW database. I am trying to use SQL queries to fetch the data as I dont have reporting
    currently. The same query is working for other dates, so there is no issue with this query.
    I have noticed that I could see the Alert Data present in SCOM OperationsmNager Db but NOT present in OperationsManagerDW database.
    In SCOM 2007, data will be inserted in both Ops DB and DW simultaneously. I believe the same methodology in 2012 too.
    Please help me to fetch Alert data from DW. Any suggestion pls?
    Regards, Suresh

    Hi,
    Generally, data warehouse store a long-term data, and by default, it would keep 400 days data, I suggest check your configuration:
    How to Configure Grooming Settings for the Reporting Data Warehouse Database
    http://technet.microsoft.com/en-us/library/hh212806.aspx
    Alex Zhao
    TechNet Community Support

  • HT1430 I am having to restore my iPhone on a weekly basis and it is going black on a daily basis- this is ridiculous! Is this normal for an apple product?

    I am having to restore my iPhone through my iTunes account on a weekly basis and the screen is going black on a daily basis and just turning off suddenly. This is ridiculous! Is this normal for an apple product?

    That is obviously not normal. I would make an appt at an Apple store to get it checked.

  • Displaying ALV report  on Weekly Basis

    Hi all,
    I am working with an ALV report and i am giving my code below.I even got the output but i want to display the SALES ORDERS ON  WEEKLY BASIS.can any one provide me the code for this.its very urgent.
    REPORT  ZRRUU1 No standard page heading message-id zmsg line-size 255 line-count 65(3).
    TYPE-POOLS : slis .
    Structure Declarations
    TYPES : BEGIN OF tt_final,
               vbeln TYPE vbak-vbeln,
               vdatu TYPE vbak-vdatu,
               ernam TYPE vbak-ernam, "Created By
               auart TYPE vbak-auart, "Sales Order Type
               kunnr TYPE vbak-kunnr, "Customer number
               vkorg TYPE vbak-vkorg, "Sales Organization
               name1 TYPE kna1-name1,
               kwmeng TYPE vbap-kwmeng,
               arktx TYPE vbap-arktx,
               brown type vbap-kwmeng,
               gold type vbap-kwmeng,
            END OF tt_final.
    TYPES : BEGIN OF tt_vbep,
               wadat TYPE vbep-wadat, "Ship By
            END OF tt_vbep.
    TYPES : BEGIN OF tt_vbpa,
               vbeln TYPE vbpa-vbeln,
               kunnr TYPE vbpa-kunnr,
               name1 TYPE kna1-name1,
            END OF tt_vbpa.
    TYPES : BEGIN OF tt_vbap,
               vbeln TYPE vbap-vbeln,
               kwmeng TYPE vbap-kwmeng,
               arktx TYPE vbap-arktx,
               matnr TYPE vbap-matnr, "Material Number
            END OF tt_vbap.
    TYPES : BEGIN OF tt_vepvg,
              vbeln TYPE vepvg-vbeln,
            END OF tt_vepvg.
    TYPES : BEGIN OF tt_mvke,
              matnr TYPE mvke-matnr,
              mvgr1 type mvke-mvgr1,
            END OF tt_mvke.
    TYPES : BEGIN OF tt_brown,
              matnr type vbap-matnr,
              kwmeng1  TYPE vbap-kwmeng,
            END OF tt_brown.
    TYPES : BEGIN OF tt_gold,
              matnr type vbap-matnr,
              kwmeng2  TYPE vbap-kwmeng,
            END OF tt_gold.
    Internal Table Declarations
    DATA :  t_vbep TYPE TABLE OF tt_vbep,
            t_vbap TYPE TABLE OF tt_vbap,
            t_vepvg TYPE TABLE OF tt_vepvg,
            t_vbpa TYPE TABLE OF tt_vbpa,
            t_mvke TYPE TABLE OF tt_mvke,
            t_brown type table of tt_brown,
            t_gold type table of tt_gold,
            t_final TYPE TABLE OF tt_final.
    Work Area Declarations
    DATA :  wa_vbep TYPE tt_vbep,
            wa_vbap TYPE tt_vbap,
            wa_vepvg TYPE tt_vepvg,
            wa_vbpa TYPE tt_vbpa,
            wa_mvke TYPE tt_mvke,
            wa_brown type tt_brown,
            wa_gold type tt_gold,
            wa_final TYPE tt_final.
    data : i_vkorg type VKORG,
           i_ERNAM  type ernam,
           i_AUART type auart,
           i_WADAT type wadat,
            I_KUNNR TYPE KUNNR,
            i_matnr type matnr.
    Field Catalog Declarations
    DATA :  fcat TYPE slis_t_fieldcat_alv,
            wa_fcat TYPE slis_fieldcat_alv,
            layout  TYPE slis_layout_alv,
            sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,
            events TYPE slis_t_event WITH HEADER LINE.
    Constants
    CONSTANTS : char1 TYPE i VALUE 1000,
                 c1(3) value 'CB4',
                c2(3)  value 'CB2'.
    Variable Declarations
    DATA :  repid LIKE sy-repid,
            l_text1 TYPE arktx,
            l_text2 TYPE kwmeng ,
            l_num1(10) TYPE N,
            l_num2(15) TYPE N,
            l_len       TYPE i.
    Select- options Declarations
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
          SELECT-OPTIONS : s_vkorg FOR wa_final-vkorg OBLIGATORY,
                           s_auart FOR wa_final-auart ,
                           s_wadat FOR wa_vbep-wadat.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
          SELECT-OPTIONS : s_ernam FOR wa_final-ernam,
                           s_kunnr FOR wa_final-kunnr,
                           s_matnr FOR wa_vbap-matnr.
    SELECTION-SCREEN END OF BLOCK b2.
    At Selection Screen Validations
    AT SELECTION-SCREEN ON s_vkorg .
    DATA : l_vkorg TYPE vbak-vkorg.
    SELECT SINGLE  vkorg  FROM vbak INTO  l_vkorg WHERE vkorg IN s_vkorg .
        IF sy-subrc NE 0.
            MESSAGE w000(zmsg).
        ENDIF.
    AT SELECTION-SCREEN ON S_AUART.
        SELECT SINGLE AUART
                  FROM VBAK
                  INTO i_AUART
                WHERE AUART IN S_AUART.
          IF SY-SUBRC NE 0.
            MESSAGE I000 WITH 'ENTER VALID SALES ORDER TYPE'.
          ENDIF.
    AT SELECTION-SCREEN ON S_WADAT.
    if S_WADAT is not initial.
        SELECT SINGLE WADAT
                FROM VBEP
                INTO i_WADAT
              WHERE WADAT IN S_WADAT.
          IF SY-SUBRC NE 0.
            MESSAGE I000 WITH 'ENTER VALID GOODS ISSUE DATE'.
          ENDIF.
    endif.
    AT SELECTION-SCREEN ON S_ERNAM.
    if s_ernam is not initial.
        SELECT SINGLE ERNAM
                FROM VBAK
                INTO i_ERNAM
              WHERE ERNAM IN S_ERNAM.
          IF SY-SUBRC NE 0.
            MESSAGE I000 WITH 'ENTER VALID CREATORS NAME'.
          ENDIF.
    endif.
    AT SELECTION-SCREEN ON S_KUNNR.
    if s_kunnr is not initial.
        SELECT SINGLE KUNNR
                FROM VBAK
                INTO I_KUNNR
              WHERE KUNNR IN S_KUNNR.
          IF SY-SUBRC NE 0.
            MESSAGE I000 WITH 'ENTER VALID SOLD-TO PARTY'.
          ENDIF.
    endif.
    AT SELECTION-SCREEN ON S_MATNR.
    if s_matnr is not initial.
        SELECT SINGLE MATNR
                FROM VBAP
                INTO I_MATNR
              WHERE MATNR IN S_MATNR.
          IF SY-SUBRC NE 0.
            MESSAGE I000 WITH 'ENTER VALID MATRL NO'.
          ENDIF.
    endif.
    START-OF-SELECTION.
      SELECT vbeln
             FROM vepvg
             INTO TABLE t_vepvg
             WHERE vstel = char1 AND vkorg IN s_vkorg.
        SELECT matnr mvgr1
               from mvke
               into table t_mvke
               where mvgr1 = c1  .
    IF t_vepvg IS NOT INITIAL.
        SELECT vbeln
               vdatu
               FROM vbak
               INTO CORRESPONDING FIELDS OF TABLE t_final
               FOR ALL ENTRIES IN t_vepvg
               WHERE vbeln = t_vepvg-vbeln
                         AND vkorg IN s_vkorg
                         AND auart IN s_auart .
    ENDIF.
    IF t_vepvg IS NOT INITIAL.
        SELECT a~vbeln
               a~kunnr
               b~name1
               INTO CORRESPONDING FIELDS OF  TABLE t_vbpa
               FROM vbpa AS a INNER JOIN kna1 AS b
               ON akunnr = bkunnr
               FOR ALL ENTRIES IN t_vepvg
               WHERE a~vbeln EQ t_vepvg-vbeln.
        SELECT vbeln
               kwmeng
               arktx
               matnr
               FROM vbap INTO CORRESPONDING FIELDS OF TABLE t_vbap
               FOR ALL ENTRIES IN t_vepvg
               WHERE vbeln EQ t_vepvg-vbeln.
    ENDIF.
    IF t_mvke IS NOT INITIAL .
       select matnr kwmeng from vbap into CORRESPONDING FIELDS OF TABLE
    t_brown FOR ALL ENTRIES IN t_mvke
               WHERE matnr eq t_mvke-matnr .
       select matnr kwmeng from vbap into CORRESPONDING FIELDS OF TABLE
    t_gold FOR ALL ENTRIES IN t_mvke
               WHERE matnr eq t_mvke-matnr.
    endif.
    l_len = strlen( l_text1 ).
    LOOP AT t_final INTO wa_final.
        READ TABLE t_vbap INTO wa_vbap WITH KEY vbeln = wa_final-vbeln .
          IF sy-subrc = 0.
              wa_final-kwmeng = wa_vbap-kwmeng.
              wa_final-arktx = wa_vbap-arktx.
             MODIFY t_final FROM wa_final .
              CLEAR wa_final.
          ENDIF.
        DELETE ADJACENT DUPLICATES FROM t_final COMPARING vbeln.
    ENDLOOP.
    LOOP AT t_final INTO wa_final.
        READ TABLE t_vbpa INTO wa_vbpa WITH KEY vbeln = wa_final-vbeln .
          IF sy-subrc = 0.
            wa_final-name1 = wa_vbpa-name1.
            MODIFY t_final FROM wa_final.
            CLEAR wa_final.
          ENDIF.
        DELETE ADJACENT DUPLICATES FROM t_final COMPARING vbeln.
    ENDLOOP.
    LOOP AT t_final INTO wa_final.
        READ TABLE t_brown INTO wa_brown WITH KEY kwmeng1 = wa_final-kwmeng
          IF sy-subrc = 0.
            wa_final-brown = wa_brown-kwmeng1.
            MODIFY t_final FROM wa_final.
            CLEAR wa_final.
          ENDIF.
        DELETE ADJACENT DUPLICATES FROM t_final COMPARING vbeln.
    ENDLOOP.
    LOOP AT t_final INTO wa_final.
        READ TABLE t_gold INTO wa_gold WITH KEY kwmeng2 = wa_final-kwmeng .
          IF sy-subrc = 0.
            wa_final-gold = wa_gold-kwmeng2.
            MODIFY t_final FROM wa_final.
            CLEAR wa_final.
          ENDIF.
        DELETE ADJACENT DUPLICATES FROM t_final COMPARING vbeln.
    ENDLOOP.
    PERFORM final.
    PERFORM ALVDISPLAY.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
       I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = EVENTS[]
    EXCEPTIONS
       LIST_TYPE_WRONG       = 1
       OTHERS                = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *&      Form  final
          text
    -->  p1        text
    <--  p2        text
    FORM final .
      layout-no_input          = 'X'.
      layout-colwidth_optimize = 'X'.
      sort-fieldname = 'VBELN'.
      sort-tabname = 'T_FINAL'.
      sort-up = 'X'.
      sort-subtot = 'X'.
      APPEND sort.
      CLEAR sort.
    events-name = 'TOP_OF_PAGE'.
      events-form = 'ANY1'.
      APPEND events.
      CLEAR events.
      wa_fcat-fieldname = 'VBELN'.
      wa_fcat-tabname = 'T_final-VBELN'.
      wa_fcat-seltext_m = 'ORDER NO'.
      wa_fcat-outputlen = 10.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'VDATU'.
      wa_fcat-tabname = 'T_final-VDATU'.
      wa_fcat-seltext_m = 'SHIP BY'.
      wa_fcat-outputlen = 20.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat .
      wa_fcat-fieldname = 'NAME1'.
      wa_fcat-tabname = 'T_final-NAME1'.
      wa_fcat-seltext_m = 'CUSTOMER NAME'.
      wa_fcat-outputlen =  20 .
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'KWMENG'.
      wa_fcat-tabname = 'T_final-KWMENG'.
      wa_fcat-seltext_m = 'ORDER BY'.
      wa_fcat-outputlen = 20.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'ARKTX'.
      wa_fcat-tabname = 'T_final-ARKTX'.
      wa_fcat-seltext_m = 'PRODUCT NAME'.
      wa_fcat-outputlen = 30.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'BROWN'.
      wa_fcat-tabname = 'T_final-BROWN'.
      wa_fcat-seltext_m = 'BROWN LBS'.
      wa_fcat-outputlen = 20.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'GOLD'.
      wa_fcat-tabname = 'T_final-GOLD'.
      wa_fcat-seltext_m = 'GOLDEN LBS'.
      wa_fcat-outputlen = 20.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
    ENDFORM.                    " final
    *&      Form  any1
          text
    form any1 .
      DATA header TYPE slis_t_listheader WITH HEADER LINE.
      DATA : l_date LIKE sy-datum,
             l_dat(15), l_mon(09).
      l_date = sy-datum.
      SELECT SINGLE ltx FROM t247
      INTO l_mon
      WHERE mnr = l_date+04(02)
      AND spras = sy-langu.
      CONCATENATE l_mon  l_date+06(02) ',' INTO l_dat.
      CONCATENATE l_dat l_date+0(04) INTO l_dat.
      header-typ = 'H'.
      header-info = 'REPORT NO : 11045'.
      APPEND  header.
      CLEAR header.
      header-typ = 'H'.
      header-info = 'PRODUCTION PLANNING REPORT'.
      APPEND  header .
      CLEAR header.
      header-typ = 'H'.
      header-info = 'ORDERS FOR THE WEEKEND :' .
      APPEND  header.
      CLEAR header.
      header-typ = 'S'.
      header-info = l_dat   .
      APPEND  header.
      CLEAR header.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = header[]
      i_logo                   = 'ENJOYSAP_LOGO' .
      I_END_OF_LIST_GRID       =
    ENDFORM.                                                    "any1
    *&      Form  alvdisplay
          text
    -->  p1        text
    <--  p2        text
    form alvdisplay .
      repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
       I_CALLBACK_TOP_OF_PAGE            = 'ANY1'
      I_CALLBACK_HTML_TOP_OF_PAGE       =
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = layout
         it_fieldcat                       = fcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
       IT_SORT                           = sort[]
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
       I_SAVE                            = 'X'
      IS_VARIANT                        =
       IT_EVENTS                         = events[]
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = t_final
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.                    " alvdisplay
    Thanks,
    Sudhir

    HI,
    I dont really understand what exactly you are looking for but from what I understand....
    Take another field in you table with YYYYMM....pass IT_SORT with this field sorted..into a grid you will have a list which is sorted by month...for weekly you need to work a bit more by explicitly finding the week of the record created and using the same field..
    hope this helps.
    santhosh

  • Exchange rate on weekly basis/ monthly basis

    Hi all,
    My requirement is fetching of exchange rate ( TCURR-UKURS ) on weekly and monthly basis
    based on the condition
    GDATU = during the month, consider rates from the first day of the month until the interface execution date
    Example:
    Interface execution on 08.07.2010 = consider rates from 08.01.2010 to 08.06.2010
    WEEKLY JOB: The program will be executed every Saturday / D-1 during the month;  
    THE MONTHLY JOB: must be executed on the first business day of the following month (D-1)
    Be aware when the first business day is on a Monday, such as on the 3rd, in which case the rates would be (D-2) 
    Please tell me how to take the date value based on teh above condition.
    Thanks in advance

    Hi Rocky,
    You need codeplex task schedule adapter.
    You can follow this link explaining how to use scheduler adapter
    http://connectedenterprise.wordpress.com/2011/09/26/the-very-useful-biztalk-scheduled-task-adapter/
    It has option to activate your receive location on weekly basis at a defined time window.
    This will surely help.
    Rachit

  • Oracle date to days in a week. (plsql)

    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.8.0 - Production
    Report Builder 10.1.2.0.2
    ORACLE Server Release 10.1.0.4.2
    Oracle Procedure Builder 10.1.2.0.2
    Oracle ORACLE PL/SQL V10.1.0.4.2 - Production
    Oracle CORE    10.1.0.4.0    Production
    Oracle Tools Integration Services 10.1.2.0.2
    Oracle Tools Common Area 10.1.2.0.2
    Oracle Toolkit 2 for Windows 32-bit platforms 10.1.2.0.2
    Resource Object Store 10.1.2.0.2
    Oracle Help 10.1.2.0.2
    Oracle Sqlmgr 10.1.2.0.2
    Oracle Query Builder 10.1.2.0.2 - Production
    PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
    Oracle ZRC 10.1.2.0.2
    Oracle XML Developers Kit 10.1.0.4.2 - Production
    Oracle Virtual Graphics System 10.1.2.0.2
    Oracle Image 10.1.2.0.2
    Oracle Multimedia Widget 10.1.2.0.2
    Oracle Tools GUI Utilities 10.1.2.0.2
    Select distinct ih.customer_id,patient_name,
            sum(case when to_char(ih.invoice_date,'Mon')=to_char(to_date(:end_date,'DD-MON-YYYY'),'Mon') then id.order_qty else 0 end) curr_month,
    from     tab1 ih,
               tab2 id,
               tab4 ip,
               tab3 vp
    where id.invoice_number = ih.invoice_number
    and id.item_id = vp.product_code
    and   id.item_id = ip.item_id
    and   ip.item_type in ('P')
    and ih.customer_id = 'WAD-EX0128'
    and   ih.invoice_date between  to_date('01-JAN-2015','DD-MON-YYYY')  and to_date('31-MAR-2015','DD-MON-YYYY')
    and vp.inv_product_type in ('RBC','LRBC','LPHER','PHER','FFP','FP24','CRYO')
    group by ih.customer_id,patient_name
    I need help in the case statement to distribute qty based on weeks of that month.
    This query works fine. But now I need data by weeks, like
    customer  id    patient name            Week1                                          Week2
                                                  mon   tue   wed  thu    fri  sat   sun     mon   tue   wed  thu    fri  sat   sun
    We can just take sample data for 1 month  as start date and 01-jan-2015  and end date as 31-jan-2015. having data for 4 weeks. Help is appreciated. I tried all the queries like
    select to_char(sysdate,'IW'), to_char(sysdate,'Dy') from dual;
    select to_char(sysdate,'Mon') || ' week' || to_char(sysdate,'W') from dual;
    but not getting the data distributed by weeks. Please help me get data based on invoice_date by weeks and days.
    Required Data per sample data ( Jan 2015) 1st week.

    Being 9i you might try to avoid Dynamic SQL concatenating daily counts to a single month_string (in the past Frank proposed it quite frequently), aligning the strings on weekdays (starting with sunday) and finally using substr to form columns.
    select ym,customer_id,patient_name,
           nullif(substr(month_string,1,instr(month_string,',') - 1),'~') sun_1,
           nullif(substr(month_string,instr(month_string,',',1,1) + 1,instr(month_string,',',1,2) - instr(month_string,',',1,1) - 1),'~') mon_1,
           nullif(substr(month_string,instr(month_string,',',1,2) + 1,instr(month_string,',',1,3) - instr(month_string,',',1,2) - 1),'~') tue_1,
           nullif(substr(month_string,instr(month_string,',',1,3) + 1,instr(month_string,',',1,4) - instr(month_string,',',1,3) - 1),'~') wed_1,
           nullif(substr(month_string,instr(month_string,',',1,4) + 1,instr(month_string,',',1,5) - instr(month_string,',',1,4) - 1),'~') thu_1,
           nullif(substr(month_string,instr(month_string,',',1,5) + 1,instr(month_string,',',1,6) - instr(month_string,',',1,5) - 1),'~') fri_1,
           nullif(substr(month_string,instr(month_string,',',1,6) + 1,instr(month_string,',',1,7) - instr(month_string,',',1,6) - 1),'~') sat_1,
           substr(month_string,instr(month_string,',',1,7) + 1,instr(month_string,',',1,8) - instr(month_string,',',1,7) - 1) sun_2,
           substr(month_string,instr(month_string,',',1,8) + 1,instr(month_string,',',1,9) - instr(month_string,',',1,8) - 1) mon_2,
           substr(month_string,instr(month_string,',',1,9) + 1,instr(month_string,',',1,10) - instr(month_string,',',1,9) - 1) tue_2,
           substr(month_string,instr(month_string,',',1,10) + 1,instr(month_string,',',1,11) - instr(month_string,',',1,10) - 1) wed_2,
           substr(month_string,instr(month_string,',',1,11) + 1,instr(month_string,',',1,12) - instr(month_string,',',1,11) - 1) thu_2,
           substr(month_string,instr(month_string,',',1,12) + 1,instr(month_string,',',1,13) - instr(month_string,',',1,12) - 1) fri_2,
           substr(month_string,instr(month_string,',',1,13) + 1,instr(month_string,',',1,14) - instr(month_string,',',1,13) - 1) sat_2,
           substr(month_string,instr(month_string,',',1,14) + 1,instr(month_string,',',1,15) - instr(month_string,',',1,14) - 1) sun_3,
           substr(month_string,instr(month_string,',',1,15) + 1,instr(month_string,',',1,16) - instr(month_string,',',1,15) - 1) mon_3,
           substr(month_string,instr(month_string,',',1,16) + 1,instr(month_string,',',1,17) - instr(month_string,',',1,16) - 1) tue_3,
           substr(month_string,instr(month_string,',',1,17) + 1,instr(month_string,',',1,18) - instr(month_string,',',1,17) - 1) wed_3,
           substr(month_string,instr(month_string,',',1,18) + 1,instr(month_string,',',1,19) - instr(month_string,',',1,18) - 1) thu_3,
           substr(month_string,instr(month_string,',',1,19) + 1,instr(month_string,',',1,20) - instr(month_string,',',1,19) - 1) fri_3,
           substr(month_string,instr(month_string,',',1,20) + 1,instr(month_string,',',1,21) - instr(month_string,',',1,20) - 1) sat_3,
           substr(month_string,instr(month_string,',',1,21) + 1,instr(month_string,',',1,22) - instr(month_string,',',1,21) - 1) sun_4,
           substr(month_string,instr(month_string,',',1,22) + 1,instr(month_string,',',1,23) - instr(month_string,',',1,22) - 1) mon_4,
           substr(month_string,instr(month_string,',',1,23) + 1,instr(month_string,',',1,24) - instr(month_string,',',1,23) - 1) tue_4,
           substr(month_string,instr(month_string,',',1,24) + 1,instr(month_string,',',1,25) - instr(month_string,',',1,24) - 1) wed_4,
           substr(month_string,instr(month_string,',',1,25) + 1,instr(month_string,',',1,26) - instr(month_string,',',1,25) - 1) thu_4,
           substr(month_string,instr(month_string,',',1,26) + 1,instr(month_string,',',1,27) - instr(month_string,',',1,26) - 1) fri_4,
           substr(month_string,instr(month_string,',',1,27) + 1,instr(month_string,',',1,28) - instr(month_string,',',1,27) - 1) sat_4,
           nullif(substr(month_string,instr(month_string,',',1,28) + 1,instr(month_string,',',1,29) - instr(month_string,',',1,28) - 1),'~') sun_5,
           nullif(substr(month_string,instr(month_string,',',1,29) + 1,instr(month_string,',',1,30) - instr(month_string,',',1,29) - 1),'~') mon_5,
           nullif(substr(month_string,instr(month_string,',',1,30) + 1,instr(month_string,',',1,31) - instr(month_string,',',1,30) - 1),'~') tue_5,
           nullif(substr(month_string,instr(month_string,',',1,31) + 1,instr(month_string,',',1,32) - instr(month_string,',',1,31) - 1),'~') wed_5,
           nullif(substr(month_string,instr(month_string,',',1,32) + 1,instr(month_string,',',1,33) - instr(month_string,',',1,32) - 1),'~') thu_5,
           nullif(substr(month_string,instr(month_string,',',1,33) + 1,instr(month_string,',',1,34) - instr(month_string,',',1,33) - 1),'~') fri_5,
           nullif(substr(month_string,instr(month_string,',',1,34) + 1,instr(month_string,',',1,35) - instr(month_string,',',1,34) - 1),'~') sat_5,
           nullif(substr(month_string,instr(month_string,',',1,35) + 1,instr(month_string,',',1,36) - instr(month_string,',',1,35) - 1),'~') sun_6,
           nullif(substr(month_string,instr(month_string,',',1,36) + 1,instr(month_string,',',1,37) - instr(month_string,',',1,36) - 1),'~') mon_6,
           nullif(substr(month_string,instr(month_string,',',1,37) + 1,instr(month_string,',',1,38) - instr(month_string,',',1,37) - 1),'~') tue_6
      from (select ym,customer_id,patient_name,
                   case when to_date(ym,'yyyymm') - trunc(to_date(ym,'yyyymm'),'iw') + 1 < 7
                        then rpad('~,',2 * (to_date(ym,'yyyymm') - trunc(to_date(ym,'yyyymm'),'iw') + 1),'~,')
                   end||
                   days_in_month||
                   rpad('~,',
                        2 * (length(replace(case when to_date(ym,'yyyymm') - trunc(to_date(ym,'yyyymm'),'iw') + 1 < 7
                                                 then rpad('~,',2 * (to_date(ym,'yyyymm') - trunc(to_date(ym,'yyyymm'),'iw') + 1),'~,')
                                            end||days_in_month,
                             length(case when to_date(ym,'yyyymm') - trunc(to_date(ym,'yyyymm'),'iw') + 1 < 7
                                         then rpad('~,',2 * (to_date(ym,'yyyymm') - trunc(to_date(ym,'yyyymm'),'iw') + 1),'~,')
                                    end||days_in_month
                                   ) +
                             38
                       '~,'
                       ) month_string
              from (select to_char(trunc(ih.invoice_date,'mm'),'yyyymm') ym,
                           ih.customer_id,
                           patient_name,
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '01' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '02' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '03' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '04' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '05' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '06' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '07' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '08' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '09' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '10' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '11' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '12' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '13' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '14' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '15' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '16' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '17' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '18' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '19' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '20' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '21' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '22' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '23' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '24' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '24' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '25' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '27' then 1 end))||','||
                           to_char(count(case when to_char(ih.invoice_date,'dd') = '28' then 1 end))||','||
                           case when to_char(last_day(trunc(ih.invoice_date,'mm')),'dd') >= '29'
                                then to_char(count(case when to_char(ih.invoice_date,'dd') = '29' then 1 end))
                                else '~'
                           end||','||
                           case when to_char(last_day(trunc(ih.invoice_date,'mm')),'dd') >= '30'
                                then to_char(count(case when to_char(ih.invoice_date,'dd') = '30' then 1 end))
                                else '~'
                           end||','||
                           case when to_char(last_day(trunc(ih.invoice_date,'mm')),'dd') >= '31'
                                then to_char(count(case when to_char(ih.invoice_date,'dd') = '31' then 1 end))
                                else '~'
                           end||',' days_in_month
                      from tab1 ih,
                           tab2 id,
                           tab4 ip,
                           tab3 vp
                     where id.invoice_number = ih.invoice_number
                       and id.item_id = vp.product_code
                       and id.item_id = ip.item_id
                       and ip.item_type in ('P')
                       and ih.customer_id = 'WAD-EX0128'
                       and ih.invoice_date between to_date(:date_from,'DD-MON-YYYY') and to_date(:date_to,'DD-MON-YYYY')
                       and vp.inv_product_type in ('RBC','LRBC','LPHER','PHER','FFP','FP24','CRYO')
                     group by ih.customer_id,patient_name,trunc(ih.invoice_date,'mm')
    order by ym,customer_id,patient_name
    YM
    CUSTOMER_ID
    PATIENT_NAME
    SUN_1
    MON_1
    TUE_1
    WED_1
    THU_1
    FRI_1
    SAT_1
    SUN_2
    MON_2
    TUE_2
    WED_2
    THU_2
    FRI_2
    SAT_2
    SUN_3
    MON_3
    TUE_3
    WED_3
    THU_3
    FRI_3
    SAT_3
    SUN_4
    MON_4
    TUE_4
    WED_4
    THU_4
    FRI_4
    SAT_4
    SUN_5
    MON_5
    TUE_5
    WED_5
    THU_5
    FRI_5
    SAT_5
    SUN_6
    MON_6
    TUE_6
    WED_6
    201501
    WAD-EX0128
    ALEXIAN BROTHERS MEDICAL CENTER
    9
    7
    11
    11
    2
    26
    14
    27
    17
    21
    16
    10
    14
    14
    4
    50
    0
    21
    13
    12
    17
    26
    20
    34
    34
    51
    8
    1
    5
    1
    41
    201502
    WAD-EX0128
    ALEXIAN BROTHERS MEDICAL CENTER
    19
    3
    27
    11
    9
    0
    15
    22
    32
    4
    8
    16
    33
    0
    54
    0
    21
    26
    11
    8
    13
    0
    41
    11
    11
    15
    18
    20
    201503
    WAD-EX0128
    ALEXIAN BROTHERS MEDICAL CENTER
    0
    5
    6
    28
    0
    0
    39
    0
    0

  • How to find total row count on weekly basis

    I have written a join query which works perfect and it give me total number of rows between two dates, however is there a way where i can modify my query so that i can see the result on weekly basis from January 2014 to may 2014
    ;WITH SourceData
    as
        SELECT tablet.Approach.ApproachId
        ,StartDateTime
        ,QuestionId, Stage
        FROM Tablet.Approach
        JOIN tablet.DataCapture ON tablet.Approach.ApproachId = tablet.DataCapture.ApproachId
        WHERE QuestionId in (9,10)
        and Stage = 2
        and StartDateTime between '2014-01-01 00:00:00' and '2014-05-20 00:00:00'
    ,RecordCnt
    AS
        SELECT COUNT(ApproachId) AS TotalInformationEffectContacts
        FROM SourceData
    Select * from SourceData Cross join RecordCnt
    order by StartDateTime asc

    Use GROUP BY datediff(ww,@startdate,@enddate)
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Time on Calendar Region Daily and Weekly View

    I have created a SQL calendar and the dates work fine, but how can I get the data to display in the appropriate time block on the weekly or daily view? There is no item for calendar_time, only calendar_date. Why is there a view for Daily and Weekly but no way to use the time features???
    Thanks.
    Andrew

    > Hi SDN Experts,
    >
    > I have a daily chain (#1) that is linked to and AND
    > collector. A weekly-friday-run chain is also linked
    > to this AND which when both these conditions are met,
    >  process Z is run.
    >
    > Today, eg. monday, the daily chain has run and thus
    > it triggers event to AND. But the weekly chain has
    > not yet run as its only monday. Does this mean this
    > chain is still in batch process as it has yet
    > completed due to weekly chain not yet triggered by
    > time?
    <b>It is not such a good practice to club these two like this.
    ></b>
    > What happens to this chain (& related batch job(s))
    > and specifically this AND collector if  tueday comes
    > and triggers another daily chain run #2?
    >
    <b>That results in a another wait loop until Friday.</b>> How does the AND collector handle these 2 times of
    > triggering event by the daily chain (1 from #1 and
    > the other from #2)?
    <b>They both will execute around same time twice on Friday.</b>>
    > What will happen to the system batch processes if the
    > initial daily chain only completely run its course on
    > Friday when the weekly chain is finally activated?
    > Would there be a compounding effect to the batch
    > processes?
    > I am concerned about the batch jobs being occupied by
    > daily and weekly chain combination which may hang the
    > system. Hope this fear is unfounded.
    >
    > Hope my problem description is clear enough.
    >
    > Thanks in advance.
    >
    > Alfonso S.
    >

  • How to format a date to display the ISO week number in BI Publisher ?

    Hi there,
    I need to format a date to display the ISO week number in BI Publisher.
    I've tried the following <?format-date:NEED_BY_DATE;'WW'?>, but it returns a week number (1-53) where week 1 starts on the first day of the year and continues to the seventh day of the year, which is not what I want.
    I want the ISO week number (1-52 or 1-53), the one implemented by the 'IW' format mask of the Oracle PL/SQL TO_CHAR() function for example.
    I've tried using 'IW' format mask, but it is not recognised by BI Publisher.
    Also, as I'm working on an RTF template, I've tried 'IW' as MS Word date format, but it is not recognised by MS Word :-((
    Any help would be much appreciated,
    Regards - Hugues

    Hi,
    Thank you for the post.
    The thing is I don't have access to the query, unless I modify a standard E-Businees Suite view (one of those used to generate the PO document in Purchasing).
    Regards - Hugues

  • Particular data in a report, on the basis of the values (0, 1) of a dashboa

    hi
    User should be able to see the particular data in a report, on the basis of the values (0, 1) of a dashboard prompt.
    For e.g. if the user selects 0 then current years data should be filtered out
    and if the user selects 1 then rest all years data should be displayed in a request.
    give me hint regarding this question

    Hi,
    I hope this will help you
    http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-selecting-reports-from-dashboard-prompts-and-guided-navigation-sections/
    In this example he used prompt for selecting Region sales and Brand sales which you can replace with 0 and 1
    Phani.

  • Dunning letters run automatically on a weekly basis

    Hi Expert,
    Is it possible to make the dunning letters run automatically on a weekly basis? If the answer is yes, then what config do we need to run the report on wekkly basis or what are the steps. Please let me know in very details, because, I am not the SD person.
    Thanks

    On your Router setup page set the MTU value from AUTO to Manual and change the Size from 1500 to 1350 and click on Save Settings...

  • TS4337 my scroll bar continues to scroll up to the top when I'm in the daily or weekly view of ICloud calendar - how do I stop this?

    When I am using the Icloud calendar on my PC in the daily or weekly view, my scroll bar on the right continues to move up to the top of the page.  This has just happened today so I'm sure I pushed something on my keyboard.  I have restarted my system, disconnected then reconnected my keyboard but to no avail.  Any suggestions?

    If you're using Chrome as your browser, try increasing the font size in your browser settings (see https://support.google.com/chrome/answer/96810?hl=en).

  • How do you change the pink highlight for the present day in calendar when in week view

    How do you change the pink highlight for the present day in calendar when in week view - OSX Maverick

    the current day was light blue in ical in 10.6 but with plenty of contrast, but I recently made the bigger leap all the way to calendar in 10.9. the choice of color is terrible for reasons such as Spile1962 puts below, but also not having any way to tweak it is terrible. I'm on a bran d new imac and can barely see a difference and frankly, while I appreciate the subtlety, I still forget to look for the darker bar across the top of the current week and day. we should be able to adjust weekend and current day bg colors.
    I went into the app's package contents in hopes that they were using a tiff/png file that I could tweak on my own but couldn't find anything for them. all the icons are there, as are the bg sets for all the little pop-ups and things, but I couldn't even find a reference to a hex color in the plist file.
    send apple feedback. I just did myself, except that Calendar hasn't made the list (yet?), only iCal up to version 4.x, and Messages is still only iChat for feedback, and some others are old as well. apparently after steve died, apple's attention to these details just died with him. it's been that long since those other apps should have been relevant on their site.

  • Requirement to get Inventory data at the Daily level (non-cumulative KF)

    Hello All,
    Kindly provide ur suggesstions on the issue mentioned below:
    We require the Inventory data at a daily level. Also we require that the non-cumulatve Key Figures such as 0TOTALSTOCK, etc. be available to us in the BW itself, since this is required for further processing.
    PS: Right now we are using RSCRM_BAPI to execute the qurey and store the data into a table, but it fails for non-cumulative keyfigures. Kindly suggest if ther are other ways which can suffice the requirement mentioned above.
    Thank you.
    Regards,
    Kunal Gandhi

    Another one?
    You should read this link: https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement

Maybe you are looking for

  • Error as Enter while creation of PO due to this PO is not created in ME21N

    Hi All, I have an issue where one of my user cannot able to create a PO with refernce to Network and he is getting error as ENTER while creation of PO in ME21N and there is no long text for this error.Also user cannot able to create a PO whenever he

  • How do I save .ai as .dwg as 1:1?

    This should be so easy but it ain't working for me! Original size of my pattern in AI (version CS6) is 800 x 600mm but after saving and viewing it in DWG, the size is 20304.195 x 15239.734mm. The Save As command (when saving it as dwg) gives one the

  • How to set datetime datatype in sql server simultaneously

    Hi, How can I set date and time simultaneously in datetime field in sql server 2000 using jdbc. Thanks

  • Can oracle 10g database store 1,000,000,000,000 and bigger number

    I am using oracle 10g db as my database. Can the oracle databse holds and calculate the results large no. such as 1,000,000,000,000 . what is the maximum numbers oracle can process. Also does oracle supports numeric fields upto 9 decimal places? Mess

  • EBS Integration HTTP 404 error

    I have a function defined in EBS to call Apex. When I click on function in Menu in Oracle it gives me error The webpage cannot be found HTTP 404 error. I close down this window and after couple of clicks the Apex form opens up. It is very frustrating