Ascending Order in Data Level

Hi Friends,
I have a table xxx and it has two columns col1 and col2 and below is the data for these columns.
Col1 Col2
111 5,6,9,2,1
211 10,12,8,9
311 6,7,8,1,2,3,4
Below is the required output;
Col1 Col2
111 1,2,5,6,9
211 8,9,10,12
311 1,2,3,4,6,7,8
I want the column level data in the ascending order. Please help me on this.
Regards,
Williams
Edited by: Williams on Sep 24, 2012 7:11 PM

Hi, Sankar,
Here's one way:
(1) Split each string into multiple rows, one row for each item in the delimited list. (This is how the data should be stored in the frist place.) See {message:id=10095021}
(2) Use the analytic ROW_NUMEBR (or DENSE_RANK, depending on your requirements) to number the rows 1, 2, 3, ..., using "PARTITION BY col1" to get a separate set of numbers for each value of col1.
(3) Use String Aggregation to combine the rows into one row per col1. See
http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
If you get stuck, post your best attempt, along with a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
Simplify the problem as much as possible. Remove all tables and columns that play no role in this problem.
Always say which version of Oracle you're using (for example, 11.2.0.2.0).
See the forum FAQ {message:id=9360002}

Similar Messages

  • Generating the output in Ascending order of Date (Month-YY)

    Hi I have a query as below...
    I want the result to be in Ascending order of date in the form of (Month-YY)
    but i couled get the desired order
    the result is next to the query...
    SELECT TO_CHAR (TRUNC (TO_DATE (poh_date_d), 'MON'), 'MONTH') || ' - ' || TO_CHAR (TO_DATE (poh_date_d), 'YY'), class_code_c, COUNT (coach_no_c)
    FROM mecd_coach_m
    WHERE poh_date_d BETWEEN TO_DATE ('01-JAN-07') AND TO_DATE (SYSDATE)
    AND poh_stn_c = 'MTN'
    GROUP BY TO_CHAR (TRUNC (TO_DATE (poh_date_d), 'MON'), 'MONTH') || ' - ' || TO_CHAR (TO_DATE (poh_date_d), 'YY'), class_code_c
    ORDER BY TO_CHAR (TRUNC (TO_DATE (poh_date_d), 'MON'), 'MONTH') || ' - '
    || TO_CHAR (TO_DATE (poh_date_d), 'YY')
    The Output
    TO_CHAR(TRUNC( CLASS_CODE COUNT(COACH_NO_C)
    APRIL - 07 ACCN 12
    APRIL - 07 ACCW 7
    APRIL - 07 ART 1
    APRIL - 08 ACCN 16
    APRIL - 08 ACCW 8
    APRIL - 08 ART 4
    APRIL - 08 GFSCWAC 1
    AUGUST - 07 ACCN 12
    AUGUST - 07 ACCW 3
    AUGUST - 07 CT 2
    AUGUST - 07 DCBACEN 1
    DECEMBER - 07 ACCN 14
    DECEMBER - 07 ACCW 7
    DECEMBER - 07 ART 3
    DECEMBER - 07 GFSCWAC 2
    FEBRUARY - 07 ACCN 9
    FEBRUARY - 07 ACCW 5
    FEBRUARY - 07 GS 27
    FEBRUARY - 07 GSCN 60
    FEBRUARY - 08 ACCN 13
    FEBRUARY - 08 ACCW 9
    FEBRUARY - 08 FACCW 1
    JANUARY - 07 ACCN 1
    JANUARY - 07 ACCW 4
    JANUARY - 07 ART 3
    JANUARY - 07 GFSCWAC 1
    JANUARY - 08 ACCN 15
    JANUARY - 08 ACCW 13
    JANUARY - 08 ART 4
    JANUARY - 08 GFSCWAC 2
    JULY - 07 ACCN 8
    JULY - 07 ACCW 13
    JULY - 07 ART 2
    JULY - 07 BUO 1
    JUNE - 07 ACCN 15
    JUNE - 07 ACCW 10
    JUNE - 07 ART 2
    JUNE - 07 FCZ 1
    JUNE - 07 FSCN 1
    JUNE - 08 ACCW 1
    JUNE - 08 ART 1
    JUNE - 08 GS 2
    JUNE - 08 GSCN 3
    MARCH - 07 ACCN 18
    MARCH - 07 ACCW 7
    MARCH - 07 GS 30
    MARCH - 08 ACCN 13
    MARCH - 08 ACCW 9
    MARCH - 08 GFSCWAC 1
    MARCH - 08 GS 55
    MARCH - 08 GSCN 79
    MAY - 07 ACCN 10
    MAY - 07 ACCW 8
    MAY - 07 ART 4
    MAY - 07 FSCN 1
    MAY - 08 ACCN 4
    MAY - 08 ACCW 3
    MAY - 08 ART 1
    MAY - 08 FACCW 1
    MAY - 08 GS 11
    NOVEMBER - 07 ACCN 15
    NOVEMBER - 07 ACCW 12
    NOVEMBER - 07 ART 1
    NOVEMBER - 07 GS 32
    NOVEMBER - 07 GSCN 70
    OCTOBER - 07 ACCN 14
    OCTOBER - 07 ACCW 7
    OCTOBER - 07 ART 1
    OCTOBER - 07 FACCW 1
    OCTOBER - 07 GS 38
    SEPTEMBER - 07 ACCN 8
    SEPTEMBER - 07 ACCW 9
    SEPTEMBER - 07 ART 1
    SEPTEMBER - 07 DCTACEN 1
    SEPTEMBER - 07 DCTEN 2
    Please suggest me the Solution
    Thank You....

    U r right. It will give error.I am sorry for it. I am sending the correct code. I think it will work.
    SELECT TO_CHAR(TO_DATE(PD,'MM-YY'),'MONTH')||'--'||TO_CHAR(TO_DATE(PD,'MM-YY'),'YY') DATE,class_code_c,COUNTS
    FROM
    SELECT TO_CHAR (TRUNC (TO_DATE (poh_date_d), 'MM'), 'MM') || ' - ' || TO_CHAR (TO_DATE (poh_date_d), 'YY') pd,
    class_code_c, COUNT (coach_no_c) COUNTS
    FROM mecd_coach_m
    WHERE poh_date_d BETWEEN TO_DATE ('01-JAN-07') AND TO_DATE (SYSDATE)
    AND poh_stn_c = 'MTN'
    GROUP BY TO_CHAR (TRUNC (TO_DATE (poh_date_d), 'MM'), 'MM') || ' - ' || TO_CHAR (TO_DATE (poh_date_d), 'YY'),
    class_code_c
    ORDER BY TO_CHAR (TRUNC (TO_DATE (poh_date_d), 'mm'), 'MM') || ' - '
    || TO_CHAR (TO_DATE (poh_date_d), 'YY'))
    For checking:
    select to_char(to_date(dt,'mm--yyyy'),'month')||'--'||to_char(to_date(dt,'mm--yyyy'),'yyyy'),SUM
    from
    (select to_char(hire_date,'mm')||'--'||to_char(hire_date,'yyyy') dt,sum(salary) SUM from employees
    group by to_char(hire_date,'mm')||'--'||to_char(hire_date,'yyyy')
    order by
    to_char(hire_date,'mm')||'--'||to_char(hire_date,'yyyy'))

  • Arrange Array in ascending order by date

    Kindly help me sort out the order by problem.
    I have a date array which goes like;
    12/3/2012
    11/3/2012
    12/5/2012
    12/8/2012
    12/6/2012
    12/12/2012
    12/10/2012
    12/17/2012
    I need to arrange it in ascending order, like
    11/3/2012
    12/3/2012
    12/5/2012
    12/6/2012
    12/8/2012
    12/10/2012
    12/12/2012
    12/17/2012
    Please help.
    Thank you in advance.
    Regards
    Grugh Mike
    Success is Everything !!

    Grugh_Mike wrote:
    is'nt there any easier method to sort a time array ?
    It's a lot easier than trying to manipulate the strring into yyyy/dd/mm format and sorting alphabetically.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Order Management Data Level Security

    Hi All,
    I have worked on OBIEE standalone and implemented data level security from custom data warehouse but never worked on BI Apps.Currently I am working Order Management and trying to implement data level security but I have no clue which OOTB init block to use for it.When i check the Order Management Group's--> permission there is no filter condition on them which i am thinking there no data level security on OM may i thinking wrong.Here is req users must able to see data by Division and Region they belong to and I am trying use OOTB security option for it OR do i need to build custom init block and related keys in all the sales order fact tables to implement it.
    Any documentation or links or information will be appreciated.
    This might be silly question but I would find a way better way.Please let me know if you need any information.
    Thanks

    Forgot to mention :Soruce is Oracle EBS

  • Order by problem.......how to Ascending order by date from the following query

    hi
    i have following query to show the monthly sales after summing up monthly sales total but i have facing a problem this query is not properly perform order by clause according to the months like jan,feb,mar etc... please tell me where i made mistake
    SELECT     CashName AS AccountName, LEFT(DATENAME(month, CashDate), 3) + ' - ' + DATENAME(year, CashDate) AS Months, SUM(Total) AS NetSales
    FROM         dbo.CashSales
    GROUP BY LEFT(DATENAME(month, CashDate), 3) + ' - ' + DATENAME(year, CashDate), CashName

    Select AccountName, Months, NetSales from
    (SELECT CashName AS AccountName, LEFT(DATENAME(month, CashDate), 3) + ' - ' + DATENAME(year, CashDate) AS Months, SUM(Total) AS NetSales,
    DATEADD(month, DATEDIFF(month, 0, CashDate), 0) as dt
    FROM dbo.CashSales
    GROUP BY LEFT(DATENAME(month, CashDate), 3) + ' - ' + DATENAME(year, CashDate), CashName, DATEADD(month, DATEDIFF(month, 0, CashDate), 0)
    t
    Order By dt

  • Doesn't Sort data in Ascending order in Hash Table?

    Hello
    I am using JSP, Servlets. After quering in servlets, putting data in HashTable then set attribute in servlets, get attribute in JSP & retrieving data from HashTable in JSP & putting in select html element, data is not coming in ascending order in select drop down box. I need A,B,C,D but it is coming b,d,c,a. When I run query in DB, it shows in sequence but after putting in HashTable, it is not coming in sequence.
    How to make it ascending?
    Looking forward for an early reply.
    Thanks.

    Hi
    Something to do with TreeMap(TreeSet). I tried with TreeSet but it didn't work. Here is the code :
    In servlet :
    Connection lConnection = getConnection(pRequest);
    String lSQL = "";
    Statement lStatement;
    ResultSet lResultSet;
    Hashtable lLtypeHashtable = new Hashtable();
    lStatement = lConnection.createStatement();
    lSQL = "SELECT RCID,RCMEANING FROM REFERENCECODES WHERE RCDOMAIN = 'LOCATIONTYPE' AND RCROWSTATE > 0 order by RCMEANING";
    lResultSet = lStatement.executeQuery(lSQL);
    while(lResultSet.next())
    String lRcid = lResultSet.getString(1);
    String lRcmeaning = lResultSet.getString(2);
    lLtypeHashtable.put(lRcid.trim(),lRcmeaning.trim());
    if(lResultSet != null) lResultSet.close();
    if(lStatement != null) lStatement.close();
    pRequest.setAttribute("LtypeHashtable",lLtypeHashtable);
    //Below Query is executed when one data from select element is selected
    String lLType = DisplayUtilities.getString(pRequest.getParameter("LType"),true);
    //LType is name of select element in JSP.
    if (lLType != null)
    lSQL = lSQL + " AND " + lUpperCaseFunction + "(LOCATIONTYPE)" +
    " = " + DBUtilities.formatString(lLType.toUpperCase());
    pRequest.setAttribute("rLType",lLType+"");
    In JSp :
    <%
    Hashtable lLtypeHashtable = (Hashtable)request.getAttribute("LtypeHashtable");
    %>
    <TR>
    <TD width="15%"> <div align="left">
    <select name="LType" size="1" >
    <option Value="">< Select ></option>
    <%
    if(lLtypeHashtable != null)
    Enumeration enum = lLtypeHashtable.keys();
    while(enum.hasMoreElements())
    String key = (String)enum.nextElement();
    String value = (String)lLtypeHashtable.get(key);
    String flagBack = "";
    if(key.equals((String)request.getAttribute("rLType")))
    flagBack = "selected";
    %>
    <option Value="<%=key%>" <%=flagBack%>><%=value%></option>
    <%
    %>
    </select></div>
    </TD>
    </TR>
    How should I implement TreeSet?
    Looking forward for an early reply.
    Thanks.

  • PO date and Omaterial should display in the ascending order

    Hi experts,
    When i excute the rep0rt the POdate and Material is not displaying in asending order, based on this order am caluculating some other key feild.
    Back ground  this was a Function Module datasource whichwas extraced into BI , Until PSA am getting the values correct. But from Cube the materilal and Podate are not in sequence. How to make these 2 in order. In reporting is there any setting, i tried to display in ascending order  in query properties this not makign any change.
              POdate            Material
    Ex: - 01-0102010   4010100010
            02-01-2010    40101000020
    Regards,
    singam.v

    Hi,
    Please check "Sorting" options in Query Designer.  They are defined for each characteristic placed at rows or columns.
    You can sort according to keys (InfoObject Primary Keys) or Name/Description (InfoObject Texts).  Perhaps the query is sorting but according to a criterion which is different from what it is expected.
    Another thing to take into account is the order in which columns are placed.  Sorting order is defined from left to right.
    For example, if the first column is 0CALDAY and the second is 0MATERIAL, the query first sorts by date and if there are records with the same date, it sorts according to material, and so forth.
    I hope this helps you.
    Regards,
    Maximiliano

  • SSRS Chart to format the date in ascending order

    Hi All;
    I need to sort the dates on Horizontal axis in ascending order
    hence in category group - sorting - i had used teh below formula
    =format(CDate(Fields!goalstartdateValue.Value),"MMM yyyy")
    but it still displays the date as below
    Any help much appreciated
    Thanks
    Pradnya07

    Does it work if you use
    CDate(Fields!goalstartdateValue.Value)
    instead.

  • Sale Order additional data B.

    Hi,
    I have created 2 z fields in sale order additional data b at item level.
    but when user is entering any data in that field,same data is getting displayed for all line items.
    how to control that for particular item for which user has entered.
    Data Entered in z fields are used only for display purpose which are used for some calculations.

    hi,
    in PAI  usercommand  module  
    use loop endloop for internal table which store item level data 
    loop at item level data
    user command module 
    endloop.
    in module  driving program .
    module
    read table it_issue index tab_ctl-current_line transporting no fields.
      if sy-subrc = 0.
        it_issue-kostl = p_kostl.
        it_issue-ktext = p_ktext.
        it_issue-for_sys = p_for_sys.
        modify it_issue from it_issue index tab_ctl-current_line.
        clear it_issue.
      else.
        it_issue-kostl = p_kostl.
        it_issue-ktext = p_ktext.
        it_issue-for_sys = p_for_sys.
        append it_issue .
        clear it_issue.
      endif.
    endmodule  .
    regards
    deepak.

  • Sales orders flow - dates difference

    Dear All,
    I need to build a model for a report which needs to have the days difference between the sales order creation date, delivery date, goods issue date  and billing date. The lowest level of detail should be the Sales Order/Item and one Sales Order/Item can origin different Delivery Items.
    Base on this, i'm wondering how can i model this scenario...
    Do you have any suggestion?
    Thanks in advance and best regards,
    Nuno

    Hi,
    I need to build a model for a report which needs to have the days difference between the
    Sales order creation date,
    Delivery date,
    Goods issue date ,
    Billing date.
    In your question you didn't mension what differences you need
    Eg:
    Sales order creation date - Delivery date
    Goods issue date - Billing date
    Sales order creation date - Billing date
    Delivery date - Goods issue date
    Like what combination you need?.
    Steps:
    Bring all InfoObejcts into Cube and once youn have all required InfoObecjts in your cube then in reporting level you can play like any thing. So first bring all Dates data into Cube. Use 0SD_C03 InfoCube with relavent datasources.
    Then Use Formula Variables with Replacement pathes and then do simple Substractions at reporting level. Your problem is resolved.
    See the below Article how I'm calculating Age of teh Material. Here I'm using Custome Exit Variable to get teh System Data, but in your case you don't need it, you just use Formula Variable with Replcemet Path and replace with Date and then do Substartion.
    Calculating the Ageing of the Materials
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/a-c/calculating%20the%20ageing%20of%20the%20materials.pdf
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    Thanks
    Reddy

  • Sales order item data & sales order schedule data

    Hello,
    I have a Sales Orders cube which is pulling data from two DSOs (one for sales order item data and the other for sales order schedule data). The common fields between these two DSOs is the Sales Order number but in my cube I have dual entries for each Sales Order document (item and schedule info).
    Example of how the data looks now:
    Sales Order . . Item Cat. . . Article . . . Net Price . . . Delivery . . . Act GI Date
    1. . . . . . . . . ...TAN. . . . . ABC123. . . .10
    1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 . . . . . . . . 01/01/2000
    2. . . . . . . . . ...TAN. . . . . CBA321. . . .15
    2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 . . . . . . . . 01/02/2000
    How do I merge the data on the Sales Order number in the cube so it looks like below?
    Sales Order . . Item Cat. . . Article . . . Net Price . . . Delivery . . . Act GI Date
    1. . . . . . . . . ...TAN. . . . . ABC123. . . .10 . . . . . . . . . .1 . . . . . . . . 01/01/2000
    2. . . . . . . . . ...TAN. . . . . CBA321. . . .15 . . . . . . . . . .2 . . . . . . . . 01/02/2000
    Many thanks,
    Matt

    > Hello,
    >
    > I have a Sales Orders cube which is pulling data from
    > two DSOs (one for sales order item data and the other
    > for sales order schedule data). The common fields
    > between these two DSOs is the Sales Order number but
    > in my cube I have dual entries for each Sales Order
    > document (item and schedule info).
    >
    Two previous remarks:
    1) If you need to report on very detailed data consider doing an info-set joining both datastores. 2 reasons why:
    - not a good idea to report on very detailed information (sales order, GI dates) on cube level, if you have a scenario with lots of data. You end up with big dimension tables a poor report times;
    - there are better alternatives, like drill-through from cube query to DS query with report to report interface or Datastore-based reporting...so...
    With this solution you do not need to change the data model, I think, but test to be sure. See if the reporting times are acceptable. If not...
    2) First confirm your requirements, because what you show in your example as "to-be" have details that do not make sense, probably..
    - if you have more that one schedule line for each item then you would have many times the item information like material/price;
    - if not or if you could cope with that, then you can consider:
    2.1) create a new DS that agregattes from the previous on, with the same key of sales order item; do you have schedule line kf's? if so you these KF's should be additive in DS update; But if you may have more one scheduled line for 1 item then you have to decide what to do with the GI data (keep the last one posted, use code..) and other characteristics.
    2.2) update the shedule line datasource to the sales order item DS; same comments apply.
    2.3) maintain the missing data in the cube update rules from sheduled lines DS. Using code, refer to the respective item in the order item ODS. You would have to make sure that DS's data are correctly activated before updating the infocube.
    What solutions to choose?
    2.1 is better in terms of flexibility and architecture...because you could re-arrange the new DS to answer future needs, without loosing the 1st line DS's data;
    2.2 choose if data volumes and disk space are a concern...
    or
    2.3 it's OK, but i do not like it because of what explained in point 1...
    Message was edited by:
            Miguel Costa

  • Sales order schedule date is a (working) day before Scheduled ship date

    In MRP/MPS planning, the forecast consumption is occuring for all sales orders at a date (sales order schedule date) which is always a working day before the Scheduled Ship Date (SSD). What is the logic?
    Time fences are not used.
    E.g. Sales order is scheduled to ship (SSD) on 30th Nov, in forecast set > Forecast items > Consumptiion > Detail, the sales order schedule date is a day before SSD.

    Hi,
    This is a complex issue; best solution is by using APO/GATP.
    If not, then in ERP only, the second best is:
    1) Work with assembly processing in SO, meaning that a production/planned order is automatically created in the customer order during order creation.
    2) Then, after the order is created it is scheduled, and the delivery date proposal is based on that.
    3) Now you can check in the order that there are no capacity overloads, and all capacity required to produce on the proposed date is available. If yes, you're done. If not, it gets a bit complex, since you actualy need to switch to capacity planning, do capacity leveling and dispatch (PP), and the you get a new feasible schedule proposal based on that.
    APO/GATP could do all that automatically!
    Regards,
    Mario

  • Sales Order Item Data & Sales Order Schedule Lines

    Hello,
    I have a Sales Orders cube which is pulling data from two DSOs (one for sales order item data and the other for sales order schedule data). The common fields between these two DSOs is the Sales Order number but in my cube I have dual entries for each Sales Order document (item and schedule info).
    Example of how the data looks now:
    <b>Sales Order . . Item Cat. . . Article . . . Net Price . . . Delivery . . .  Act GI Date</b>
    1. . . . . . . . . ...TAN. . . . . ABC123. . . .10  
    1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 . . . . . . . . 01/01/2000
    2. . . . . . . . . ...TAN. . . . . CBA321. . . .15  
    2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 . . . . . . . . 01/02/2000
    How do I merge the data on the Sales Order number in the cube so it looks like below?
    <b>Sales Order . . Item Cat. . . Article . . . Net Price . . . Delivery . . .  Act GI Date</b>
    1. . . . . . . . . ...TAN. . . . . ABC123. . . .10 . . . . . . . . . .1 . . . . . . . . 01/01/2000 
    2. . . . . . . . . ...TAN. . . . . CBA321. . . .15 . . . . . . . . . .2 . . . . . . . . 01/02/2000  
    Many thanks,
    Matt

    Hi Matt,
        Its no possible If you are maintaining data at Order Level.
    Try to introduce one more ODS/DSO in between ODS's and CUBE by keeping Sales Order only key field. Load data from both DSO's in required fields only. Then PUSH delta to CUBE. In this why you can maintain 1 record. Try to compress cube(with delete Zero Record Rows) to delete unnessasary records.
    Hope it Helps
    Srini

  • Data level Security issue in obiee 11g

    Hi,
    We are trying to implement data level security, let me explain the issue
    The requirement is, we have 7 schools and each school has one principle , there will be a Superdintent who has 3 schools under him. so now when each principle logs in to dashboard we have a prompt for school i.e Name of school in that prompt he should see only his school and even the data of that school only which are assigned to him, now when Superdintent logs in he should see all 3 schools in the prompt and data. I have gone through this link (http://www.rittmanmead.com/2012/03/obiee-11g-security-week-row-level-security/) but could not achieve.
    We are able to achieve by writing SQL in BMM layer ( LTS Table) so where ever the table is used in dashboards the security is being applied and we are able to see what we want. We want to achieve this by application role, But when we are creating session variables and applying on Application Role its not working. We want to achieve this by using Application role because suppose in other dashboards when the table is not used or pulled in, it will not work.But if we do it using application role its applies to all dashboards and data is resticted. so that when principle or Superdintent logs in automatically its restricts the data.
    Below is the SQL which we used in BMM LTS, its working fine. But when the same SQL is applied in Application Role it's not working.
    SQL used in session variable -
    select  'SCHOOL_CD1', school_cd1 from w_staff_d where empl_id ='VALUEOF(NQ_SESSION.USER)'
    and job_desc1 = 'Principal High School - KPI'
    Any suggestions please ??
    Thanks,
    VRP

    Hi,
    I pasted the log view below by applying SET VARIABLE LOGLEVEL=2, DISABLE_CACHE_HIT=1;, ran this report by applying SQL in Session variable. Let me know if you want anything -
    Thanks
    [OracleBIServerComponent] [TRACE:2] [USER-0] [] [ecid: c9928ce086f2ff4f:4405c138:13a559973e0:-8000-000000000000f7e9] [tid: 128c] [requestid: 5e40000b] [sessionid: 5e400000] [username: weblogic] ############################################## [[
    -------------------- SQL Request:
    SET VARIABLE QUERY_SRC_CD='Report',SAW_SRC_PATH='/shared/Key Performance Analytics/Analysis/Climate and Culture/Analysis for total school suspensions',LOGLEVEL=2, DISABLE_CACHE_HIT=1; SELECT s_0, s_1, s_2, s_3, s_4, s_5, s_6, s_7, s_8, s_9, s_10, s_11 FROM (
    SELECT
    0 s_0,
    "High School KPI"."- Date"."School Year" s_1,
    "High School KPI"."- Grade"."Grade Level" s_2,
    "High School KPI"."- School"."School Name" s_3,
    "High School KPI"."- School Suspensions"."% of Students Suspended" s_4,
    "High School KPI"."- School Suspensions"."Count of Students Enrolled" s_5,
    "High School KPI"."- School Suspensions"."Count of Students with Incidents" s_6,
    CASE WHEN (CASE WHEN MAX("High School KPI"."- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END +(CASE WHEN (CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END - CASE WHEN MIN("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 0 ELSE MIN("- School Suspensions"."% of Students Suspended" BY )END)=0 THEN CASE WHEN CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END <0 THEN (CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END *-1) ELSE CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END END ELSE (CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END - CASE WHEN MIN("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 0 ELSE MIN("- School Suspensions"."% of Students Suspended" BY )END) END /10))<0 THEN 1 ELSE 2 END s_7,
    CASE WHEN (CASE WHEN MAX("High School KPI"."- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END - CASE WHEN MIN("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 0 ELSE MIN("- School Suspensions"."% of Students Suspended" BY )END)=0 THEN CASE WHEN CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END <0 THEN (CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END *-1) ELSE CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END END ELSE (CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END - CASE WHEN MIN("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 0 ELSE MIN("- School Suspensions"."% of Students Suspended" BY )END) END s_8,
    CASE WHEN MAX("High School KPI"."- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END s_9,
    CASE WHEN MIN("High School KPI"."- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 0 ELSE MIN("- School Suspensions"."% of Students Suspended" BY ) END s_10,
    REPORT_AGGREGATE("High School KPI"."- School Suspensions"."% of Students Suspended" BY "High School KPI"."- Date"."School Year") s_11
    FROM "High School KPI"
    WHERE
    (("- Discipline Action"."Discipline Action Code" = 'Suspension') AND ("- Date"."School Year Desc" = VALUEOF("school_year_desc")))
    ) djm ORDER BY 1, 2 ASC NULLS LAST
    [2012-10-17T18:36:55.000+00:00] [OracleBIServerComponent] [TRACE:2] [USER-23] [] [ecid: c9928ce086f2ff4f:4405c138:13a559973e0:-8000-000000000000f7e9] [tid: 128c] [requestid: 5e40000b] [sessionid: 5e400000] [username: weblogic] -------------------- General Query Info: [[
    Repository: Star, Subject Area: High School KPI, Presentation: High School KPI
    [2012-10-17T18:36:55.000+00:00] [OracleBIServerComponent] [TRACE:2] [USER-18] [] [ecid: c9928ce086f2ff4f:4405c138:13a559973e0:-8000-000000000000f7e9] [tid: 128c] [requestid: 5e40000b] [sessionid: 5e400000] [username: weblogic] -------------------- Sending query to database named SPA (id: <<62064>>), connection pool named Initialization Block Connection Pool: [[
    WITH
    SAWITH0 AS (select T30351.SCHOOL_YEAR_DESC as c2,
    T26564.GRADE_LONG_DESC as c4,
    T26686.SCHOOL_NM as c5,
    T29835.STDNT_WID as c6,
    ROW_NUMBER() OVER (PARTITION BY T30351.SCHOOL_YEAR_DESC, T29835.STDNT_WID ORDER BY T30351.SCHOOL_YEAR_DESC DESC, T29835.STDNT_WID DESC) as c7
    from
    W_GRADE_LEVEL_D T26564 /* KPI_W_GRADE_LEVEL_D */ ,
    W_SCHOOL_YEAR_D T30351 /* KPI_W_SCHOOL_YEAR_D */ ,
    W_ORGANIZATION_D T26686 /* KPI_W_ORGANIZATION_D */ ,
    W_STDNT_ENROLL_SCHOOL_F T29835 /* KPI_W_STDNT_ENROLL_SCHOOL_F */
    where ( T26564.GRADE_LEVEL_WID = T29835.GRADE_LEVEL_WID and T26686.ORGANIZATION_WID = T29835.ORGANIZATION_WID and T29835.SCHOOL_YEAR_WID = T30351.SCHOOL_YEAR_WID and T30351.SCHOOL_YEAR_DESC = '2011-2012' and (T26564.GRADE_LONG_DESC in ('Grade 10', 'Grade 11', 'Grade 12', 'Grade 9')) and (T26686.SCHOOL_NM in ('Central Sr', 'Como Park Sr', 'Harding Sr', 'Highland Park Sr', 'Humboldt Secondary School', 'Johnson Sr', 'Washington Technology Secondary')) ) ),
    SAWITH1 AS (select count(distinct case D1.c7 when 1 then D1.c6 else NULL end ) as c1,
    D1.c2 as c2,
    count(distinct D1.c6) as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH0 D1
    group by D1.c2, D1.c4, D1.c5),
    SAWITH2 AS (select sum(D1.c1) over (partition by D1.c2) as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH1 D1),
    SAWITH3 AS (select T30647.SCHOOL_YEAR as c3,
    T26564.GRADE_LONG_DESC as c4,
    T26686.SCHOOL_NM as c5,
    T26023.STDNT_WID as c6,
    ROW_NUMBER() OVER (PARTITION BY T30647.SCHOOL_YEAR, T26023.STDNT_WID ORDER BY T30647.SCHOOL_YEAR DESC, T26023.STDNT_WID DESC) as c7
    from
    W_DISCIPLINE_ACTION_D T29975 /* KPI_W_DISCIPLINE_ACTION_D */ ,
    W_GRADE_LEVEL_D T26564 /* KPI_W_GRADE_LEVEL_D */ ,
    W_KPI_QTR_DAY_D T30647,
    W_ORGANIZATION_D T26686 /* KPI_W_ORGANIZATION_D */ ,
    W_STDNT_DISCIPLINE_F T26023 /* KPI_W_STDNT_DISCIPLINE_F */
    where ( T26023.DISCIPLINE_ACTION_WID = T29975.DISCIPLINE_ACTION_WID and T26023.ORGANIZATION_WID = T26686.ORGANIZATION_WID and T26023.DATE_WID = T30647.DATE_WID and T26023.GRADE_LEVEL_WID = T26564.GRADE_LEVEL_WID and T29975.DISCIPLINE_ACTION_CD = 'Suspension' and (T26564.GRADE_LONG_DESC in ('Grade 10', 'Grade 11', 'Grade 12', 'Grade 9')) and (T26686.SCHOOL_NM in ('Central Sr', 'Como Park Sr', 'Harding Sr', 'Highland Park Sr', 'Humboldt Secondary School', 'Johnson Sr', 'Washington Technology Secondary')) ) ),
    SAWITH4 AS (select count(distinct case D1.c7 when 1 then D1.c6 else NULL end ) as c1,
    count(distinct D1.c6) as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH3 D1
    group by D1.c3, D1.c4, D1.c5),
    SAWITH5 AS (select sum(D1.c1) over (partition by D1.c3) as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH4 D1)
    select distinct case when D1.c2 is not null then D1.c2 when D2.c3 is not null then D2.c3 end as c1,
    case when D1.c4 is not null then D1.c4 when D2.c4 is not null then D2.c4 end as c2,
    case when D1.c5 is not null then D1.c5 when D2.c5 is not null then D2.c5 end as c3,
    case when D1.c3 = 0 then NULL else D2.c2 * 100.0 / nullif( D1.c3, 0) end as c4,
    D1.c3 as c5,
    D2.c2 as c6
    from
    SAWITH2 D1,
    SAWITH5 D2
    where ( nvl(D1.c2 , '1') = nvl(D2.c3 , '1') and nvl(D1.c2 , '2') = nvl(D2.c3 , '2') and nvl(D1.c4 , '1') = nvl(D2.c4 , '1') and nvl(D1.c4 , '2') = nvl(D2.c4 , '2') and nvl(D1.c5 , '1') = nvl(D2.c5 , '1') and nvl(D1.c5 , '2') = nvl(D2.c5 , '2') )
    order by c1, c2, c3
    [2012-10-17T18:36:55.000+00:00] [OracleBIServerComponent] [TRACE:2] [USER-18] [] [ecid: c9928ce086f2ff4f:4405c138:13a559973e0:-8000-000000000000f7e9] [tid: 128c] [requestid: 5e40000b] [sessionid: 5e400000] [username: weblogic] -------------------- Sending query to database named SPA (id: <<62434>>), connection pool named Initialization Block Connection Pool: [[
    WITH
    SAWITH0 AS (select T30351.SCHOOL_YEAR_DESC as c2,
    T26564.GRADE_LONG_DESC as c4,
    T26686.SCHOOL_NM as c5,
    T29835.STDNT_WID as c6,
    ROW_NUMBER() OVER (PARTITION BY T30351.SCHOOL_YEAR_DESC, T29835.STDNT_WID ORDER BY T30351.SCHOOL_YEAR_DESC DESC, T29835.STDNT_WID DESC) as c7
    from
    W_GRADE_LEVEL_D T26564 /* KPI_W_GRADE_LEVEL_D */ ,
    W_SCHOOL_YEAR_D T30351 /* KPI_W_SCHOOL_YEAR_D */ ,
    W_ORGANIZATION_D T26686 /* KPI_W_ORGANIZATION_D */ ,
    W_STDNT_ENROLL_SCHOOL_F T29835 /* KPI_W_STDNT_ENROLL_SCHOOL_F */
    where ( T26564.GRADE_LEVEL_WID = T29835.GRADE_LEVEL_WID and T26686.ORGANIZATION_WID = T29835.ORGANIZATION_WID and T29835.SCHOOL_YEAR_WID = T30351.SCHOOL_YEAR_WID and T30351.SCHOOL_YEAR_DESC = '2011-2012' and (T26564.GRADE_LONG_DESC in ('Grade 10', 'Grade 11', 'Grade 12', 'Grade 9')) and (T26686.SCHOOL_NM in ('Central Sr', 'Como Park Sr', 'Harding Sr', 'Highland Park Sr', 'Humboldt Secondary School', 'Johnson Sr', 'Washington Technology Secondary')) ) ),
    SAWITH1 AS (select count(distinct case D1.c7 when 1 then D1.c6 else NULL end ) as c1,
    D1.c2 as c2,
    count(distinct D1.c6) as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH0 D1
    group by D1.c2, D1.c4, D1.c5),
    SAWITH2 AS (select sum(D1.c1) over (partition by D1.c2) as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH1 D1),
    SAWITH3 AS (select T30647.SCHOOL_YEAR as c3,
    T26564.GRADE_LONG_DESC as c4,
    T26686.SCHOOL_NM as c5,
    T26023.STDNT_WID as c6,
    ROW_NUMBER() OVER (PARTITION BY T30647.SCHOOL_YEAR, T26023.STDNT_WID ORDER BY T30647.SCHOOL_YEAR DESC, T26023.STDNT_WID DESC) as c7
    from
    W_DISCIPLINE_ACTION_D T29975 /* KPI_W_DISCIPLINE_ACTION_D */ ,
    W_GRADE_LEVEL_D T26564 /* KPI_W_GRADE_LEVEL_D */ ,
    W_KPI_QTR_DAY_D T30647,
    W_ORGANIZATION_D T26686 /* KPI_W_ORGANIZATION_D */ ,
    W_STDNT_DISCIPLINE_F T26023 /* KPI_W_STDNT_DISCIPLINE_F */
    where ( T26023.DISCIPLINE_ACTION_WID = T29975.DISCIPLINE_ACTION_WID and T26023.ORGANIZATION_WID = T26686.ORGANIZATION_WID and T26023.DATE_WID = T30647.DATE_WID and T26023.GRADE_LEVEL_WID = T26564.GRADE_LEVEL_WID and T29975.DISCIPLINE_ACTION_CD = 'Suspension' and (T26564.GRADE_LONG_DESC in ('Grade 10', 'Grade 11', 'Grade 12', 'Grade 9')) and (T26686.SCHOOL_NM in ('Central Sr', 'Como Park Sr', 'Harding Sr', 'Highland Park Sr', 'Humboldt Secondary School', 'Johnson Sr', 'Washington Technology Secondary')) ) ),
    SAWITH4 AS (select count(distinct case D1.c7 when 1 then D1.c6 else NULL end ) as c1,
    count(distinct D1.c6) as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH3 D1
    group by D1.c3, D1.c4, D1.c5),
    SAWITH5 AS (select sum(D1.c1) over (partition by D1.c3) as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH4 D1),
    SAWITH6 AS (select case when max(D1.c1) = 0 then NULL else max(D2.c1) * 100.0 / nullif( max(D1.c1), 0) end as c11,
    case when D1.c2 is not null then D1.c2 when D2.c3 is not null then D2.c3 end as c12
    from
    SAWITH2 D1,
    SAWITH5 D2
    where ( nvl(D1.c2 , '1') = nvl(D2.c3 , '1') and nvl(D1.c2 , '2') = nvl(D2.c3 , '2') and nvl(D1.c4 , '1') = nvl(D2.c4 , '1') and nvl(D1.c4 , '2') = nvl(D2.c4 , '2') and nvl(D1.c5 , '1') = nvl(D2.c5 , '1') and nvl(D1.c5 , '2') = nvl(D2.c5 , '2') )
    group by case when D1.c2 is not null then D1.c2 when D2.c3 is not null then D2.c3 end )
    select D2.c11 as c1,
    D2.c12 as c2
    from
    SAWITH6 D2
    order by c2
    Edited by: 965968 on Oct 17, 2012 11:49 AM

  • Planned order creation with PDS valid on only order start date and not finish date

    Hi All,
    We have requirement to allow creation of planned order manually if production version is valid on order start date and not finish date.  This is because lead time of order is longer. I refered OSS notes 385602. I could find out solution for this is implementation of OSS note 694140 to change validity mode at activity level to consider start date of first produce activity  in validity interval. Problem is even If I create order in APO by implementiong this note planned order is not transfered to ECC and it gets stuck with error production version not valid.
    Is there any way in ECC to control this? Any config or customization?
    Regards,
    Santosh

    Nilesh,
    I think there is a simple procedural skip happening in your business process. You are right when a planned order is created after MRP it would default assign it to the first available production version. 2options available for us,
    1. First use transaction MF50 and do the line loading and assign the quantites to the production versions/Production lines, so that the actual capacity planning is getting completed. This way you can have planned orders with both the production versions and matching to your actual line capacity.
    2. Use Quota arrangement concept, to automatically split the Planned orders during MRP for a percentage based on individual production versions.
    Now when backflush is performed S225 table is updated and Planned order qty also gets reduced.
    Hope this helps....
    Regards,
    Prasobh

Maybe you are looking for