Grouping to display null values for all the missing dates

Hi SAP,
I am trying to display '0.00' value for all the missing dates in my crystal reports as follows:
17-Jan-14     40.00
18-Jan-14       0.00
19-Jan-14       0.00
20-Jan-14     80.00
However, my crystal report is showing as follows:
17-Jan-14     40.00
18-Jan-14       0.00
19-Jan-14
20-Jan-14     80.00
The missing dates with no data are group together and my '0.00' value is not. Kindly advise me the solution. The formula is shown as per attached.
Thank you.
Regards.

Hi,
Thanks for your reply.
Fyi, I am using a formula field in crystal report to display "0.00" for days in between as follows:
whileprintingrecords;
if Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy') = "" then "" else "0.00"
There is another formula field in crystal report to display the missing dates in between as follows:
whileprintingrecords;
Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy')
Below is my report custom functions:
Function Days_Between (datefield as datetime, nextdatefield as datetime, format as string)
' This function is only used to display what data is missing within a specified date range...output type is text
dim thisdate as date
dim nextdate as date
dim output as string 'output is the text display
dim daysbetween as number
dim looptimes as number
looptimes = 0
daysbetween = 0
output = ""
thisdate = datevalue(datefield) + 1
nextdate = datevalue(nextdatefield)
if nextdate - thisdate > 1 then daysbetween = nextdate - thisdate else daysbetween = 1
do
if nextdate - thisdate > 1 _
then output = output + totext(thisdate, format) + chr(10) _
else _
if nextdate - thisdate > 0 _
then output = output + totext(thisdate, format)
looptimes = looptimes + 1
thisdate = thisdate + 1
loop until looptimes = daysbetween
    Days_Between = output
End Function
The issue arise when when there is more than one missing dates in between but the null values ("0.00") displayed is only for the first missing dates and not for all the missing dates.
Regards,
Ting Wei 

Similar Messages

  • How to create a single 'not null ' validation for all the items in a page ?

    Hi everyone ,
    how to create a single 'not null ' validation for all the items in a page ? I have many textfields . Instead of creating 'not null' validation for each item , I would like to create a a single validation control that will serve the purpose
    Thanks & Regards
    Umer

    Nice1 wrote:
    bob , as u said I have done the following :
    1) under create button , there are 9 items and for each item I have set Required to 'Yes'
    2) under delete button , there is 1 item and have set Required to 'Yes' for the item
    3) defined page validation for 9 items under 'create ' button and have set it to fire when 'create ' button clicked
    4) defined page validation for 1 item under 'delete ' button and have set it to fire when 'delete ' button clicked
    now , when I click 'create' button it even shows for the item under 'Delete ' button that it is a required itemSorry, I didn't see this note. The required template won't work, there is no way to attach it to the button.
    The best solution is as the reply a couple replies up
    Create 2 page type validations as a PL/SQL with code
    1st validation
    :P1_ITEM1 IS NOT NULL and :P1_ITEM2 IS NOT NULL ...... and :P1_ITEM9 IS NOT NULL  include all 9 items
    Set the When Button Pressed to the CREATE button
    2nd validation
    :P1_ITEM10 IS NOT NULL
    Set the When Button Pressed to the DELETE buttonI think that's going to be the easiest way to do it.
    Edited by: Bob37 on Apr 27, 2012 12:02 PM

  • Display Aggregated  numbers for all the weeks – Need immediate help

    Requirement is , Get the case count (#of Cases), and Case Worked (“ #of worked Case”) and Number of Solution (“# of Solutioin”) for the next 5 weeks base on selected week
    Case detail has in “Case Fact”, Worked details has in “ Activity fact”, Solution details has in “Solution Fact” all the three are join base “Case Dimension” and “Date Dimemsion”
    User will select Monday of the week, Case count should display for the selected week but Case worked and # of deliveries should display for next 5 weeks for the 1 weeks Cases.
    just notes..# Of Case count should stay same (sleeted week) but remaining thing need to calculate base on Cases selected on 1 week..
    Currently I am calculating selected week + 4 week to get data but # Cases also getting incremented but it need to stay 1 week total any help??
    Expected report output..
         Week1     Week2     Week3     Week4     Week5
    # Cases      10     10     10     10     10
    # Cases Worked 2     3     5     5     8
    # of Solution     0     1     2     3     6
    Thanks in Advance.

    I had the same problem the other day--my totals were listed, but all the other categories under "History" (Last Workout, Recent Workouts and Personal Best) were empty.
    I figured everything was lost, but decided to plug my nano back into my MacBook and let it mount in iTunes, then unmount it. I checked the History again. The first time, nothing changed. So I plugged and mounted again. The second time after unmounting, I navigated to the History menu, and suddenly the nano screen displayed a "Loading History" and it slowly loaded all my workouts. A few minutes later, all the History data was available again.
    Try that--plug and unplug several times, being sure to allow the nano to properly mount in iTunes before unmounting--to see if you can get the history to load.
    (One more thing to note--my nano is set to NOT automatically sync with iTunes, as I prefer to manually manage my music. I don't know if this will make a difference in the handling of workout data, but figured I should mention it here just in case.)

  • DCIteratorBinding setting the same value for all the rows.

    Hi all,
    I have table with on of the column as id. I have made the id column as the hyper link , that takes me to the next page. I am trying to pass the id to the next page. I am using the managed bean for the same. The below code is used to create the link on the column. It sets the action to the function in the bean that sets the id as of the current row.
    <tr:column sortProperty="id" sortable="false"
    headerText="#{bindings.notification.hints.id.label}"
    id="c4">
    <tr:commandLink action="choice" text="#{row.bindings.id.inputValue}"
    id="cl1" actionListener="#{IdBean.extractID}">
    </tr:commandLink>
    </tr:column>
    below is the IdBean.extratctID()
    public void extractID(ActionEvent actionEvent){       
    BindingContext bindingContext = BindingContext.getCurrent();
    BindingContainer bindings;
    bindings = bindingContext.getCurrentBindingsEntry();
    DCIteratorBinding iter;
    iter = (DCIteratorBinding) bindings.get("notificationIterator");
    Row rw;
    rw = iter.getCurrentRow();
    String id;
    id = (String) rw.getAttribute("id");
    this.setId2(id);
    I am printing the id value on to the next page. But its just returning the vslue of the id for the first row for all the rows of the table.
    Any inputs as in do i need to refresh the iterator or something like that.
    Reagrds
    Sishant

    Hi,
    Following is the code i have added in my bean
    ValueExpression expression = getFacesContext().getApplication().getExpressionFactory().createValueExpression(getFacesContext().getELContext(), "#{pageFlowScope.emp1}", Object.class);
    Object id = expression.getValue(getFacesContext().getELContext());
    public FacesContext getFacesContext() {
    return FacesContext.getCurrentInstance();
    JSPX Code -
    <af:commandImageLink id="DuncanAngove"
    icon="/john.gif" partialSubmit="true"
    actionListener="#{Tweets.setEmployeeId}">
    <af:setActionListener from="Duncan Angove" to="#{pageFlowScope.emp1}" />
    But i am getting NullPointerException. I have tried it with application and request scope as well.
    javax.servlet.ServletException
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NullPointerException
         at org.apache.myfaces.trinidad.component.UIXComponentBase.getValueExpression(UIXComponentBase.java:231)
         at project1.Tweets.setEmployeeId(Tweets.java:40)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1259)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:698)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         ... 35 more
    Thanks
    Sishant

  • Abap Code to Repeat the field (3nos) Values for all the fields

    Hi Friends I have a Requirement to merge the Data for One of my BI - BCS model.
    I have fields in one table(/BIC/AZDBBCP_040) <b>business Num , PRCTR, REGION  and RELOCAT</b>  and Field ZAUD_TYP and Audit Year Zyear also in same table.
    But I want to reapeat this information Highlighted in Bold for all the Zaudtyp and ZYEAR. Please help me with the Code
    <b>Problem as below</b>
            BUSNUM  PRCTR  REGION  RELOCAT   ZAUD_TYP  ZYEAR
              101     22    ALAN      MN           
              101                                                                                GT(ZAUD_TYP)        1999(ZYEAR)
    101                                      BTE         2001
    102          25          CA        SFO          
               102                           LTE         2008
    Please help me with any Code to fix the problem so that the data repeat for PRCTR  REGION  RELOCAT  where Bus Num is same.
    Kindly Get me any ABAB Code . Will really be thankful to you
    Regards
    Soniya Kapoor
    soniya kapoor
    Message was edited by:
            soniya kapoor

    Hi Soniya,
    You can use one of the following:
    IF SOURCE_FIELDS-DATETO =  ' '.
    RESULT = '20990101'.
    ENDIF.
    or
    IF SOURCE_FIELDS-DATETO IS INITIAL.
    RESULT = '20990101'.
    ENDIF.
    or
    IF SOURCE_FIELDS-DATETO = '00000000'.
    " THERE WAS A SPACE IN YOUR CODE.
    RESULT = '20990101'.
    ENDIF.
    Regards,
    Satya

  • Null value for int and datetime date type in xml schema

    hi:
    I am embarrassed by a qustion in xml schema; i defined a xml schema file like
    this:
    <elementFormDefault="qualified" attributeFormDefault="qualified">
    <xs:element name="test">
    <xs:annotation>
    <xs:documentation>Comment describing your root element</xs:documentation>
    </xs:annotation>
    <xs:complexType>
    <xs:sequence>
    <xs:element name="name" type="xs:string"/>
    <xs:element name="password" type="xs:string" nillable="true"/>
    <xs:element name="user" type="xs:int" nillable="true"/>
    <xs:element name="s_time" type="xs:dateTime"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    and I send this file to workflow clientrequest() node, I wanted to receive data
    in this schema file.but when i send null value to the element "user" and "s_time"
    in workshop test tool(test soap),and use function in xmlbean like isNilUser or
    isNilStime, one error occur.
    I don't kown why, I had to ask the engineer of bea in china, one told me a bug.
    is that true?

    Visakh16 I cant agree more with you on it, it is good but in production u cant have them change maxrows. I think
    Patrick  Hurst is a better option. debug the package have it running and move up
    Please mark as helpful and propose as answer if you find this as correct!!! Thanks,Dia Agha .
    Hmm..Why do you need to change it in production?
    What I suggested was to tweak the setting in dev machine so that it interprets the Excel file datatypes correctly when doing development. Once mapping is set correctly then it will work fine when in production or in any other environment. The tweaking is
    just to make sure it interprets the datatype correctly at design time and has nothing to do with production deployment 
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to giv diff varible values for all the queries in a Workbook?

    Hello BI Gurus,
              I have an issue with the variable in a the workbook,
    I have a workbook in which 4 queries are inserted in the same sheet one below the other and all these queries has same hierarchy variable (same technical name). In all these queries uses different hierarchies but same selection variable.
              Now the issue is , when I refresh the workbook the first queryu2019s variable pops up selection option for the hier variable and when I enter the value this first query runs fine but it carries the same value to another query and fails as the 2nd query uses diff hier.
    All I need is, is there any way by which these queries pop up selection screen separately for every query in workbook?
    Thanks a lot..! have a great day!

    Hi,
    You should open workbook settings and remove tick for display dubplicate veriables omly once.
    Regards,
    Veronika.

  • Null values passed into the servlet

    Hi all,
    I keep getting null values for all the params that I pass into the servlet i.e. sqltype, producttype, process, instance etc....I have attempted to print some of them out on the screen but I keep getting the 'NullPointerException' error message...can anyone tell me what it is that I have down wrong in the below code?
    If I run the servlet with method calls that have hardcoded arguments in them it works but not when I pass in the params from the URL...I am absolutley puzzled!
    Help!
    package blotter;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.Date;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import com.db.util.WriteToLogFile;
    import blotter.cache.*;
    Servlet to extract an object that has already been placed
    in the cache by GetBondPrices servlet from the cache.
    public class ExtractSecurityObject extends HttpServlet
         String sqlType = "";
         String productType = "";
         String instance = "";
         String process = "";
         String asOfDate = "";
         String currencyCode = "";
         String curveId = "";
         String results = "";
         private String debug;
    private PrintWriter out;
         private WriteToLogFile logFile;
         // called when servlet first initialised
         public void init(ServletConfig config) throws ServletException
              super.init(config);
         // method called for each get request
         public void doGet( HttpServletRequest request, HttpServletResponse response )
                   throws ServletException, IOException
              String toWrite = " ";
    // Get the object identifier from the parameters passed in
              sqlType = request.getParameter("sqltype");
    productType = request.getParameter("producttype").toUpperCase();
              instance = request.getParameter("instance");
              process = request.getParameter("process");
              asOfDate = request.getParameter("asofdate");
              curveId = request.getParameter("curveid");
              currencyCode = request.getParameter("ccy").toUpperCase();
              out.println(currencyCode);
              if ( request.getParameter("debug") !=null)
                   debug = request.getParameter("debug");
              else
                   debug ="";
              // set the mime type to html
    response.setContentType( "text/html" );
    out = response.getWriter();
    out.println("<HTML>");
              try
              // write some parameters to a log file
              toWrite = toWrite + "<li>" + getServletInfo() + " at " + new Date() + " " + sqlType + " " +
                        productType + " " + instance + " " + process + " " + asOfDate + " " + curveId + " " +
                        currencyCode;
         CachedObject o1 = (CachedObject)CacheManager.getCache("EB_" + currencyCode + productType + asOfDate);
    if(o1 == null){
              CacheSecurityObject cso = new CacheSecurityObject();
                   if((request.getParameter("sqltype") == null) && (request.getParameter("instance") != null)){
    results = (String)cso.putSecurityinCache(null, request.getParameter("producttype"), request.getParameter("instance"), request.getParameter("process"), request.getParameter("asOfDate"), request.getParameter("curveId"), request.getParameter("currencyCode"));
    //results = (String)cso.putSecurityinCache(null, "yc", "frafu", "official", "20011105", "baceod", "sek");
    out.println(results);
                   } else {
    //results = (String)cso.putSecurityinCache("bondtypes", "bond", null, "official", "20011105", "baceod", "eur");
    results = (String)cso.putSecurityinCache(request.getParameter("sqltype"), request.getParameter("producttype"), null, request.getParameter("process"), request.getParameter("asOfDate"), request.getParameter("curveId"), request.getParameter("currencyCode"));
    out.println(results);
              else{
                   out.println(((String)o1.object).toString());
    // general catch for all exceptions
              catch(Exception exception)
                   out.println( "Exception: The item that you requested was not found in the cache" + "<BR>" );
                   toWrite = toWrite + "Exception : " + exception.getMessage() + "\n" ;
              finally
    // write to logfile
              logFile = new WriteToLogFile();
              logFile.setSourceDirName("blotter");
              logFile.setQuery(request.getQueryString());
              logFile.setServletPath(request.getServletPath());
              if (toWrite!=null)
              logFile.writeLog(getServletInfo(),toWrite);
    out.println("</HTML>");
              out.close();
         // need the class name for log file
         public String getServletInfo()
         return this.getClass().getName();
    }

    That section of the code references a cache to extract an item that has been requested by the user. If the item is not in the cache i.e. if(o1 == null) then it will call a class that generates that object and places that object into the cache. The second time the user makes the same call then they will be handed a cached copy of that object which is aimed to make the whole servlet call faster.
    That section of the code works fine coz I have tested that separately. It is the reading in of the arguments that is causing the problem.

  • Need to display null values against table

    Hi All,
    I have one table in which I only need to display null values along with the rest of columns. for example
    ename sal date
    scott 2000 15/07/06
    Michal
    now my query should return---
    ename sal date
    michal
    hare krishna
    Alok

    Maybe it is something like this?:
    michaels>  select column_name || ' contains ' ||
           dbms_xmlgen.getxmltype ('select sum(nvl2(' || column_name || ',0,1)) c from ' || table_name ).extract ('//text()').getnumberval() ||
           ' NULL values' null_columns
      from cols
    where table_name = 'EMP'
       and dbms_xmlgen.getxmltype ('select sum(nvl2(' || column_name || ',0,1)) c from ' || table_name ).extract ('//text()').getnumberval() > 0
    NULL_COLUMNS                                                                               
    MGR contains 1 NULL values                                                                 
    COMM contains 10 NULL values  

  • KKAO is showing ZERO value for all orders

    Hello All Experts,
    I am running a WIP report for Production Order via KKAO. I am getting "ZERO" values for all the orders available in system. All my orders are "Release (REL) and in "Partial Delivered (PDLV) status still I am getting ZERO values.
    Please find below screen shot for reference :
    Can experts guide on this why I am getting ZERO values here ? Guidance will be very helpful.
    Thank you.
    Regards,
    Sharu.

    Hello Rajnessh Sir,
    Please find below screen shot :
    OKG9 -
    OKG3 -
    I am really not sure what to check here, I am new to WIP area. Experts please guide. Is above said settings correct ?
    Regards,
    Sharu.

  • How can I get null values for the later weeks

    Hi All,
    When I execute this code I get the records till current week.
    How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
    Thanks,
    Vikram
    DECLARE
       v_query VARCHAR2(4000);
       TYPE ref_cursor IS REF CURSOR;
       v_refcur ref_cursor;
       v_sum NUMBER;
       v_id NUMBER;
       v_name VARCHAR2(1000);
       v_weeknum NUMBER;
       v_pernum NUMBER;
       v_numOfWeeks NUMBER := 5;
    BEGIN
    v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                              FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
                          FROM s_postn) postn_tbl
                          WHERE lvl_6_id = 5767
                          AND fiscal_year = 2008
                          AND b.week_num < 4
                          AND b.period_num = 3
                          AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
                          GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                          ORDER BY  postn_tbl.postn_name, b.week_num';
    OPEN v_refcur FOR v_query;
    LOOP
       FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
       EXIT WHEN v_refcur%notfound;
       dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
    END LOOP;
    END;
    This is the output when I execute this code.
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W2 COMM CNTRL TAM 216 12561.4
    P3W3 COMM CNTRL TAM 216 2027.1
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    This is the output I'd like to get
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W4 COMM CNTRL ISAM 213
    P3W5 COMM CNTRL ISAM 213
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W4 COMM CNTRL ISAM 273
    P3W5 COMM CNTRL ISAM 273
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W4 COMM CNTRL TAM 213
    P3W5 COMM CNTRL TAM 213
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W4 COMM CNTRL TAM 273
    P3W5 COMM CNTRL TAM 273
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    P3W4 Damon Walters
    P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PM

    Sure, in a Single SQL ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>
    satyaki>-- Start Of Test Data --
    satyaki>with week_tab
      2  as
      3    (
      4      select 1 period_num, 1 week_num, 10 bkg1 from dual
      5      union all
      6      select 1, 2, 40 from dual
      7      union all
      8      select 1, 3, 30 from dual
      9      union all
    10      select 1, 2, 20 from dual
    11      union all
    12      select 1, 1, 10 from dual
    13      union all
    14      select 1, 1, 20 from dual
    15      union all
    16      select 1, 3, 10 from dual
    17      union all
    18      select 2, 1, 15 from dual
    19      union all
    20      select 2, 2, 20 from dual
    21      union all
    22      select 2, 3, 10 from dual
    23      union all
    24      select 2, 1, 15 from dual
    25      union all
    26      select 2, 2, 30 from dual
    27      union all
    28      select 2, 3, 20 from dual
    29    )
    30  -- End Of Test Data --
    31  select period_num,
    32         week_num,
    33         (
    34            select sum(week_tab.bkg1)
    35            from week_tab
    36            where period_num = m.period_num
    37            and   week_num   = m.week_num
    38            group by week_num, period_num
    39         ) sum_bkg1
    40  from (
    41        select dum.week_num,
    42              wk.period_num
    43        from (
    44                select 1 week_num from dual
    45                union all
    46                select 2 from dual
    47                union all
    48                select 3 from dual
    49                union all
    50                select 4 from dual
    51                union all
    52                select 5 from dual
    53              ) dum ,
    54              (
    55                select distinct period_num
    56                from week_tab
    57          ) wk
    58      ) m;
    PERIOD_NUM   WEEK_NUM   SUM_BKG1
             1          1         40
             1          2         60
             1          3         40
             1          4
             1          5
             2          1         30
             2          2         50
             2          3         30
             2          4
             2          5
    10 rows selected.
    Elapsed: 00:00:00.48
    satyaki>Regards.
    Satyaki De.

  • All the users can buy for all the purchasing groups?

    Hello,
    I have created the organizational structure as follows:
    (root level 1) Company O  50000758
        (root level 2) Plant    O  50000759
        (root level 2) Purchasing organization   O  50000760
              (root level 3) Purchasing group1        O  50000761
              (root level 3) Purchasing group2        O  50000762
              (root level 3) Purchasing group3        O  50000763
    The Plant and the Purchasing organization bellows to the Company
    The Purchasing group bellows to the Purchasing organization
    (level A) Position DATA-ENTRY1
    (level B) Central person (employee) DATA-ENTRY1
    (level C) User DATA-ENTRY1
    (level A) Position DATA-ENTRY2
    (level B) Central person (employee) DATA-ENTRY2
    (level C) User DATA-ENTRY2
    All the users can buy for all the purchasing groups
    At what level I have to assign the Positions (levelA)?
    Cheers,
    Marta

    Hello Subram,
    Thank you very much for your help.
    To shop on behalf, I have to fill the attribute REQUESTER at (level A) Position level.
    What I have to put in that attribute? The (root level 2) Purchasing organization O 50000760?
    I have a error when I put 50000760? ...."Object type XX not defined"
    Do you know how to help me?
    Cheers,
    Marta

  • How to avoid report running for all the values in roll up of guided naviga

    Hi
    Thanks in Advance
    I have 3 reports on three different pages of a dashboard. (Implemented guided navigation on one column of each report).When I click on value of guided navigation column it guides me to report 2 for that particular value (is prompted), same way for 3 report also till here it works fine.
    However when I return from report 3 to report 2 and 2 to 1, the reports are running for all the values instead for the value which was passed by guided navigation of previous report earlier (Value on which I clicked to pass to the next report).
    Edited by: 808623 on Nov 9, 2010 2:10 AM

    Yes
    Example : If i click on values 'X' in report 1
    Report 2 shows results for 'X' only. And if i click on Value say 'Y' in 2 then report 3 shows for only 'Y'. But when i rollup from 3 to 2, Report 2 is showing for all values rather than showing 'x'.
    I'm using Link or Image Dashboard Object > Destination>Request or Dashboard (path of previous report)
    Edited by: 808623 on Nov 9, 2010 2:37 AM

  • Column is summing up all the rows and displaying same value in all rows.

    Hi,
    Kindly see the below query. I have a problem in this query to fetch the abs_qty when the parameter P:item ie)msib.segment1 is not given as the input parameter. Its just summing up the entire quantity for all the items.When I pass P:item ie)msib.segment1 as input parameter, It fetches the exact value for abs_qty. Kindly help me to resolve this.
    Note only : Manufacturing plant ,Start date and End Date are Mandatory(required) parameters. Others like Item,Base Model and Planner code are optional.
    SELECT mmt.transaction_date date_produced, msib.segment1 item,
    cic.cost_type_id, msib.description item_description,
    mc.segment6 base_model, mc.segment7 trade_brand,
    mmt.subinventory_code subinventory,
    mil.segment1 || '.' || mil.segment2 || '.' || mil.segment3 LOCATOR,
    ood.organization_code
    || '-'
    || ood.organization_name manufacturing_plant,
    mmt.transaction_quantity quantity_produced,
    mtt.transaction_type_name transaction_type, msib.inventory_item_id,
    msib.organization_id, cic.material_cost COST,
    cic.material_overhead_cost freight, csc.standard_cost,
    *(select (NVL((SELECT SUM (mmt.transaction_quantity) total_NET_qty*
    FROM mtl_material_transactions mmt,
    mtl_system_items_b msib,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND mmt.organization_id = ood.organization_id
    AND mtt.transaction_type_name = 'WIP Completion'
    AND mts.transaction_source_type_name = 'Job or Schedule'
    AND msib.segment1 = NVL (:p_item, msib.segment1)
    AND ood.organization_code = :p_manufacturing_plant
    AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date
    AND :p_end_date ),0)
    *(NVL((SELECT SUM (mmt.transaction_quantity) total_NET_qty*
    FROM mtl_material_transactions mmt,
    mtl_system_items_b msib,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND mmt.organization_id = ood.organization_id
    AND mtt.transaction_type_name = 'WIP Issue'
    AND mts.transaction_source_type_name = 'Job or Schedule'
    AND msib.segment1 = NVL (:p_item, msib.segment1)
    AND ood.organization_code = :p_manufacturing_plant
    AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date
    AND :p_end_date
    *),0))) abs_qty from dual) AS ABS_qtyy,*(select (NVL((SELECT SUM (mmt.transaction_quantity) total_NET_qty
    FROM mtl_material_transactions mmt,
    mtl_system_items_b msib,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND mmt.organization_id = ood.organization_id
    AND mtt.transaction_type_name = 'WIP Completion'
    AND mts.transaction_source_type_name = 'Job or Schedule'
    AND msib.segment1 = NVL (:p_item, msib.segment1)
    AND ood.organization_code = :p_manufacturing_plant
    AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date
    AND :p_end_date ),0)
    (NVL((SELECT SUM (mmt.transaction_quantity) total_NET_qty
    FROM mtl_material_transactions mmt,
    mtl_system_items_b msib,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND mmt.organization_id = ood.organization_id
    AND mtt.transaction_type_name = 'WIP Issue'
    AND mts.transaction_source_type_name = 'Job or Schedule'
    AND msib.segment1 = NVL (:p_item, msib.segment1)
    AND ood.organization_code = :p_manufacturing_plant
    AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date
    AND :p_end_date
    ),0))) abs_qty from dual)*csc.standard_cost AS abs_val
    FROM mtl_material_transactions mmt,
    mtl_system_items_b msib,
    mtl_item_locations mil,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts,
    mtl_categories mc,
    mtl_item_categories mic,
    mtl_category_sets mcs,
    cst_item_costs cic,
    cst_standard_costs csc,
    cst_cost_types ct,
    mfg_lookups mlo
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.locator_id = mil.inventory_location_id
    AND mil.organization_id = msib.organization_id
    AND mil.subinventory_code = mmt.subinventory_code
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND msib.organization_id = ood.organization_id
    AND mic.category_set_id = mcs.category_set_id
    AND mc.category_id = mic.category_id
    AND mc.structure_id = mcs.structure_id
    AND mic.inventory_item_id = msib.inventory_item_id
    AND mic.organization_id = msib.organization_id
    AND mcs.category_set_id = 52487965
    AND msib.inventory_item_id = cic.inventory_item_id
    AND msib.organization_id = cic.organization_id
    AND ct.cost_type_id = cic.cost_type_id
    AND cic.organization_id = ood.organization_id
    AND mil.inventory_location_id = mmt.locator_id
    AND mmt.transaction_source_type_id = mtt.transaction_source_type_id
    AND mmt.transaction_action_id = mtt.transaction_action_id
    AND mmt.transaction_source_type_id = mts.transaction_source_type_id
    AND mmt.transaction_action_id = mlo.lookup_code
    AND mmt.inventory_item_id = csc.inventory_item_id
    AND mmt.organization_id = csc.organization_id
    AND csc.last_update_date >=
    (SELECT MAX (csc1.last_update_date)
    FROM cst_standard_costs csc1
    WHERE csc1.inventory_item_id = mmt.inventory_item_id
    AND csc1.organization_id = mmt.organization_id)
    AND msib.segment1 = NVL (:p_item, msib.segment1)
    AND NVL (mc.segment6, 'X') = NVL (:p_base_model, NVL (mc.segment6, 'X'))
    AND NVL (msib.planner_code, 'Y') =
    NVL (:p_planner_code, NVL (msib.planner_code, 'Y'))
    AND UPPER (mlo.meaning) = 'ASSEMBLY COMPLETION'
    AND mtt.transaction_type_name = 'WIP Completion'
    AND ct.cost_type = 'Frozen'
    AND mts.transaction_source_type_name = 'Job or Schedule'
    AND ood.organization_code = :p_manufacturing_plant
    AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date AND :p_end_date

    If <tt>abs_qty</tt> and consequently <tt>abs_val</tt> should not be the same for all rows returned, you'll have to rewrite your query so that the <tt>abs_qty</tt> won't be computed in isolation (separately) with no interaction with data from the main from table list.
    Your query is treated the same as the one below (note the changed table aliases by appending numbers to the originals of yours)
    SELECT mmt.transaction_date date_produced,
           msib.segment1 item,
           cic.cost_type_id,
           msib.description item_description,
           mc.segment6 base_model,
           mc.segment7 trade_brand,
           mmt.subinventory_code subinventory,
           mil.segment1 || '.' || mil.segment2 || '.' || mil.segment3 LOCATOR,
           ood.organization_code || '-' || ood.organization_name manufacturing_plant,
           mmt.transaction_quantity quantity_produced,
           mtt.transaction_type_name transaction_type,
           msib.inventory_item_id,
           msib.organization_id,
           cic.material_cost COST,
           cic.material_overhead_cost freight,
           csc.standard_cost,
           (select (NVL(
                        (SELECT SUM (mmt1.transaction_quantity) total_NET_qty
                           FROM mtl_material_transactions mmt1,
                                mtl_system_items_b msib1,
                                mtl_transaction_types mtt1,
                                org_organization_definitions ood1,
                                mtl_txn_source_types mts1
                          WHERE mmt1.organization_id = msib1.organization_id
                            AND msib1.inventory_item_id = mmt1.inventory_item_id
                            AND mmt1.transaction_type_id = mtt1.transaction_type_id
                            AND mmt1.organization_id = ood1.organization_id
                            AND mtt1.transaction_type_name = 'WIP Completion'
                            AND mts1.transaction_source_type_name = 'Job or Schedule'
                            AND msib1.segment1 = NVL (:p_item, msib1.segment1)
                            AND ood1.organization_code = :p_manufacturing_plant
                            AND TRUNC (mmt1.transaction_date) BETWEEN :p_start_date AND :p_end_date
                        ),0
                       ) - NVL(
                               (SELECT SUM (mmt2.transaction_quantity) total_NET_qty
                                  FROM mtl_material_transactions mmt2,
                                       mtl_system_items_b msib2,
                                       mtl_transaction_types mtt2,
                                       org_organization_definitions ood2,
                                       mtl_txn_source_types mts2
                                 WHERE mmt2.organization_id = msib2.organization_id
                                   AND msib2.inventory_item_id = mmt2.inventory_item_id
                                   AND mmt2.transaction_type_id = mtt2.transaction_type_id
                                   AND mmt2.organization_id = ood.2organization_id
                                   AND mtt2.transaction_type_name = 'WIP Issue'
                                   AND mts2.transaction_source_type_name = 'Job or Schedule'
                                   AND msib2.segment1 = NVL (:p_item, msib2.segment1)
                                   AND ood2.organization_code = :p_manufacturing_plant
                                   AND TRUNC (mmt.2transaction_date) BETWEEN :p_start_date AND :p_end_date
                               ),0
                   ) abs_qty
              from dual
           ) AS ABS_qtyy,
           (select (NVL(
                        (SELECT SUM (mmt3.transaction_quantity) total_NET_qty
                           FROM mtl_material_transactions mmt3,
                                mtl_system_items_b msib3,
                                mtl_transaction_types mtt3,
                                org_organization_definitions ood3,
                                mtl_txn_source_types mts3
                          WHERE mmt3.organization_id = msib3.organization_id
                            AND msib3.inventory_item_id = mmt3.inventory_item_id
                            AND mmt3.transaction_type_id = mtt3.transaction_type_id
                            AND mmt3.organization_id = ood3.organization_id
                            AND mtt3.transaction_type_name = 'WIP Completion'
                            AND mts3.transaction_source_type_name = 'Job or Schedule'
                            AND msib3.segment1 = NVL (:p_item, msib3.segment1)
                            AND ood3.organization_code = :p_manufacturing_plant
                            AND TRUNC (mmt3.transaction_date) BETWEEN :p_start_date AND :p_end_date
                        ),0
                       ) - NVL(
                               (SELECT SUM (mmt4.transaction_quantity) total_NET_qty
                                  FROM mtl_material_transactions mmt4,
                                       mtl_system_items_b msib4,
                                       mtl_transaction_types mtt4,
                                       org_organization_definitions ood4,
                                       mtl_txn_source_types mts4
                                 WHERE mmt4.organization_id = msib4.organization_id
                                   AND msib4.inventory_item_id = mmt4.inventory_item_id
                                   AND mmt4.transaction_type_id = mtt4.transaction_type_id
                                   AND mmt4.organization_id = ood4.organization_id
                                   AND mtt4.transaction_type_name = 'WIP Issue'
                                   AND mts4.transaction_source_type_name = 'Job or Schedule'
                                   AND msib4.segment1 = NVL (:p_item, msib4.segment1)
                                   AND ood4.organization_code = :p_manufacturing_plant
                                   AND TRUNC (mmt4.transaction_date) BETWEEN :p_start_date AND :p_end_date
                               ),0
                   ) abs_qty
              from dual
           ) * csc.standard_cost AS abs_val
      FROM mtl_material_transactions mmt,
           mtl_system_items_b msib,
           mtl_item_locations mil,
           mtl_transaction_types mtt,
           org_organization_definitions ood,
           mtl_txn_source_types mts,
           mtl_categories mc,
           mtl_item_categories mic,
           mtl_category_sets mcs,
           cst_item_costs cic,
           cst_standard_costs csc,
           cst_cost_types ct,
           mfg_lookups mlo
    WHERE mmt.organization_id = msib.organization_id
       AND msib.inventory_item_id = mmt.inventory_item_id
       AND mmt.locator_id = mil.inventory_location_id
       AND mil.organization_id = msib.organization_id
       AND mil.subinventory_code = mmt.subinventory_code
       AND mmt.transaction_type_id = mtt.transaction_type_id
       AND msib.organization_id = ood.organization_id
       AND mic.category_set_id = mcs.category_set_id
       AND mc.category_id = mic.category_id
       AND mc.structure_id = mcs.structure_id
       AND mic.inventory_item_id = msib.inventory_item_id
       AND mic.organization_id = msib.organization_id
       AND mcs.category_set_id = 52487965
       AND msib.inventory_item_id = cic.inventory_item_id
       AND msib.organization_id = cic.organization_id
       AND ct.cost_type_id = cic.cost_type_id
       AND cic.organization_id = ood.organization_id
       AND mil.inventory_location_id = mmt.locator_id
       AND mmt.transaction_source_type_id = mtt.transaction_source_type_id
       AND mmt.transaction_action_id = mtt.transaction_action_id
       AND mmt.transaction_source_type_id = mts.transaction_source_type_id
       AND mmt.transaction_action_id = mlo.lookup_code
       AND mmt.inventory_item_id = csc.inventory_item_id
       AND mmt.organization_id = csc.organization_id
       AND csc.last_update_date >= (SELECT MAX (csc1.last_update_date)
                                      FROM cst_standard_costs csc1
                                     WHERE csc1.inventory_item_id = mmt.inventory_item_id
                                       AND csc1.organization_id = mmt.organization_id
       AND msib.segment1 = NVL (:p_item, msib.segment1)
       AND NVL (mc.segment6, 'X') = NVL (:p_base_model, NVL (mc.segment6, 'X'))
       AND NVL (msib.planner_code, 'Y') = NVL (:p_planner_code, NVL (msib.planner_code, 'Y'))
       AND UPPER (mlo.meaning) = 'ASSEMBLY COMPLETION'
       AND mtt.transaction_type_name = 'WIP Completion'
       AND ct.cost_type = 'Frozen'
       AND mts.transaction_source_type_name = 'Job or Schedule'
       AND ood.organization_code = :p_manufacturing_plant
       AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date AND :p_end_dateRegards
    Etbin

  • [svn:osmf:] 15983: Updating VideoQoSPluginMetadataSynthesizer to create comma separated string values for all of the available keys .

    Revision: 15983
    Revision: 15983
    Author:   [email protected]
    Date:     2010-05-10 04:47:46 -0700 (Mon, 10 May 2010)
    Log Message:
    Updating VideoQoSPluginMetadataSynthesizer to create comma separated string values for all of the available keys.
    Modified Paths:
        osmf/trunk/apps/samples/plugins/VideoQoSPlugin/src/org/osmf/qos/VideoQoSPluginMetadataSyn thesizer.as

    Rob:
    "but the sad thing is, that managers will most likely respond with a "This used to be fast in MSSQL, but now it isn't any more in Oracle. Oracle is so slow ...""
    On the bright side, it sounds like most of the database calls are implemented as stored procedures, so there is an opportunity to do it right (in Oracle terms) in the stored procedures.
    I did a similar conversion a while back, converting bad SQLServer procedures to good Oracle procedures. Everyone said "Oracle is much faster that SQLServer"
    John

Maybe you are looking for

  • Would you like to save changes.. no changes to save

    hi guys, I currently have a master detail relationship but i have a problem. When a query is entered in my master block it automatically queries the detail block, this is fine, however , if i then want to enter a new query, thus entering query mode i

  • N8: I cannot believe it! Will we face same scenari...

    N8: I cannot believe it! Will we face same scenario of N97?!!! Actually I'm observing what's going on since the first launch of N8 because the handset is still not available in my country so far. What really drives me crazy is that I see again the wo

  • Copy custom package between local IPS repositories

    I seem to be having a problem copying a custom package from one local IPS repository to another. Both repositories are on the same server, but are set with different publisher names. I used the pkgrecv command like so, to copy the package: pkgrecv -s

  • Having trouble importing iPhoto library

    OK, I'll word this the best I can. I have a MacBook air with 250g of memory. It recently warned me my memory was low. After checking, I saw there was 160+g of 'other'. I bought an external hd and backed everything up, then restored it to factor. I th

  • How to filter by attributes with type Strings

    The documentation is not really detailed about setting attributes with type Strings. I assume I've to type each string value in a new line in the set attributes dialog box. This works fine and my XML looks like this<br /><br /><para CMS = "prodA prod