Problem in date functions

Using:
Jdev 11.1.1.5.0-adfbc
problem description:
problem in function not properly working
Resource:
this is my vo query which is based on one eo
SELECT LegalDocDetailsEO.LDD_BE,
       LegalDocDetailsEO.LDD_UNIT,
       LegalDocDetailsEO.LDD_SUPLR_ID,
       LegalDocDetailsEO.LDD_CUST_ID,
       LegalDocDetailsEO.LDD_EMP_ID,
       LegalDocDetailsEO.LDD_DOC_ID,
       LegalDocDetailsEO.LDD_DOC_NO,
       LegalDocDetailsEO.LDD_ISSUED_AT,
       LegalDocDetailsEO.LDD_ISSUED_ON,
       LegalDocDetailsEO.LDD_VALID_FRQ,
       LegalDocDetailsEO.LDD_VALID_DUR,
(case when LDD_VALID_FRQ='D'  then LDD_ISSUED_ON +  LDD_VALID_DUR                       //D-Date
      when LDD_VALID_FRQ='M'   then add_months(LDD_ISSUED_ON,LDD_VALID_DUR)        //M -Month  //Y-Year
      else add_months(LDD_ISSUED_ON,LDD_VALID_DUR*12)
end ) as  LDD_EXP_ON,
       LegalDocDetailsEO.LDD_STATUS,
       LegalDocDetailsEO.LDD_SL_FLG,
       LegalDocDetailsEO.LDD_VEHICLE_ID,
       LegalDocDetailsEO.LDD_BFCRY_TYPE,
       LegalDocDetailsEO.LDD_EMPDEPNT_NO,
       LegalDocDetailsEO.LDD_ASSET_ID,
       LegalDocDetailsEO.LDD_PROD_UNIT,
       LegalDocDetailsEO.LDD_PROD_ID,
       LegalDocDetailsEO.LDD_PROD_REV,
       LegalDocDetailsEO.LDD_CRE_BY,
       LegalDocDetailsEO.LDD_CRE_DATE,
       LegalDocDetailsEO.LDD_UPD_BY,
       LegalDocDetailsEO.LDD_UPD_DATE,
       LegalDocDetailsEO.ROWID
FROM LEGAL_DOC_DETAILS LegalDocDetailsEO
WHERE LegalDocDetailsEO.LDD_BE = :pbuthis vo exposed as af:table
<af:panelBox
                       binding="#{backingBeanScope.cfg0060.pb18}" id="pb18"
                       showDisclosure="false">
            <f:facet name="toolbar">
              <af:group binding="#{backingBeanScope.cfg0060.g6}" id="g6">
                <af:toolbar binding="#{backingBeanScope.cfg0060.t19}" id="t19">
                  <af:commandToolbarButton actionListener="#{bindings.CreateInsert13.execute}"
                                           text="Insert"
                                           disabled="#{!bindings.CreateInsert13.enabled}"
                                           binding="#{backingBeanScope.cfg0060.ctb90}"
                                           id="ctb90"/>
                  <af:commandToolbarButton
                                           text="Save"
                                           binding="#{backingBeanScope.cfg0060.ctb91}"
                                           id="ctb91"
                                           action="#{backingBeanScope.cfg0060.*ctb91_action2*}"
                                           partialTriggers="pc5:t18"/>
                  <af:commandToolbarButton text="Clear"
                                           binding="#{backingBeanScope.cfg0060.ctb92}"
                                           id="ctb92" icon="/icons/clear.png"/>
                 <af:commandToolbarButton text="Rollback"
                                           binding="#{backingBeanScope.cfg0060.ctb94}"
                                           id="ctb94"
                                         icon="/icons/rollback.png"/>
                  <af:commandToolbarButton text="Additional Details"
                                           binding="#{backingBeanScope.cfg0060.ctb95}"
                                           id="ctb95"/>
                  <af:commandToolbarButton text="Activate"
                                           binding="#{backingBeanScope.cfg0060.ctb96}"
                                           id="ctb96"
                                           icon="/icons/confirm.png"/>
                </af:toolbar>
              </af:group>
            </f:facet>
            <af:panelCollection binding="#{backingBeanScope.cfg0060.pc5}"
                                id="pc5" styleClass="AFStretchWidth">
              <f:facet name="menus"/>
              <f:facet name="toolbar"/>
              <f:facet name="statusbar"/>
              <af:table value="#{bindings.LegalDocDetails1VO2.collectionModel}"
                        var="row"
                        rows="#{bindings.LegalDocDetails1VO2.rangeSize}"
                        emptyText="#{bindings.LegalDocDetails1VO2.viewable ? 'No data to display.' : 'Access Denied.'}"
                        fetchSize="#{bindings.LegalDocDetails1VO2.rangeSize}"
                        rowBandingInterval="0"
                        filterModel="#{bindings.LegalDocDetails1VO2Query.queryDescriptor}"
                        queryListener="#{bindings.LegalDocDetails1VO2Query.processQuery}"
                        filterVisible="true" varStatus="vs"
                        selectedRowKeys="#{bindings.LegalDocDetails1VO2.collectionModel.selectedRow}"
                        selectionListener="#{bindings.LegalDocDetails1VO2.collectionModel.makeCurrent}"
                        rowSelection="single"
                        binding="#{backingBeanScope.cfg0060.t18}" id="t18"
                        partialTriggers=":::ctb90">
                <af:column sortProperty="LddDocId" filterable="true"
                           sortable="true"
                           headerText="#{bindings.LegalDocDetails1VO2.hints.LddDocId.label}"
                           id="c19">
                  <af:inputText value="#{row.bindings.LddDocId.inputValue}"
                                label="#{bindings.LegalDocDetails1VO2.hints.LddDocId.label}"
                                required="#{bindings.LegalDocDetails1VO2.hints.LddDocId.mandatory}"
                                columns="#{bindings.LegalDocDetails1VO2.hints.LddDocId.displayWidth}"
                                maximumLength="#{bindings.LegalDocDetails1VO2.hints.LddDocId.precision}"
                                shortDesc="#{bindings.LegalDocDetails1VO2.hints.LddDocId.tooltip}"
                                id="it144">
                    <f:validator binding="#{row.bindings.LddDocId.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="LdDocIdDesc" filterable="true"
                           sortable="true"
                           headerText="#{bindings.LegalDocDetails1VO2.hints.LdDocIdDesc.label}"
                           id="c22">
                  <af:inputText value="#{row.bindings.LdDocIdDesc.inputValue}"
                                label="#{bindings.LegalDocDetails1VO2.hints.LdDocIdDesc.label}"
                                required="#{bindings.LegalDocDetails1VO2.hints.LdDocIdDesc.mandatory}"
                                columns="#{bindings.LegalDocDetails1VO2.hints.LdDocIdDesc.displayWidth}"
                                maximumLength="#{bindings.LegalDocDetails1VO2.hints.LdDocIdDesc.precision}"
                                shortDesc="#{bindings.LegalDocDetails1VO2.hints.LdDocIdDesc.tooltip}"
                                id="it145">
                    <f:validator binding="#{row.bindings.LdDocIdDesc.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="LddDocNo" filterable="true"
                           sortable="true"
                           headerText="#{bindings.LegalDocDetails1VO2.hints.LddDocNo.label}"
                           id="c21">
                  <af:inputText value="#{row.bindings.LddDocNo.inputValue}"
                                label="#{bindings.LegalDocDetails1VO2.hints.LddDocNo.label}"
                                required="#{bindings.LegalDocDetails1VO2.hints.LddDocNo.mandatory}"
                                columns="#{bindings.LegalDocDetails1VO2.hints.LddDocNo.displayWidth}"
                                maximumLength="#{bindings.LegalDocDetails1VO2.hints.LddDocNo.precision}"
                                shortDesc="#{bindings.LegalDocDetails1VO2.hints.LddDocNo.tooltip}"
                                id="it146">
                    <f:validator binding="#{row.bindings.LddDocNo.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="LddIssuedAt" filterable="true"
                           sortable="true"
                           headerText="#{bindings.LegalDocDetails1VO2.hints.LddIssuedAt.label}"
                           id="c15">
                  <af:inputText value="#{row.bindings.LddIssuedAt.inputValue}"
                                label="#{bindings.LegalDocDetails1VO2.hints.LddIssuedAt.label}"
                                required="#{bindings.LegalDocDetails1VO2.hints.LddIssuedAt.mandatory}"
                                columns="#{bindings.LegalDocDetails1VO2.hints.LddIssuedAt.displayWidth}"
                                maximumLength="#{bindings.LegalDocDetails1VO2.hints.LddIssuedAt.precision}"
                                shortDesc="#{bindings.LegalDocDetails1VO2.hints.LddIssuedAt.tooltip}"
                                id="it147">
                    <f:validator binding="#{row.bindings.LddIssuedAt.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="LddIssuedOn" filterable="true"
                           sortable="true"
                           headerText="#{bindings.LegalDocDetails1VO2.hints.LddIssuedOn.label}"
                           id="c17">
                  <f:facet name="filter">
                    <af:inputDate value="#{vs.filterCriteria.LddIssuedOn}"
                                  binding="#{backingBeanScope.cfg0060.id7}"
                                  id="id7"/>
                  </f:facet>
                  <af:inputDate value="#{row.bindings.LddIssuedOn.inputValue}"
                                label="#{bindings.LegalDocDetails1VO2.hints.LddIssuedOn.label}"
                                required="#{bindings.LegalDocDetails1VO2.hints.LddIssuedOn.mandatory}"
                                shortDesc="#{bindings.LegalDocDetails1VO2.hints.LddIssuedOn.tooltip}"
                                id="id10">
                    <f:validator binding="#{row.bindings.LddIssuedOn.validator}"/>
                    <af:convertDateTime pattern="#{bindings.LegalDocDetails1VO2.hints.LddIssuedOn.format}"/>
                  </af:inputDate>
                </af:column>
                <af:column sortProperty="LddValidFrq" filterable="true"
                           sortable="true"
                           headerText="#{bindings.LegalDocDetails1VO2.hints.LddValidFrq.label}"
                           id="c20">
                  <af:selectOneChoice value="#{row.bindings.LddValidFrq.inputValue}"
                                      label="#{row.bindings.LddValidFrq.label}"
                                      required="#{bindings.LegalDocDetails1VO2.hints.LddValidFrq.mandatory}"
                                      shortDesc="#{bindings.LegalDocDetails1VO2.hints.LddValidFrq.tooltip}"
                                      id="soc12" autoSubmit="true">
                    <f:selectItems value="#{row.bindings.LddValidFrq.items}"
                                   id="si13"/>
                  </af:selectOneChoice>
                </af:column>
                <af:column sortProperty="LddValidDur" filterable="true"
                           sortable="true"
                           headerText="#{bindings.LegalDocDetails1VO2.hints.LddValidDur.label}"
                           id="c18">
                  <af:inputText value="#{row.bindings.LddValidDur.inputValue}"
                                label="#{bindings.LegalDocDetails1VO2.hints.LddValidDur.label}"
                                required="#{bindings.LegalDocDetails1VO2.hints.LddValidDur.mandatory}"
                                columns="#{bindings.LegalDocDetails1VO2.hints.LddValidDur.displayWidth}"
                                maximumLength="#{bindings.LegalDocDetails1VO2.hints.LddValidDur.precision}"
                                shortDesc="#{bindings.LegalDocDetails1VO2.hints.LddValidDur.tooltip}"
                                id="it148" autoSubmit="true"
                                partialTriggers="soc12">
                    <f:validator binding="#{row.bindings.LddValidDur.validator}"/>
                    <af:convertNumber groupingUsed="false"
                                      pattern="#{bindings.LegalDocDetails1VO2.hints.LddValidDur.format}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="LddExpOn" filterable="true"
                           sortable="true"
                           headerText="#{bindings.LegalDocDetails1VO2.hints.LddExpOn.label}"
                           id="c16">
                  <f:facet name="filter">
                    <af:inputDate value="#{vs.filterCriteria.LddExpOn}"
                                  binding="#{backingBeanScope.cfg0060.id8}"
                                  id="id8"/>
                  </f:facet>
                  <af:inputDate value="#{row.bindings.LddExpOn.inputValue}"
                                label="#{bindings.LegalDocDetails1VO2.hints.LddExpOn.label}"
                                required="#{bindings.LegalDocDetails1VO2.hints.LddExpOn.mandatory}"
                                shortDesc="#{bindings.LegalDocDetails1VO2.hints.LddExpOn.tooltip}"
                                id="id9" partialTriggers="it148">
                    <f:validator binding="#{row.bindings.LddExpOn.validator}"/>
                    <af:convertDateTime pattern="#{bindings.LegalDocDetails1VO2.hints.LddExpOn.format}"/>
                  </af:inputDate>
                </af:column>
                <af:column sortProperty="LddStatus" filterable="true"
                           sortable="true"
                           headerText="#{bindings.LegalDocDetails1VO2.hints.LddStatus.label}"
                           id="c14">
                  <af:selectOneChoice value="#{row.bindings.LddStatus.inputValue}"
                                      label="#{row.bindings.LddStatus.label}"
                                      required="#{bindings.LegalDocDetails1VO2.hints.LddStatus.mandatory}"
                                      shortDesc="#{bindings.LegalDocDetails1VO2.hints.LddStatus.tooltip}"
                                      id="soc13">
                    <f:selectItems value="#{row.bindings.LddStatus.items}"
                                   id="si12"/>
                  </af:selectOneChoice>
                </af:column>
              </af:table>
            </af:panelCollection>
          </af:panelBox>
    public String ctb91_action2() {
        BindingContainer bindings = getBindings();
        DCIteratorBinding dciter2;
        dciter2 = (DCIteratorBinding) bindings.get("LegalDocDetails1VO2Iterator");
        ViewObject vo2 = dciter2.getViewObject();
        vo2.clearCache();
        vo2.executeQuery();
        //dciter2.executeQuery();
        OperationBinding operationBinding = bindings.getOperationBinding("Commit");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        return null;
    }this is my save button code.
while pressing save button date,month,year increment operation takes place.
i did like this:
date issued : 3/10/1999
validtiy type : months /days /years in select one choice
validty time : 1 if i give 1 means
date expires on : *4*/10/1999 it should be generates by pressing save button.
by my issues:
first time pressing button
date expires on : *23*/10/1999 wrongly generated. each every first time default adding 10 to date. i dont have default value. why it's happening
eventhough used clearcache. but it's not perforing correctly in first time
by second time or third time... n tmes means
date expires on : *4*/10/1999 it correctly generating.
see pics.
inputdate: 2/18/2012:
wrongly generating : http://imageshack.us/photo/my-images/210/testttt.png/ in this pics see expires on : 2/28/2012
correctly generating : http://imageshack.us/photo/my-images/341/testtsds.png/ in this pics see expires on : 2/20/2012
i followed one of my thread: JDeveloper and ADF
Edited by: subu123 on Feb 24, 2012 6:27 AM

thank you sir. for visting my thread. i understood. how can i over come that?
SELECT LegalDocDetailsEO.LDD_BE,
       LegalDocDetailsEO.LDD_UNIT,
       LegalDocDetailsEO.LDD_SUPLR_ID,
       LegalDocDetailsEO.LDD_CUST_ID,
       LegalDocDetailsEO.LDD_EMP_ID,
       LegalDocDetailsEO.LDD_DOC_ID,
       LegalDocDetailsEO.LDD_DOC_NO,
       LegalDocDetailsEO.LDD_ISSUED_AT,
       LegalDocDetailsEO.LDD_ISSUED_ON,
       LegalDocDetailsEO.LDD_VALID_FRQ,
       LegalDocDetailsEO.LDD_VALID_DUR,
(case when LDD_VALID_FRQ='D'  then LDD_ISSUED_ON +  LDD_VALID_DUR                       //D-Date
      when LDD_VALID_FRQ='M'   then add_months(LDD_ISSUED_ON,LDD_VALID_DUR)        //M -Month  //Y-Year
      else add_months(LDD_ISSUED_ON,LDD_VALID_DUR*12)
end ) as  LDD_EXP_ON,
       LegalDocDetailsEO.LDD_STATUS,
       LegalDocDetailsEO.LDD_SL_FLG,
       LegalDocDetailsEO.LDD_VEHICLE_ID,
       LegalDocDetailsEO.LDD_BFCRY_TYPE,
       LegalDocDetailsEO.LDD_EMPDEPNT_NO,
       LegalDocDetailsEO.LDD_ASSET_ID,
       LegalDocDetailsEO.LDD_PROD_UNIT,
       LegalDocDetailsEO.LDD_PROD_ID,
       LegalDocDetailsEO.LDD_PROD_REV,
       LegalDocDetailsEO.LDD_CRE_BY,
       LegalDocDetailsEO.LDD_CRE_DATE,
       LegalDocDetailsEO.LDD_UPD_BY,
       LegalDocDetailsEO.LDD_UPD_DATE,
       LegalDocDetailsEO.ROWID
FROM LEGAL_DOC_DETAILS LegalDocDetailsEO
WHERE LegalDocDetailsEO.LDD_BE = :pbui want to excute this vo. by pressing button. so only wrote like that.
why am going excutes means?
if am entering date and choosing select one choice means. by pressing button the button excutes vo and prorbably i get my output.
is there any other way??? to attain my target..
Edited by: subu123 on Mar 8, 2012 7:45 AM

Similar Messages

  • Problem regarding data function 'SUMGT' (Overall Result) in BEx query desig

    Hi,
    I have created one query where I want to see the inventory data month wise. That's why at first I have placed 0calmonth (with variable) in column, secondly kept all the key figures which I want to see month wise under one structure, then placed the structure under 0calmonth in column. Now in that structure I have one key figure like 'total stock' and another global calculated key figure '% of total inventory' (='total stock' <b>%A</b> <b>SUMGT</b> 'total stock').
    Now the problem is when ever I'm giving the value of month from 02.2006 to 05.2006, it is calculating the value of '% of total inventory' for every month with respect to the overall result of 'total stock' for month 05.2006. 
    But I want to calculate the value of '% of total inventory' for each month with respect to the overall result of 'total stock' for corresponding month.
    Please suggest what I'll do now.
    Thanks,
    Arijit.

    Hi,
    now i got whats the issue is.
    Check aggregation properties of 'total stock'(RSD1>provide tech name of total stock>display-->aggragation tab)...
    Exception aggregation would have been set to <b>'Last Value'</b> with some time char as aggregation ref characteristic..
    That is the reason why  SUMGT (or %SUMGT) is calculating on Last value of the 0calmonth interval.
    i.e if you provide 02.2006 to 07.2006, %of total inventory for every month would be with respect to value of 07.2006...
    Hope this helps...
    Dont forget to reward if it helps!
    thanks
    Message was edited by: Murali

  • SQL Date Function

    Hi
    I have problem regarding date function in the following statment and unable to sort out the real cause as yet, i am not finding any materail for using date function in sql where clause any one can help me why is it.
    Sector Table
    Sect_Id Varchar2(2),
    Sect_name Varchar2(100),
    Wef Date
    :Adate--->Forms Field ,Datatype --->Char(11)
    Trigger Post-Query <Block Level>
    BEGIN
    SELECT SECT_NAME INTO :SECTORNAME FROM SECTOR     
    WHERE SECT_ID=:SECTOR
    AND TO_DATE(WEF,'MON-YYYY')=TO_DATE(:ADATE,'MON-YYYY');
    EXCEPTION WHEN NO_DATA_FOUND THEN
    MESSAGE ('DEFINE SECTOR SETUP...');
    MESSAGE ('DEFINE SECTOR SETUP...');
    END;
    FRM-40735: POST-QUERY trigger raised unhandled exception ORA-01843.
    Any help in this regard.
    Thanks in advance

    TO_DATE converts from a character string such as '2004-11-24' into an Oracle DATE. If you pass it an Oracle DATE, it first converts it to a character string using the default date format, then converts that back into a date. This is not only inefficient but unsafe, since the default date format can change, breaking your code.
    TO_CHAR converts from various datatypes into a VARCHAR2 string. When converting from an Oracle DATE, it can provide the output in a variety of formats.
    It's worth bookmarking the Oracle Documentation Library:
    10g: download-west.oracle.com/docs/cd/B14117_01/nav/portal_3.htm
    9i: otn.oracle.com/pls/db92/db92.docindex
    TO_DATE(WEF,'DD-MON-YYYY')=TO_DATE(:ADATE,'YYYY-MM-DD');WEF is already a date. If you want to remove any time portion, use TRUNC(wef).

  • Hi! pls help date functions

    hi! i have problem in date functions in java!
    1. if i give input date format is dd/mm/yyyyy (or) yyyy/mm/dd (or) mm/dd/yyyy?
    the result must be display dd/mm/yyyy only?
    pls help me!
    thanks and regadrs
    senthilraj

    http://www.javaalmanac.com/egs/java.text/FormatDate.html
    http://www.javaalmanac.com/egs/java.text/ParseDate.html

  • Problem overloading "set data" function on Button DataGrid Renderer

    Hi all, I'm hoping this is something simple.
    I have a class that extends mx.controls.Button and implements mx.core.IDataRenderer.  I need to set the button icon whenever the Data property is set from the DataGrid.  My problem is that my overloaded set/get Data function are never called (I've stepped through the code in debug).  Instead the set/get functions in Container.as (Flex 3.4 SDK) get called.
    Here's the basics code:
    exportButtonRenderer.as
    package controls
        import flash.events.Event;
        import flash.events.MouseEvent;
        import mx.controls.Button;   
        import mx.core.IDataRenderer;
        import mx.controls.dataGridClasses.DataGridListData;   
        import mx.controls.listClasses.BaseListData;
        import mx.events.FlexEvent;
        import mx.controls.Alert;
        import model.descriptors.compDescriptor;
        import events.exportClickedEvent;   
        public class exportButtonRenderer extends Button implements IDataRenderer   
            //    embed your icons
            [Embed(source='/assets/icons/export.png')]
            [Bindable]
            public static var imageExport:Class;
            [Embed(source='/assets/icons/blank.png')]
            [Bindable]
            public static var imageBlank:Class;
            public function exportButtonRenderer()
                super();
            private var _listData:DataGridListData;
            override public function get listData():BaseListData
                return _listData;
            override public function set listData(value:BaseListData):void
                _listData = DataGridListData(value);
            private var _data:Object;       
            override public function get data():Object
                return _data;
            override public function set data(value:Object):void
                _data = value;
            override protected function clickHandler(event:MouseEvent):void
                super.clickHandler(event);   
    Now I know I'm using the Flexlib TreeGrid and not a standard DataGrid but when I trace through all the code all code firing the set/get functions is coming from the DataGrid anyway.
    Here's the my Grid def in my main app mxml:
    Header 1
    <flexlib:TreeGrid
            id="MKTXGrid"
            dragEnabled="false" sortableColumns="false" showRoot="false"
            disclosureClosedIcon="@Embed(source='/assets/icons/arrow_right.png')"
            disclosureOpenIcon="@Embed(source='/assets/icons/arrow_down.png')"
            folderOpenIcon="@Embed(source='/assets/icons/psd.png')"
            folderClosedIcon="@Embed(source='/assets/icons/psd.png')"       
            click="MKTXGrid_clickHandler(event)"
             doubleClickEnabled="true" doubleClick="MKTXGrid_doubleClickHandler(event)" left="0" right="0" top="0" bottom="16">
        <flexlib:columns>
                <flexlib:TreeGridColumn dataField="Name" headerText = "Name" minWidth="200" width="200" editable="true"/>
                <mx:DataGridColumn dataField="ExportName" headerText = "Export Name"/>
                <mx:DataGridColumn dataField="Export" headerText = "Export" width="50" minWidth="20" resizable="false">
                 <mx:itemRenderer>
                    <mx:Component>
                        <mx:Box horizontalAlign="center" width="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
                            <controls:exportButtonRenderer label="Export" icon="@Embed(source='assets/icons/export.png')" width="12" height="12" useHandCursor="true">                        
                                <controls:click>
                                    <![CDATA[
                                        import events.exportClickedEvent;
                                        var e:exportClickedEvent = new exportClickedEvent();
                                        e.itemData = data;
                                        dispatchEvent(e);
                                    ]]>
                                </controls:click>
                            </controls:exportButtonRenderer>
                        </mx:Box>
                    </mx:Component>
                </mx:itemRenderer>
                </mx:DataGridColumn>
            </flexlib:columns>
        </flexlib:TreeGrid>
    Nothing too special going on.
    I know this can be done, I've seen examples in the SDK:
    http://opensource.adobe.com/svn/opensource/durango/trunk/ExternalFlexTools/com/dougmccune/ containers/accordionClasses/AccordionHeader.as
    By the way I've stepped through the code of the TreeGridItemRenderer class in Flexlib which works correctly and the class def starts like this:
    TreeGridItemRenderer.as
    import flash.display.DisplayObject;
    import flash.display.InteractiveObject;
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    import flexlib.controls.TreeGrid;
    import mx.controls.Image;
    import mx.controls.dataGridClasses.DataGridListData;
    import mx.controls.listClasses.BaseListData;
    import mx.controls.listClasses.IDropInListItemRenderer;
    import mx.controls.listClasses.IListItemRenderer;
    import mx.core.IDataRenderer;
    import mx.core.IFlexDisplayObject;
    import mx.core.IToolTip;
    import mx.core.SpriteAsset;
    import mx.core.UIComponent;
    import mx.core.UITextField;
    import mx.events.FlexEvent;
    import mx.events.ToolTipEvent;
    import mx.events.TreeEvent;
    import mx.managers.ILayoutManagerClient;
    import mx.styles.IStyleClient;
    public class TreeGridItemRenderer extends UIComponent
                                      implements IDataRenderer,
                                                   IDropInListItemRenderer,
                                                 ILayoutManagerClient,
                                                   IListItemRenderer
    Any help would be great!

    That's because you put your component in a Box.  The DataGrid is setting the Box's .data property and no code is setting the one on your component.  You shouldn't really need Box.  You can override updateDisplayList to center your Button instead.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Date function problems with dates from core not recognized as dates

    Our core provides dates in two formats: YYYYDDD and MMDDYY (YYYYDDD for today [2/21/12] would be 2012052).  We have determined that Crystal Reports is not viewing them as dates, but rather numbers. If querying on just a specific date, no problem. But if I want to use a date function like DayOfWeek, then things don't work.
    I need a report to always provide yesterday's data - except on Monday, where it needs to look back at Friday.
    I tried a criteria of:
    if DayOfWeek(CurrentDate) = 1 then {DDMAST.DATOP7} = CurrentDate - 2 else
    if DayOfWeek(CurrentDate) = 2 then {DDMAST.DATOP7} = CurrentDate - 3 else
    {DDMAST.DATOP7} = CurrentDate -1
    {DDMAST.DATOP7} is the date field from our core.
    I tried this but got an error message of "A Number is Required Here" and it highlights the CurrentDate - 2.
    Since we believe that Crystal Report is not viewing our dates as dates - but viewing them as numbers, what do I need to do to correct this?  Someone suggested I'd need to extract each date portion (month, date, and year) and create variables to "build" a date that Crystal Reports would understand.  Any suggestions?

    Hi, 
    You're correct.  There appears to be two branches in this thread. 
    To address your issue, Crystal only recognizes actual date types, ie. Months, Days and Years.  Your serial date isn't a recognized date type so we have to: 
    1)  Determine which format your date field is
    2)  Convert your number to a date using the appropriate formatting. 
    I am assuming your dates will either be 6 (MMddyy) or 7 (yyyyddd) characters long.  If there are other patterns you'll need to determine that. 
    The problem I found is what does your date for today (March 6, 2012) look like in MMddyy format? 
    Any month before October would never have a leading 0 if your date is stored as a number.  So you should take that into account as well using my logic. 
    I added that into the logic by checking for a length of 5. 
    NumberVar Full := 030612;
    StringVar myDate;
    myDate := ToText (Full, 0, "", "");
    Select Length (myDate)
        Case 5: Date (2000 + ToNumber (myDate [4 to 5]), ToNumber (myDate [1]), ToNumber (myDate [2 to 3]))
        Case 6: Date (2000 + ToNumber (myDate [5 to 6]), ToNumber (myDate [1 to 2]), ToNumber (myDate [3 to 4]))
        Case 7: Date (ToNumber (myDate[1 to 4]), 1, 1) + (ToNumber (myDate [5 to 7]) - 1)
        Default: Date (0, 0, 0);
    If you edit the first line and change it to: 
    NumberVar Full := 2012066;
    You will also get today's date.

  • Problem during summer time switch with all date functions

    Hello,
    During the summertime switch, we faced some issues in MII (12.1.9 Build(116)).
    We are receiving the date/time in GMT XML format from our shop floor system.
    I noticed when the date/time is between 02:00 and 03:00, all date functions are not working in expression editor (like in assign block).
    For example : datefromxmlformat("2014-03-30T02:00:01","yyyyMMdd HHmmss") will return nothing... Even adding the Z to tell it's UTC does not help :
    datefromxmlformat("2014-03-30T02:00:01Z","yyyyMMdd HHmmss"), but no success...
    Even worst, the expression dateaddminutes("2014-03-30T02:00:01","10") will lead to a conversion exception...
    Is there a solution to this ?
    Thanks

    Daylight Savings Problem
    Problems since new Daylight Savings Time
    Java 1.6 07 vs xMII v11.5 and MII v12
    Date duration calculation in the BLS
    Server Downtime, Daylight saving time, and Time Shift - Using Central Development Services - SAP Library
    Hi Olivier,
    These all cover the topic, but many are for MII versions prior to yours.  However each has some explanations which are worth reading.  I would recommend the last one for an explanation of how Java and schedulers work during DST.
    Regards, Mike
    SAP Customer Experience Group - CEG

  • Date function problem

    i am student and using Oracle 11g XE, now while trying out the date function..when time 15:00:00 was entered an error is being shown
    the * is being shown under 15:00:00
    SQL> create table ticket_header(ticket_no number(5), doi date, dot date, time_travel date, board_place varchar2(15), origin varchar2(15), destination varchar2(15), adults number(5), children number(5), total_fare number(5), route number(5));
    SQL> insert into ticket_header values(01, '01-apr-96', '10-may-96', '15:00:00', 'Parrys', 'Madras', 'Madhurai', 1, 1, 60, 101);
    insert into ticket_header values(01, '01-apr-96', '10-may-96', '15:00:00', 'Parrys', 'Madras', 'Madhurai', 1, 1, 60, 101)
    ERROR at line 1:
    ORA-01843: not a valid month

    What's the purpose of time_travel column ? Will you do calculations on it, or it's only for reporting ? If the former, then date is better, otherwise you could use a varchar2 column. See this example :SQL> create table test(a date, b varchar2(8));
    Table created.
    SQL> insert into test values(to_date('15:00:00','hh24:mi:ss'),'15:00:00');
    1 row created.
    SQL> select to_char(a,'hh24:mi:ss'),b from test;
    TO_CHAR(A,'HH24:MI:SS')  B
    15:00:00                 15:00:00
    SQL>About the error, you get it because your date format is 'DD-MON-RR' (the default), and inserted values have to conform with it, as in your other date columns, or you have to format them (e.g. to_date).

  • Problem with date calculation

    I am a rookie in SAP i have a small problem with date.Do we have any function module to find out the first day in a month if we give out the system current date ?? Pls help me out.

    Hi,
    As Ganesan told,you can do.
    Here is the sample code.
    data v type sy-datum.
    data d type DTRESR-WEEKDAY.
    v+6(2) = '01'.
    v4(2) = sy-datum4(2).
    v0(4) = sy-datum0(4).
    CALL FUNCTION 'DATE_TO_DAY'
      EXPORTING
        date          = v
    IMPORTING
       WEEKDAY       = d.
    write d.

  • Tp ended with error code 0247 - addtobuffer has problems with data- and/or

    Hello Experts,
    If you give some idea, it will be greatly appreciated.
    This transported issue started coming after power outage, sap system went hard shutdown.
    Then we brought up the system. Before that , we do not have this transport issue.
    our TMS landscape is
    DEV QA-PRD
    SED-SEQSEP
    DEV is having the TMS domain controller.
    FYI:
    *At OS level, when we do scp command using root user, it is fine for any TR.
    In STMS, while adding TR in SEQ(QA system), we  are getting error like this.
    Error:
    Transport control program tp ended with error code 0247
         Message no. XT200
    Diagnosis
         An error occurred when executing a tp command.
           Command:        ADDTOBUFFER SEDK906339 SEQ client010 pf=/us
           Return code:    0247
           Error text:     addtobuffer has problems with data- and/or
           Request:        SEDK906339
    System Response
         The function terminates.
    Procedure
         Correct the error and execute the command again if necessary.
    This is tp version 372.04.71 (release 700, unicode enabled)
    Addtobuffer failed for SEDK906339.
      Neither datafile nor cofile exist (cofile may also be corrupted).
    standard output from tp and from tools called by tp:
    tp returncode summary:
    TOOLS: Highest return code of single steps was: 0
    ERRORS: Highest tp internal error was: 0247

    when we do scp using sm69,
    SEDADM@DEVSYS:/usr/sap/trans/cofiles/K906339.SED SEQADM@QASYS:/usr/sap/trans/cofiles/.
    it throws the error like below,
    Host key verification failed.
                                                                                    External program terminated with exit code 1
    Thanks
    Praba

  • Problem in data carrier "IDENTIFY FRONT END COMPUTER"

    hello all
    i am facing problem in data carrier creation for front end computer. actually i am creating data carrier type PC and i want set as default for all desktop. After  DEFINE DATA CARRIER TYPE SERVER, FRONT END and Select PC and IDENTIFY FRONT END COMPUTER its shows following error
    No entries found that match selection criteria
    Message no. SV004
    Diagnosis
    No entries were found when importing data from the data base.
    Procedure
    If you have specified selection conditions, start the transaction again with conditions that are less restricted.
    You can make new entries independently of this. To do this, select the function New entries in menu Edit.
    help me

    Hi Vivek,
    In the SAP standard this entry are maintained only by the system
    itself and they cannot be entered manually in transaction DC20. I can
    only provide you the following information on the possible settings for
    variable HOSTNAME and the DEFAULT frontend entry.
    1. Default entry
       Call transaction 'DC20'. Double-click node 'Define data carrier type
       "server, front end"'. Select the respective data carrier type (e.g.
       'PC') and double-click node 'Identify frontend computers'. Click
       button 'Default entry' in the top right corner of the table control.
       Note that it is only possible to create 1 default entry!
    2. System variable HOSTNAME
       If you run Windows XP, please go to Start -> Settings -> Control
       Panel. Double-click on 'System'. Click on tab 'Advanced' and then on
       button 'Environment variables'. Create system variable 'hostname' and
       assign a value'. Save the new variable.
    As there is already a DEFAULT entry for frontendtype 'PC' it cannot be
    maintained for another frontend type.
    Best regards,
    Christoph

  • Help with Date function in sql query....

    My question I guess is really 2...I'm trying to use the date function as a comparison in my WHERE clause in my sql command.
    1. My date format is dd-MMM-yy eg. (01-Apr-06) ... my problem is the Apr is lower case where my field in the database is 01-APR-06 so when I compare 01-Apr-06 to 01-APR-06 is doesnt find any rows. Is there away that I can make the Apr all upper case so that it is APR.
    2. My second problem is getting this "date" field to work in my sql stmt I keep getting errors and it works fine if I take my attempts at trying to compare the date.
    --------------Date Code----------------------------------------------------------
    <%!
    String getFormattedDate(java.util.Date d)
    SimpleDateFormat simpleDate = new SimpleDateFormat("01-MMM-yy");
    return simpleDate.format(d);
    %>
    <%
    java.util.Date d = new java.util.Date();
    String dateString = getFormattedDate (d);
    %>
    ---------------------------Sql statment------------------------------------------
    ResultSet rset = stmt.executeQuery ("SELECT name " + " FROM table where rdate = '01-APR-06' order by name ");
    Currently Im just hard coding the date but I need to make it so it uses the date code...so....
    rdate should equal the date from the formatted date in upper case
    something like
    rdate = <%= dateString %>
    Thanks in advance for any ideas anyone may have...

    There are sql functions upper & lower.
    SELECT name  FROM table where upper(rdate) = '01-APR-06' order by name Or you could convert the date to a string, and use the toUpperCase & toLowerCase java.lang.String methods. It doesn't make much of a difference--do you want the java compiler to do the string conversion or the database?

  • Problem in  using function module parameters in abap program

    i want to use the coding present in on one of the function module 'AS_API_INFOSTRUC_FIND'  i got the problem using the function module parameters in my abap program.
    these are the parameters inside fm
    ""Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(I_FIELDCAT) TYPE  AIND_FCAT
    *"             VALUE(I_FIELDS) TYPE  TABLE OPTIONAL
    *"             VALUE(I_OBLIGATORY_FIELDS) TYPE  TABLE OPTIONAL
    *"       EXPORTING
    *"             VALUE(E_INFOSTRUC) TYPE  AIND_DESC
    *"             REFERENCE(E_ALL_FIELDS) TYPE  TABLE
    *"             REFERENCE(E_MATCHING_FIELDS) TYPE  TABLE
    *"       EXCEPTIONS
    *"              NO_INFOSTRUC_FOUND
    i want to declare     E_ALL_FIELDS  parameter    in my abap program,
    i have declared as 
    data: E_ALL_FIELDS TYPE TABLE.
    but   the system throws error that
    'type of field 'TABLE'  is generic .no table line has been specified'.
    i want to use it in my abap program how can i declare in my abap program .

    You have to declare the table using any specific type.
    The type table in the FM is generic so you can pass any type you need.
    For instance:
    TYPES: BEGIN OF ty_fields,
             fieldname LIKE dfies-fieldname,
           END OF ty_fields,
    TYPES: TY_T_GLU1              LIKE GLU1                     OCCURS 0,
           ty_t_fields            type ty_fields                occurs 0.
      DATA: lt_info_struct_fields TYPE ty_t_fields WITH HEADER LINE,
            lt_matching_fields    TYPE ty_t_fields WITH HEADER LINE.
        CALL FUNCTION 'AS_API_INFOSTRUC_FIND'
             EXPORTING
                  i_fieldcat         = ft_fieldcat-fieldcat
                  i_fields           = ft_fields_filled[]
             IMPORTING
                  e_infostruc        = lv_info_struct_name
                  e_all_fields       = lt_info_struct_fields[]
                  e_matching_fields  = lt_matching_fields[]
             EXCEPTIONS
                  no_infostruc_found = 1.

  • Javascript Date() function not working

    Hi,
    I'm experiencing some problems with the Date() function in javascript. The problem is that the function doesn't seem to work. For example when I do "var date = new Date(); xfa.host.messageBox(date);" in the enter event of a date field, I get "Date is not a function" error message in de javascript debugger.
    Is there anyone out there who knows how why the Date function is not working in LiveCycle Designer. Am I using the Date function in an improper way or maybe I am using the wrong function?
    Please can anyone help me out?

    Hi Paul,
    Thanx for you reply. It worked fine.
    I also found out that following works as well:
    var MyDate = util.scand("dd-mm-yyyy",new Date());
    console.println("this date: "+util.printd("dd-mm-yyyy", MyDate));

  • Use a Parameter or Formula in the Date() function

    I am trying to filter a result set utilizing the Date() function.  I am trying to get all of the data between June 1st of a given year, and a parameterized date.  Here is the formula
    {ReportStatic.rpsActualSaleDate} >= Date({@fPrevioustoLastYear}, 7, 1)
    and {ReportStatic.rpsActualSaleDate} < DateAdd("yyyy", -2, {?pDateEnd})
    and {ReportStatic.rpsSaleStatus} = 1
    The value of fPrevioustoLastYear is '2008'
    The report is returning 0 records.  I think it is because the Date() function isn't recognizing the formula (fPrevioustoLastYear) as a valid input.  However when I "Save and close" the formula editor doesn't find any problems with the formula.
    What should I be doing differently?

    If {@fPreviousToLastYear} is in fact 2008, I don't see an issue (with the possible exception that it should be a number, not a string; convert with CInt()).  Please post your formula for that field.
    Also, I have to ask what the value of {?pDateEnd} is.  If it's like today, no records will fit the criteria because you'd be checking if the date was between 7/1/2008 and 3/29/2008 (you're subtracting 2 years from the parameter), which is a null set.
    HTH,
    Carl

Maybe you are looking for

  • Message on the check validity of input with "SPRY "

    bonjour, Comme mon englais n'est pas bon, je vais faire vite. j'utilise "SPRY" pour controler la saise d'un input. j'ai bien le message quand la saisie est fausse. comment faire si je veux aussi un message quand la saisie est bonne ? Merci Merci goog

  • Supplier Information in Insection Lot

    Dear Experts, User wants to record the data like supplier test certificate number, supplier lot number, conductivity mentioned by supplplier etc., during the inspection. There may be max two values for each of the above. Please suggest the suitable s

  • Can I pass an array as an input parameter for a stored procedure on SQL Server 2000

    I am trying to pass an array to a stored procedure residing on my SQL Server 2000 database server. Is this even possible? If it is possible, what is the syntax for this? Any help would be greatly appreciated. Thanks

  • Time machine - ext USB drive - failure

    After reformatting & partitioning an external USB drive, I can't get Time Machine to do a back up on it (I've been using TM on several macs, including this one, and this drive, for years). The backup begins and after copying a few GBs of data, I get

  • SONY HDR-PJ430V on Premiere - camera shows ''offline''

    I am under Mac OS X 10.8.5 (Mountain Lion latest update).  As I had issues with my ''old'' Canon Vixia HV30 (tape-based) under CS6 (no way to capture without crashing...), I slowly switched to Final Cut Pro. Now with a brand new cam, the SONY HDR-PJ4