Query Trip Data with Zero Amount

Dear all,
I have requirement to retrieve every trip record which has zero amount in its total cost. It didn't work when I use TCode S_AHR_PH0_61016401 (General Data Trip) for this query purpose.
I also took effort to make my own query definition using logical database PTRVP. This custom query used table PTRV_HEAD, PTRV_SHDR, PTRV_SREC. Later, I realized that table PTRV_SHDR, which save data for trip total cost, never store any trip record that has zero amount in its total cost.
Is there any configuration to make PTRV_SHDR able store the zero-trip?
I really do appreciate every help here. Thanks a ton!
Regards,
Erwin

Hi Erwin,
Yes i have tested and then suggested..
Please note that on my side, system doest NOT display if you simply click on set filter (on Total Cost) and insert 0.00 amount on lower and upper then execute.
You need to select multple selection button and then place 0.00 in Select Single Value  and then execute..
Regards,
Muhammad Umer

Similar Messages

  • Po with zero amounts

    Can we create a PO with zero amounts? We need to track item received
    for vendor performance. Need to create PO receive Items with need
    by date & promise date. Same time match to Zero Invoice if possible.
    Thanks

    Hi
    We have a laundry service brings washed shirts and pants every day.
    If we have a new employee we use the same vendor to order new shirts and pants.
    At this time we need to create a PO for the new clothes. We want to track the promise date and receive date for supplier performance.
    Can we make a PO with zero amount and quantity like 5 shirts and 5 pants and later on receive it? And them match that PO in AP for zero amounts.
    Thanks

  • Error when querying OLAP data with BI answers

    Have been doing all the Lessons in "Using Oracle OLAP With Oracle BI Enterprise Edition 10g Release 3". Got till lesson 3 where I'm supposed to query the data with Answers but If I add any of the facts to the report, I get the following error:
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17003] Oracle gateway error: Unsupported data type 101. (HY000)
    SQL Issued: SELECT Customer."Ship To" saw_0, Measures.COST saw_1 FROM Global ORDER BY saw_0
    So I was wondering if anyone knows what the catch could be.
    Thanks in advance!

    Yes. Me too. I have the same issue and I don't find any information about it. Could anyone help ?

  • Can a credit memo be posted with zero amount?

    Can a credit memo be posted with zero amount? What would it mean, that the goods qty have been posted free of cost?
    Pls reply...
    Thanks,
    Swati.

    yes, It depends upon the procurement...
    I have raised a PO for 100 pieces, But the Vendor will supply only in Dozens..
    That means for 100 pices , we will receive 9 Dozens( 108 pieces)..
    Similarly some times if it's a Fragile material , the Vendor will send more pieces as a buffer..
    If IR Qty > GR Qty , it becomes Qty variance..
    Similarly I received 100 Qty & 5 pieces are Sub-Standard, then I will raise Credit memo for that...
    Edited by: Manohar Raju on Apr 30, 2008 4:58 PM

  • Delivery Date with Zero Order Quantity in Sales Order

    Dear All,
    I have created a sales order in va01 with different delivery date in schedule lines. I want to save delivery date with zero order
    quantity because he has not delivery on time.

    Dear All,
    I have created a sales order in va01 with different delivery date in schedule lines. I want to save delivery date with zero order
    quantity because he has not delivery on time.
    Deatils :
    Delivery Date     Order Quantity  Delivery Qty
    02.09.2011       10                    10
    05.09.2011       10                    10
    09.09.2011       10                    10
    15.09.2011       10                    10
    21.09.2011       10                    0
    Now i want to insert a new schedule line 10.10.2011 with order quantity 10. or 21.10.2011 schdeule date with 0 quantity.
    Presently system can't save schdeule date 21.09.2011 with o quantity.

  • Outgoing payment with Zero amount when Full adance is paid

    I am making A/P down payment request based on purchase order, then I make full payment of PO (full advance payment - no amount of payment left with) through "Outgoing payment" which creates negative amount in Business partner balance and shows a negative entry in "outgoing payment" screen. Moving further, I make Goods receipt PO and then I make A/P invoice of regular amount based on goods receipt PO / Purchase order.
    Up till now, the full payment has been made in advance through A/P down payment request and upon receiving goods the A/P invoice of regular amount is received. Now when I go to "outgoing payments" I have no amount left to pay (i.e. It displays 2 entries of same amount, one with positive amount of A/P invoice and the other one with negative amount of A/P down payment request to show the due balance = zero)  So I am trying to clear the vendor "outgoing payments" by paying with Zero amount, but the system shows the error "The confirmation amount should be greater than Zero".
    How can I clear the vendor "Outgoing payments" with zero amount ?? as it's payment has been made in advance.
    Note: Please give me the solution by keeping in mind that I have to pay full amount in advance.
    Solution to this problem would be highly appreciated.
    Thanks and regards,
    Farhan Sufi

    Hi Farhan Sufi,
                  For Cases where full Advance is paid initially, You Follow these procedure, I have tested in my DB its working fine.
    Step 1: Raise a Purchase order Say Rs 1000/-
    Step 2: Raise a GR(PO) of Rs 1000/-
    Step 3: Go To A/P Down Pmt -
    Select the Vendor -
    Say copy from GR(PO), And select te One you wanted. At the bottom in the DPM Field give 100% and Add the Document.
    Step 4: Raise Out Going Payment by linking to the A/P Down Pmt what you have posted. ie., Go To Out Going Pmt Screen---Select the Vendor, This will display all invoices, Down pmts, Credit Memos, and JE's. Select the A/P Down Pmt what you have posted and go to payment means fill in the respective field and add the document.
    Step 5: Go To A/P Invoice Screen, select the vendor. And  click on Copy from GR(PO), Select the respective GR(PO) document.
    And At the Bottom double click on Total Down Payment Button, This will display the list of all Down Payments for which Out going payments are also posted. Here Select the respective Down payment and add the document.
    When you add this A/P Invoice document gets added and the status of the document will be closed. As you have made full payment in the A/P Down Payment Screen.
    And This Invoice will not appear in the Out Going Screen as the document is closed.
    Cheers,
    Sree.

  • How can I make a query by date with several TDMS files?

    Hi,
    I have a project that can write and read TDMS files everyday (a file for each day with date and time). There, I can import those files to excel (I choose a file and load it). But, I have a question: How can I make a query by date with those TDMS files? I'd like make a time stamp for start date and stop date, where I could compare the TDMS file dates and sum the values that are in the channels where these files are similar. For example, I save a file with "02/01/2013" name, in other day "03/01/2013", in other day "04/01/2013"... so, i'd like put in time stamp for start date "02/01/2013" file and to stop date "04/01/2013" file, than, sum all values that range with my TDMS files existing. How can I make that? 
    Thanks all,
    Val 

    Hello Val_Auto.
    You're Brazilian, no? Me too. = ^ - ^ =
    I converted VI to version of your LabVIEW (8.5). Is attached in this reply.
    This VI search all your TDMS in a range of dates and join them in a single TDMS. I hope this is what you wanted.
    Query TDMS is the main VI. The TDMS VI Search changes the date format that out from calendar control (which is DD / MM / YYYY) to DD-MM-YYYY. This is because you can't name files using "/". I chose "-" but, if necessary, you should change to keep the same format of your TDMS files.
    If you have any doubt as to its operation or how to make changes to adapt VI for your application, keep at your disposal.
    Thank you for your contact; I hope have helped you and succeed in your application.
    Wesley Rocha
    Application Engineer
    National Instruments Brazil
    Visite a nossa comunidade em PORTUGUÊS!!!
    Attachments:
    Query TDMS.vi ‏62 KB
    tdms search.vi ‏24 KB

  • Problem inserting and querying XML data with a recursive XML schema

    Hello,
    I'm facing a problem with querying XML data that is valid against a recursive XML Schema. I have got a table category that stores data as binary XML using Oracle 11g Rel 2 on Windows XP. The XML Schema is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="bold_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="keyword_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
                   <xs:element name="plain_text" type="xs:string"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="emph_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="text_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="parlist_type">
              <xs:sequence>
                   <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded" type="listitem_type"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="listitem_type">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="parlist" type="parlist_type"/>
                   <xs:element name="text" type="text_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:element name="category">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name"/>
                        <xs:element name="description">
                                  <xs:complexType>
                                            <xs:choice>
                                                           <xs:element name="text" type="text_type"/>
                                                           <xs:element name="parlist" type="parlist_type"/>
                                            </xs:choice>
                                  </xs:complexType>
                        </xs:element>
                                                                </xs:sequence>
                                                                <xs:attribute name="id"/>
                                            </xs:complexType>
                        </xs:element>
    </xs:schema>I registered this schema and created the category table. Then I inserted a new row using the code below:
    insert into category_a values
    (XMlElement("category",
          xmlattributes('categoryAAA' as "id"),
          xmlforest ('ma categ' as "name"),
          (xmlelement("description", (xmlelement("text", 'find doors blest now whiles favours carriage tailor spacious senses defect threat ope willow please exeunt truest assembly <keyword> staring travels <bold> balthasar parts attach </bold> enshelter two <emph> inconsiderate ways preventions </emph> preventions clasps better affections comes perish </keyword> lucretia permit street full meddle yond general nature whipp <emph> lowness </emph> grievous pedro')))    
    The row is successfully inserted as witnessed by the results of row counting. However, I cannot extract data from the table. First, I tried using SqlPlus* which hangs up and quits after a while. I then tried to use SQL Developer, but haven't got any result. Here follow some examples of queries and their results in SQL Developer:
    Query 1
    select * from category
    Result : the whole row is returned
    Query 2
    select xmlquery('$p/category/description' passing object_value as "p" returning content) from category
    Result: "SYS.XMLTYPE"
    now I tried to fully respect the nested structure of description element in order to extract the text portion of <bold> using this query
    Query 3
    select  xmlquery('$p/category/description/text/keyword/bold/text()' passing object_value as "p" returning content) from  category_a
    Result: null
    and also tried to extract the text portion of element <text> using this query
    Query 4
    select  xmlquery('$p/category/description/text/text()' passing object_value as "p" returning content) from  category_a
    Result: "SYS.XMLTYPE".
    On the other hand, I noticed, from the result of query 1, that the opening tags of elements keyword and bold are encoded as the less than operator "&lt;". This explains why query 3 returns NULL. However, query 4 should display the text content of <text>, which is not the case.
    My questions are about
    1. How to properly insert the XML data while preserving the tags (especially the opening tag).
    2. How to display the data (the text portion of the main Element or of the nested elements).
    The problem about question 1 is that it is quite unfeasible to write a unique insert statement because the structure of <description> is recursive. In other words, if the structure of <description> was not recursive, it would be possible to embed the elements using the xmlelement function during the insertion.
    In fact, I need to insert the content of <description> from a source table (called category_a) into a target table (+category_b+) automatically .
    I filled category_a using the Saxloader utility from an flat XML file that I have generated from a benchmark. The content of <description> is different from one row to another but it is always valid with regards to the XML Schema. The data is properly inserted as witnessed by the "select * from category_a" instruction (500 row inserted). Besides, the opening tags of the nested elements under <description> are preserved (no "&lt;"). Then I wrote a PL/SQL procedure in which a cursor extracts the category id and category name into varchar2 variables and description into an XMLtype variable from category_a. When I try to insert the values into a category_b, I get the follwing error:
    LSX-00213: only 0 occurrences of particle "text", minimum is 1which tells that the <text> element is absent (actually it is present in the source table).
    So, my third question is why are not the tags recognized during the insertion?
    Can anyone help please?

    Hello,
    indded, I was using an old version of Sqlplus* (8.0.60.0.0) because I had a previous installation (oracle 10g XE). Instead, I used the Sqlplus* shipped with the 11g2database (version 11.2.0.1.0). All the queries that I wrote work fine and display the data correctly.
    I also used the XMLSERIALIZE function and can now display the description content in SQL Developer.
    Thank you very much.
    To answer your question Marco, I registered the XML Schema using the following code
    declare
      doc varchar2(4000) := '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="bold_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="keyword_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
                   <xs:element name="plain_text" type="xs:string"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="emph_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="text_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="parlist_type">
              <xs:sequence>
                   <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded" type="listitem_type"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="listitem_type">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="parlist" type="parlist_type"/>
                   <xs:element name="text" type="text_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:element name="category">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name"/>
                        <xs:element name="description">
                                  <xs:complexType>
                                            <xs:choice>
                                                           <xs:element name="text" type="text_type"/>
                                                           <xs:element name="parlist" type="parlist_type"/>
                                            </xs:choice>
                                  </xs:complexType>
                        </xs:element>
                                                                </xs:sequence>
                                                                <xs:attribute name="id"/>
                                            </xs:complexType>
                        </xs:element>
    </xs:schema>';
    begin
      dbms_xmlschema.registerSchema('/xmldb/category_auction.xsd', doc,     LOCAL      => FALSE, 
            GENTYPES   => FALSE,  GENBEAN    => FALSE,   GENTABLES  => FALSE,
             FORCE      => FALSE,
             OPTIONS    => DBMS_XMLSCHEMA.REGISTER_BINARYXML,
             OWNER      => USER);
    end;then, I created the Category table as follows:
    CREATE TABLE category_a of XMLType XMLTYPE store AS BINARY XML
        XMLSCHEMA "xmldb/category_auction.xsd" ELEMENT "category";Now, there still remains a problem of how to insert the "description" content which I serialized as a CLOB data into another table as XML. To this purpose, I wrote a view over the Category_a table as follows:
    CREATE OR REPLACE FORCE VIEW "AUCTION_XWH"."CATEGORY_V" ("CATEGORY_ID", "CNAME", "DESCRIPTION") AS
      select category_v."CATEGORY_ID",category_v."CNAME",
      XMLSerialize(content ( xmlquery('$p/category/description/*' passing object_value as "p" returning content)) as clob) as "DESCRIPTION"
      from  auction.category_a p, 
    xmltable ('$a/category' passing p.Object_Value as "a"
    columns  category_id varchar2(15) path '@id',
              cname varchar2(20) path 'name') category_v;Then, I wrote a procedure to insert data into the Category_xwh table (the source and target tables are slightly different: the common elements are just copied wereas new elements are created in the target table). The code of the procedure is the following:
    create or replace PROCEDURE I_CATEGORY AS
    v_cname VARCHAR2(30);
    v_description clob ;
    v_category_id VARCHAR2(15);
    cursor mycursor is select category_id, cname, description from category_v;
    BEGIN
    open mycursor;
      loop
      /*retrieving the columns*/
      fetch mycursor into v_category_id, v_cname, v_description ;
      exit when mycursor%notfound;
      insert into category_xwh values
      (XMlElement("category",
          xmlattributes(v_category_id as "category_id"),
          xmlelement("Hierarchies", xmlelement("ObjHierarchy", xmlelement ("H_Cat"),
                                                               xmlelement ("Rollsup",
                                                                                  (xmlelement("all_categories",
                                                                                   xmlattributes('allcategories' as "all_category_id")))
        xmlforest (
                  v_cname as "cat_name",
                  v_description as "description")    
    end loop;
      commit;
      close mycursor;
    END I_CATEGORY;When I execute the procedure, I get the following error:
    LSX-00201: contents of "description" should be elements onlyso, I just wonder if this is because v_description is considered as plain text and not as XML text, even if its content is XML. Do I need to use a special function to cast the CLOB as XML?
    Thanks for your help.
    Doulkifli

  • APD query key date with variable for time dependent MD display attributes

    Hello,
    In a APD I use a query as a source with a query key date that is filled with a customer exit variable.
    When I run the query as a user, the time dependent MD display attributes look fine. However, when I use the query in an APD, I get no values for the time dependent display attributes.
    Any suggestions?
    Thanks

    Hi,
    Try to run query using RSCRM_BAPI Tcode, this you can also schedule in background
    Thanks
    Reddy

  • EDI Credit Memo with Zero amount

    Dear Experts,
    We are using EDI for MIRO Invoice posting. PO is Non-GR Based Invoice. So IR has been automatcally posted first (ex: qty = 4)
    Then GR has been posted also with qty =4.  Then Credit memo was posted with Qty = 1, but we noticed that the posting has zero amount, then Accounting Document has posting to Stock Account and GR/IR Clearing account with amount = to 1 Qty.
    Can anyone explain what happened? I know that Credit Memo posting should have posting to Vendor Account, but this case it didn't happen.
    Thank you in advance.

    Hi.. thanks for your input.
    Yes, I understand that the posting is coming from Vendor, but I am confused, why the posting has zero amount?
    As I understand, credit memo is dealing with the amount of the qty that might be has defect that we have to deduct this amount to Vendor payment. But what happened is, it only posted to Stock Account and GR/IR clearing account, no Vendor Line was created in the FI Doc because in the IR document itself does not have the amount.
    Thank you and your further input will be highly appreciated.

  • Report painter:display of G/L with zero amount

    Hi,
    I have created a report in report painter for expenses by profit center. however the system is not showing the G/L for which no posting has been made although i have maintained those G/Ls in the report. Is there any way to display G/L with zero values also?
    I am running the report at fiscal year level.

    Hi, you can try to go the report painter (GRR2)
    Formatting - section layout - Columns make sure the suppress zero columns is unchecked
    and also you can go to Formatting - section layout - Columns  - Treatment of zero rows - Print Zero Rows
    Regards.

  • Syntax for querying between dates with ADO

    Hello,
    I am connecting to Oracle tables using ADO in Microsoft Access. I am not familiar with Oracle Sql. I am trying to execute the following query string but am not retrieving and records:
    strSql = "SELECT COUNT(*) " _
    & "FROM CCC2.CASE_EPRP WHERE CALL_DATE >= '1/1/2002' " _
    & "AND CALL_DATE <= '2/1/2002'"
    I can retrieve a record count if I only have the first date, but if I use the date range above the query returns zero records even though there are records for that date range. Could someone explain the correct way to write this query?
    Thanks,
    Rich

    You really don't want to rely on implicit string to date conversion ever. Oracle will use your NLS date settings to do the conversion, but different users (and different databases) may have this set differently, so one user might have '2/1/2002' convert to February 1, 2002 while another user might have it convert to January 2, 2002. A third user might not be able to convert the string at all.
    The proper way to do this is to use either Oracle syntax
    "where call_date >= to_date( '1/1/2002', 'MM/DD/YYYY' )
    and call_date <= to_date( '2/1/2002', 'MM/DD/YYYY' )"
    or to use the ODBC date escape sequence, {d }, to create the dates.
    If this isn't the problem, there may be issues because Oracle dates have a time component. If you don't specify a time, Oracle will default to midnight, so any call_date records after 12:00am on 2/1/2002 won't be found.
    Justin

  • Poting with zero amount

    Hi ,
               In f-02 if we are using foriegn currency can we post  a document with a line item having foriegn currency amount as zero and  local currency amount with some values.This is done to capture the foriegn exchange rate.
    Thanks & Regards,
    Arun.

    Hi,
    that won't work in F-02. You have to use transaction "FX difference posting" to do so. YOu can find it in the application menu Accounting --> GL --> Posting --> Foreign currency valuation, I can't remember the tcode for the moment and I have no system access right now (FFB1? FBB5? ... )
    The regular periodic FX revaluation program (tcode F.05) is using the same transaction in its batch input sessions.
    Here, and only here, are you allowed to enter 0 amount for either document currency or local currency (also works for 2nd and 3rd local currency, if available).
    Hope that helps, points welcome
    Csaba

  • Extracting data with zero values for periods without data

    Hello Together,
    i extracted data from our hfm application from period 1 to 3.
    Now i found that some rows begin with period 2 or 3 because there are no data in period 1 or 2.
    So my question is, how i can get zero values for periods with no data.
    Hope someone can help me.
    Many thanks in advance.
    Martin
    P.S.: Our actual hfm version is 11.1.1.3
    edit

    For the periods with no data, HFM does not have a "0" to offer for the data extraction. Since the default data extract from HFM has each period on it's own row in the *.dat file, I don't understand your comment about rows starting with period 2 or 3. In the *.dat file the row for period 1 simply won't exist. Are you using a custom approach/tool for data extraction?
    The only time HFM will offer a "0" where there is indeed no data, is if you extract derived data. You must include calculated data, and even then I believe HFM will only extract a "0" for the first period after a period where there was data, and only for flow accounts (Revenue/Expense). so if you have "100" in period 1, and no data in period 2, such that the derived value YTD for period 2 is "0", then you must include calculated values in the extract and you should see "0" for period 2. However, I don't believe HFM will extract "0" for period 3 - instead it will be blank/missing.
    In general it could be very dangerous to force HFM to give zeros where there is no data.
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Display dates with zeros for month, day, year.

    I have a date coming from a database as an int (20021215 means 12/15/2002). If the database gives me a "0", meaning no date value is assigned, then it should be displayed as "00/00/0000". The following code snippet works for the non-zero int database values ...
    public static String formatDisplayDate(int date) {
        String dateAsString = null;
        if (date == 0) {
            dateAsString = "00000000";
        else {
            dateAsString = Integer.toString(date);
        String strYear = dateAsString.substring(0,4);
        String strMonth = dateAsString.substring(4,6);
        String strDay = dateAsString.substring(6);
        int year = Integer.parseInt(strYear);
        int month = (Integer.parseInt(strMonth)) - 1;
        int day = Integer.parseInt(strDay);
        DateFormat myFormat = DateFormat.getDateInstance(DateFormat.SHORT);
        Calendar cal = myFormat.getCalendar();
        cal.set(year, month, day);
        Date myDate = cal.getTime();
        String formattedDate = myFormat.format(myDate);
        return formattedDate;
    }Although I didn't really expect the zero values case to work, I am not sure how to implement it. How would I go about building a string using all zeros and still have it automatically display in the correct locale format?
    Any help is appreciated.

    Thank you for your response. I agree a blank field would be better, but I think the "zeros" format is there to give the user an idea of expected date entry formatting, not that they'll necessarily follow it. I have made a few changes per your suggestions (shown below for the record, minus the exception handling), and it works perfectly.
    public static String formatExternalDate8(int date) {
      String dateAsString = null;
      if (date == 0) {
        dateAsString = "00010101";
      else {
        dateAsString = Integer.toString(date);
      int year = Integer.parseInt(dateAsString.substring(0,4));
      int month = (Integer.parseInt(dateAsString.substring(4,6))) - 1;
      int day = Integer.parseInt(dateAsString.substring(6));
      DateFormat myFormat = DateFormat.getDateInstance(DateFormat.SHORT);
      Calendar cal = myFormat.getCalendar();
      cal.set(year, month, day);
      Date myDate = cal.getTime();
      String formattedDate = myFormat.format(myDate);
      if (date == 0) {
        formattedDate = formattedDate.replace('1', '0');
      return formattedDate;
    }Thanks again for your assistance.

Maybe you are looking for

  • How to Reformat the hard drive I use to edit with..."scratch disc"

    Today when I turned on my computer I got a strange message on the screen that basically said I need to back up one of my drives and format it asap. It also said the computer couldn't repair it. This is the HD I use to edit with as my scratch disc wit

  • Speeds vary widely

    I have a MacBook Pro, iPad, iPhone, Apple TV, etc. and I live in North VA.  What I have been noticing over the last two months is a wide variance in up and down load speeds on all of these devices.  Today over the last 2 hours I have seen 3.4/12.3, 7

  • Recording external video to G5

    What is the best method to transfer a home video (vhs or dvd) to the G5 for viewing and editing?

  • ALV set row and column position

    Hi Experts, I have editable ALV, after edit I refresh ALV, but problem is, that position is set to position 1.1. I need to keep cursor at edited position. I use ALV through function module REUSE_ALV_GRID_DISPLAY. Thansk&regards, Jirka

  • I deleted my accidentally deleted my passwords -- help

    I thought I was only deleting a single entry in Keychain Access. I was asked if I wanted to delete files and references or just references. I chose the former (was this wrong?). Suddenly, all of my passwords disappeared. This is the passwords I have