ALV date format problem

Hi ,
I Created an ALV report in that I am getting the sales order details... and once I get the list I am moving to excel sheet ...
Once I moved to excel sheet by creating the layout , I am getting DAT colums as 00.00.0000 if the cell is empty.. how to avoide this ....

Try with NO_ZERO = 'X'. for the Date field in the fieldcatalog.
I am not sure of this , Give a try once.

Similar Messages

  • Date Format problem...

    Hi users,
    Forte version : 2.e.2 and ForteWebSDK
    Datacase : Oracle
    We have a problem with a simple HTML text field which acccepts
    a date. When we try to update the record with some date, the following
    exception occurs:
    24-Jun-1998 04:32:28 : XV01086 : Execute failed for SQL statement in
    project Rap
    tServices, class RaptSqlMethods, method updateActivity, methodId 104,
    line 51, e
    rror from database is:
    ORA-01830: date format picture ends before converting entire input
    string
    The Oracle manual says that the above exception occurs when there are
    some extra characters on that field, which is not the case. In fact,
    we raise our own exception for the cases like : o1-Apr-1997,
    01-apr-97 etc. The correct format is 01-apr-1998.
    Same date soemtimes is added to the database successfully. Waht I mean
    to say that the exception deos not occur consistently.
    We just conevert the String taken from the HTML field into a Forte
    DateTimeData Object and send it to database. May be, the conversion
    part is causing the problem. But, once again the problem is not
    consistent.
    Any ideas in this will be appreciated.
    Thanx in advance
    -Rajeev Talwar
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    We had the same problem when our application first went live. The
    default date format for our Oracle database is 'dd-mmm-yy' without the
    time component. The default format for datatype DateTimeData is
    'dd-mmm-yyyy hh:mm:ss'. Since we did not want to change the default date
    format for the Database, we included in our service partitions an Alter
    Session statement to change the NLS_Date_format attribute in Oracle to
    conform to the Forte DateTimeData format. It worked.
    Kam Chow
    Mazda Australia
    -----Original Message-----
    From: Gary F Giger [mailto:[email protected]]
    Sent: Thursday, June 25, 1998 4:11 AM
    To: Rajeev Talwar
    Cc: [email protected]
    Subject: Re: Date Format problem...
    I was having the same problem a few weeks back when I would
    read/write
    dates to Oracle. I was using objects of type DateTimeData and I would
    occasionally get errors like you said you were. I found discovered my
    problem. Sometimes I would process a null date and would get an error.
    So to
    resolve this issue, I simply changes my objects of type DateTimeData to
    type
    DateTimeNullable. This enabled my Forte Application to handle regular
    dates
    as well as null dates. I have not gotten any oracle errors since then
    with
    regards to dates. Hope this helps.
    Rajeev Talwar wrote:
    Hi users,
    Forte version : 2.e.2 and ForteWebSDK
    Datacase : Oracle
    We have a problem with a simple HTML text field which acccepts
    a date. When we try to update the record with some date, the following
    exception occurs:
    24-Jun-1998 04:32:28 : XV01086 : Execute failed for SQL statement in
    project Rap
    tServices, class RaptSqlMethods, method updateActivity, methodId 104,
    line 51, e
    rror from database is:
    ORA-01830: date format picture ends before converting entire input
    string
    The Oracle manual says that the above exception occurs when there are
    some extra characters on that field, which is not the case. In fact,
    we raise our own exception for the cases like : o1-Apr-1997,
    01-apr-97 etc. The correct format is 01-apr-1998.
    Same date soemtimes is added to the database successfully. Waht I mean
    to say that the exception deos not occur consistently.
    We just conevert the String taken from the HTML field into a Forte
    DateTimeData Object and send it to database. May be, the conversion
    part is causing the problem. But, once again the problem is not
    consistent.
    Any ideas in this will be appreciated.
    Thanx in advance
    -Rajeev Talwar
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    Gary Giger
    Raytheon Systems Company
    300 Science Park Road
    State College, PA. 16804
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    This message has successfully passed virus checking.
    Mazda Australia takes every precaution to ensure email messages are virus free. For complete protection, you should virus test this message.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Data format problem

    Hello All
    Can anyone help me to solve this data format problem? On the top of my program, I have declare the two variables "purchasePrice" and "purchaseAmount" as double. I dont know why, the compiler still think I didnt initialize this two variables? I have printed the error message below the code.
    Thanks for your help : )
    Jen
    =============================================================================
    double purchasePrice, purchaseAmount, GPS, total_gain, amount;
    //Find the purchase stock price
         rs = stmt.executeQuery("SELECT Price FROM PORTFOLIO WHERE Username = '"+ username+"' AND Symbol = '"+strsymbol+"'");
         while (rs.next()){
              purchasePrice = rs.getDouble("Price");
    //Calculate the amount of Gain Per Share
    GPS = intask - purchasePrice;
    //Find the purchase stock amount
    rs = stmt.executeQuery("SELECT Amount FROM PORTFOLIO WHERE Username = '"+ username+"' AND Symbol = '"+strsymbol+"'");
         while (rs.next()){
              purchaseAmount = rs.getDouble("Amount");
    //Calculate the amount of Total Gain
    total_gain = amount - purchaseAmount;
    =============================================================================
    Error message:
    variable purchasePrice might not have been initialized
    [javac] GPS = intask - purchasePrice;
    [javac] ^
    variable purchaseAmount might not have been initialized
    [javac] total_gain = amount - purchaseAmount;
    [javac] ^
    [javac] 2 errors

    Instance and class variables are automatically initialized to their default values if they are not initialized explicitly, but local variables are not. They have to be initialized explicitly before they can be referenced.
    In your code:
        while (rs.next()){
            purchasePrice = rs.getDouble("Price");
        ...purchasePrice is initialized only if rs.next() returns true. purchaseAmount has the same problem. To avoid this problem, you could declare them by:
    double purchasePrice = 0;
    double purchaseAmount = 0;

  • Editable field in alv data format

    i have a editable field on ALV which is of date format and i need when user enter a date the value will be updated in the database table .
    note that i am using alv list and the field catalog is of date format dat 8
    the update is not done pleaseee helppp urgent

    Hi,
    You need to use the USER_COMMAND in the ALV function module
    {CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = gd_repid
    i_callback_user_command = 'USER_COMMAND'
    i_callback_pf_status_set = 'GUI_STAT'
    *i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    *it_special_groups = gd_tabgroup
    *it_events = it_events
    i_save = 'X'
    *is_variant = z_template
    TABLES
    t_outtab = i_final
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    then you need to write the below FORM
    *• FORM USER_COMMAND *
    *• --> U_COMM *
    *• --> RS_SELFIELD *
    FORM user_command USING u_comm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.}
    Here in the Form, Write the UPDATE statment to update the database table
    Regards
    Sudheer

  • XML Publisher to Excel Report : Date format problem

    Hi,
    I am trying to create an Excel report with XML Publisher. I have an issue with the Date Fomatting.
    In the XML template, I have set the "Date" column in date format. But the excel output report "Date" column returns as "General text" (string) and it is sorted as text, not as date.
    Can anyone please help me out?
    Thanks!!!

    Hi,
    Did this post solve your problem? I have the same issue that I need to solve.
    I have an xsl-fo template with dates in it.
    The dates are in english.
    My excel is setup to use danish.
    When I export to excel it knows the month jan, feb, mar, apr, ... which are the same in danish and english.
    But months where it differs like may (danish maj) the cell is a general text instead of date.
    Is there anyway you can set/transform the date in the xsl-fo template so it does not care about the language in excel?
    Thank you in advance.
    BR Kenneth

  • Quicken 2007 date format problem in Mavericks

    Objective: Get date format in dd/mm/yyyy format in Quicken 2007 (Lion compatible version).
    Current OS: Mavericks 10.9.4
    Hardware: Retina MacBook Pro & iMac 27" 3.2Ghz
    Problem:
    On my rMBP with Mavericks 10.9.4, I’m able to get Quicken 2007 data in dd/mm/yyyy format, as desired.
    On my new iMac (late 2013) with 10.9.4, Quicken recognises the System date formats dd/mm/yyyy (setting up a new register shows System date format) but the registers and data are all in m/d/yy.
    Quicken prefs are set to Canadian, so date formats should automatically be in dd/mm/yyyy, but aren't.
    The Quicken data file is identical on both Macs. The original file goes back to 1991, and has been through all Mac OS iterations since then.
    Pre-Lion, I remember that the workaround was to set the Language & Region to something (English / US, don’t remember which) and then change date formats. Anyway, the dd/mm/yyyy stuck, through Lion and Mavericks on my rMBP, but is causing a problem in the iMac.
    My guess is that Quicken is unable to / blocked out from accessing System date formats in Mavericks 10.9.4.
    Wondering if there’s some way to make Quicken access the Mavericks System date format, and stick to it?
    Possible approach: If some expert in these forums knows how Mavericks works under the hood, how it allows other apps access to System Prefs like date formats etc., perhaps a script or Terminal command could force Quicken 2007 to recognise and accept date formats from System Prefs (Language & Regional settings).
    I'd really appreciate the help; needless to say, the Quicken data is vital to my work.

    Hi Marlon,
    The OS Local definitions. Different countries have different date formats for their location. Check the date format of the OS CultureInfo settings.
    Regards,
    Vítor Vieira

  • Date format Problem in forms&reports Services 10g

    Hi Dears,
    I Faced a problem during running reports ( i am using forms& Reports Services 10g), when i pass the parameters via parameter form to the report (built in forms10g Rel 2.0) its appearing in arabic like (25-يناير-2010) as my Date Formate is (DD-YYYY-MON) and NLS_LANG parameter is defined as Arabic_Saudi arabia.AR8MSWIN1256 so as a result report is not running due to unknown Date formate, how can i change the Same Date format (DD-YYYY-MON) to appear in english like (25-2010-JAN)
    Thanks

    You could specify the parameter as type VARCHAR2, explicitly cast it (maybe to DD.MM.YYYY) when you pass it from forms and cast it back in your query, like TO_DATE(:P_PARAM, 'DD.MM.YYYY')

  • Date Format problem in ABAP Proxy

    Hi All,
    We have a Inbound ABAP proxy which recieves data from XI.
    We use a date field in that which is defined as DATS datatype.
    When we trigger the interface from XI with date in format YYYYMMDD, we are getting an exception.
    when the date is sent in format YYYY-MM-DD, the interface is run successfuly.
    when we test the interface in SPROXY transaction the date is displayed in YYYY-MM-DD format.
    does it have anything to do with the defenition of the date format in XI?
    I want to know whether DATS format in XI is different from ABAP?
    should the date that is sent from XI be in YYYY-MM-DD format all the time.
    Kindly suggest a solution for the date problem when it is passed from XI to ABAP proxy

    Hi Uday,
    Check the pattern used in XI/PI for the date definition.
    If it's set to:
         pattern="[0-9]-[0-9]-[0-9]"
    Then it will enforce the pattern. You could try changing the pattern in XI to exclude the hyphen then you have a normal DATS format.
    Regards, Trevor

  • Date formating Problem

    Hi Experts,
    Please guide me i am alone here.
    I Developed one BDC program For IW51.
    I want to wirite the condition for already exitting record based on the date.
    So i select the data from VIQMEL(view).
    I am getting the problem with date format, when i am selecting the data the date format coming like yymmdd,
    but the tcode updating the format is like ddmmyy. 
    please guide me how can i solve this problem.
    Please give any sample code for this scnario.
    Thanks Advance
    Edited by: krishnab121 on Feb 18, 2011 6:32 AM
    Moderator Message: Date related questions are not allowed.
    Edited by: kishan P on Feb 18, 2011 11:27 AM

    Hi,
    <<removed by moderator>>
    Close the thread if answered correctly.
    Regards,
    Saurabh
    MOderator Message: Do NOT answer basic questions. Do NOT ask the Poster to close his questions. Thats not your job and thats against the rules of the forum.
    Edited by: kishan P on Feb 18, 2011 11:28 AM

  • Date Format Problem in Custom Report

    Dear all ,
    I am generating SQL statement for the report , i am passing (param_date from ) and (param_date to) to get data from SITs , and there is tow segments in the SITs : (SIT_date from ) and (SIT_date to) also ,, getting the data from the SITs by comparing the dates for the SIT and the parameters ,,, i am facing problem in the date format , ,, could any one please help me what is the format that i can compare the between dates in the SIT and the Parameters ???
    Best Regards
    Edited by: user6781803 on Jan 3, 2010 7:28 AM

    >
    ... i am facing problem in the date format ...
    >
    What is the problem ? Pl also post full versions of your OS and EBS.
    HTH
    Srini

  • ALV Report  Format Problem

    Hi Experts
    I am writing an ALV report for the following report below , I am not getting the output in the internal table
    can anyone correct please
    regards
    Piroz
    REPORT Z_ROLE LINE-SIZE  220 LINE-COUNT 75
             NO STANDARD PAGE HEADING.
    TABLES : agr_tcodes,
             agr_users,
             tstct.
    TYPE-POOLS : slis.        
    DATA: repid LIKE sy-repid, "Report ID
    is_layout TYPE slis_layout_alv, "Layout For ALV
    it_fieldcat TYPE slis_t_fieldcat_alv, "ITAB for field
    it_events TYPE slis_t_event, "ITAB for event
    it_sub TYPE slis_layout_alv_spec1, "subtotals
    i_header TYPE slis_t_listheader, "Itab for listheader
    lt_sort TYPE slis_t_sortinfo_alv, "itab for sorting
    wa_sort LIKE LINE OF lt_sort." slis_t_sortinfo_alv.        
    DATA:  BEGIN OF itab OCCURS 0  ,
             agr_tcodes type agr_tcodes-tcode ,        " Transaction code     A
             agr_name   type agr_tcodes-agr_name,      " Role Name            B
           END OF itab .
    DATA:  BEGIN of it_disp Occurs 0 ,
             agr_tcodes type agr_tcodes-tcode ,        " Transaction code     A
             agr_name   type agr_tcodes-agr_name,      " Role Name            B
             agr_uname  type agr_users-uname,          "  Short User Name     B
             ttext      type tstct-ttext,              "  Description Name    C
             sprsl      type tstct-sprsl ,             "  Language            c
           END OF it_disp.
    *DATA: i_data TYPE TABLE OF ty_data, " internal table
    *wa_data TYPE ty_data. " work area
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: p_tcode FOR agr_tcodes-tcode OBLIGATORY, "no-extension no intervals,
                    u_name  for agr_users-uname,
                    r_name for agr_users-uname .
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    START-OF-SELECTION.
    PERFORM get_data.
    PERFORM modify_data.
    PERFORM disp_data .
    END-OF-SELECTION.
    *& Form get_data
    text
    --> p1 text
    <-- p2 text
    FORM get_data .
    select agr_tcodestcode agr_tcodesagr_name agr_usersuname  tstctttext tstct~sprsl
    into table it_disp
    from agr_tcodes
    inner join agr_users
    on agr_tcodesagr_name = agr_usersagr_name
    inner join tstct
    on agr_tcodestcode = tstcttcode
    and
    tstct~sprsl eq 'E'.
    ENDFORM. "get_data
    *& Form modify_data
    text
    --> p1 text
    <-- p2 text
    FORM modify_data .
    MOVE-CORRESPONDING itab TO it_disp.
    APPEND it_disp.
    CLEAR it_disp.
    ENDFORM. " modify_data
    *& Form Disp_data
    text
    --> p1 text
    <-- p2 text
    FORM disp_data .
    PERFORM fill_layout_structure.
    PERFORM fill_field_catalog_table.
    PERFORM alv_header USING i_header.
    PERFORM call_alv_function.
    ENDFORM. " Disp_data
    *& Form fill_layout_structure
    text
    --> p1 text
    <-- p2 text
    FORM fill_layout_structure .
    CLEAR is_layout.
    is_layout-colwidth_optimize = 'X'.
    is_layout-zebra = 'X'.
    is_layout-no_input = 'X'.
    is_layout-colwidth_optimize = 'X'.
    is_layout-totals_text = 'Totals'(201).
    is_layout-totals_only = 'X'.
    is_layout-zebra = 'X'.
    is_layout-group_change_edit = 'X'.
    is_layout-header_text = 'Wagners Users Transaction Code'.
    ENDFORM. " fill_layout_structure
    *& Form fill_field_catalog_table
    text
    --> p1 text
    <-- p2 text
    FORM fill_field_catalog_table .
    DATA : gls1(10).
    BREAK-POINT.
    PERFORM fill_field_catalog USING :
    'agr_tcode' 'Trans Code .' '10' 'IT_DISP' space space 'C11' ' ' ' ',
    'agr_name' 'Name' '40' 'IT_FINAL' space space 'C11' ' ' ' ' ,
    'agr_uname' 'Role' '60' 'IT_FINAL' space space 'C11' 'X' ' ',
    'ttext' 'Descript' '80' 'IT_FINAL' space space 'C11' ' ' ' '.
    ENDFORM. " fill_field_catalog_table
    *& Form fill_field_catalog
    text
    FORM fill_field_catalog USING f d l t s z y a b.
    DATA t_fld TYPE slis_fieldcat_alv.
    STATICS pos LIKE sy-index VALUE 0.
    pos = pos + 1. 
    CLEAR t_fld.
    MOVE 1 TO t_fld-row_pos.
    MOVE pos TO t_fld-col_pos.
    MOVE f TO t_fld-fieldname.
    MOVE d TO t_fld-seltext_m.
    MOVE l TO t_fld-outputlen.
    MOVE t TO t_fld-tabname.
    MOVE s TO t_fld-do_sum.
    MOVE z TO t_fld-no_zero.
    MOVE y TO t_fld-emphasize.
    MOVE a TO t_fld-no_out.
    MOVE b TO t_fld-no_sum.
    APPEND t_fld TO it_fieldcat.
    ENDFORM. " fill_field_catalog
    *& Form alv_header
    text
    -->P_I_HEADER text
    FORM alv_header USING p_i_header.
    DATA: wa_line TYPE slis_listheader.
    CLEAR wa_line.
    wa_line-typ = 'H'.
    wa_line-info = 'Wagners Investment'.
    APPEND wa_line TO i_header.
    ENDFORM. " alv_header
    *& Form call_alv_function
    text
    --> p1 text
    <-- p2 text
    FORM call_alv_function .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = REPID
    I_CALLBACK_PF_STATUS_SET = ' '
    IS_LAYOUT = IS_LAYOUT
    IT_FIELDCAT = IT_FIELDCAT
    TABLES
    t_outtab = IT_DISP.
    IF sy-subrc eq 0.
    ENDIF.
    ENDFORM. " call_alv_function

    Hi Venkat
    Thanks a lot for correcting and sending me the format , Now I can manage to change the other reports too.
    I have one more report which is bashing my head like anything , This is basically a fuel calculation report for managment , I want to change this too in ALV FORMAT, I did all my efforts to correct but it is looping inside as i close the report.
    Thanks in Advanced
    REPORT Z_ESLP_ZFCR1 LINE-SIZE  220 LINE-COUNT 75
             NO STANDARD PAGE HEADING.
    TABLES : equi,
    equz,
    imptt,
    imrg,
    eqkt,
    iloa.
    type-pools: slis. "ALV Declarations
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
    gd_tab_group type slis_t_sp_group_alv,
    gd_layout type slis_layout_alv,
    gd_repid like sy-repid.
    TYPES: BEGIN OF ty_data ,
    equnr type equnr, " Euipment no
    eqktx type eqkt-eqktx, " Equipment Text
    eqfnr type iloa-eqfnr, " Equipment Sort field
    idate type imrg-idate, " Measuring Date
    recdu type imrg-recdu, " Unit of measuring ='KM','L','H'
    recdv type imrg-recdv, " Counter reading data
    cancl type imrg-cancl,
    END OF ty_data.
    TYPES: BEGIN OF ty_final,
    equnr type equnr, " Equipment no
    eqktx type eqkt-eqktx, " Equipment Text
    eqfnr type iloa-eqfnr, " Equipment Sort field
    idate type imrg-idate, " Measuring Date
    min_date_km type imrg-idate, " Min Date
    min_km type P DECIMALS 2, " Max Km
    max_date_km type imrg-idate,
    max_km type P DECIMALS 2, " Min km
    t_max_min_km type P DECIMALS 2, " Total min_km-max_km
    min_date_hr type imrg-idate, " Max Date
    min_hr type P DECIMALS 2, " Max hr
    max_date_hr type imrg-idate,
    max_hr type P DECIMALS 2, " Min hr
    t_max_min_hr type P DECIMALS 2, " Total min_hr-max_hr
    min_date_lit type imrg-idate,
    min_lit type P DECIMALS 2, " Min lit
    max_date_lit type imrg-idate,
    max_lit type P DECIMALS 2, " Max lit
    fuel_con type imrg-recdv, " Total_hrs / t_max_min_hr
    fuel_con2 type P DECIMALS 2, " Total_hrs / t_max_min_hr
    km_l type P DECIMALS 2, " t max_min_km / t_max_min_lit
    l_p type P DECIMALS 2 , " t_max_min_lit / t_max_min_hr
    l_p2 type P DECIMALS 2 ,
    END OF ty_final.
    DATA: i_data TYPE TABLE OF ty_data, " internal table
    wa_data TYPE ty_data, " work area
    i_final TYPE TABLE OF ty_final, " internal table
    wa_final TYPE ty_final. " work area
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: p_equnr FOR equi-equnr OBLIGATORY, "no-extension no intervals,
    p_idate FOR imrg-idate. "NO-EXTENSION NO INTERVALS OBLIGATORY,
    "p_recdu FOR imrg-recdu." NO-EXTENSION NO INTERVALS ."default 'M3'" OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    TOP-OF-PAGE.
    FORMAT INTENSIFIED ON.
    WRITE:/55(40) ' WAGNERS INVESTMENT LIMITED '.
    WRITE:/50(40) ' VEHICLE FUEL CONSUMPTION REPORT ' CENTERED ,
    2 'Page', sy-pagno.
    FORMAT INTENSIFIED OFF.
    WRITE:/50(40) '----
    ' CENTERED .
    FORMAT INTENSIFIED ON.
    WRITE:/2 sy-datum COLOR 3, sy-uzeit .
    "WRITE:/1 S903-SPMON ."p_yearf.
    ULINE.
    "CENTERED.
    write: /2 'Equipment No :'left-justified,p_equnr-low color 2 , ' to ' , p_equnr-high color 2.
    write: /2 'Date From :', p_idate-low color 2 , ' to ' , p_idate-high color 2.
    END-OF-PAGE.
    START-OF-SELECTION.
    select aequnr deqktx feqfnr eidate erecdu erecdv
    into table i_data
    from equi AS a
    inner join equz as b
    on aequnr = bequnr
    inner join iloa as f
    on biloan = filoan
    inner join imptt as c
    on aobjnr = cmpobj
    inner join eqkt as d
    on aequnr = dequnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~cancl ne 'X'.
    loop at i_data into wa_data.
    CLEAR: wa_final.
    READ TABLE i_final into wa_final
    with key equnr = wa_data-equnr." BINARY SEARCH.
    if sy-subrc EQ 0.
    PERFORM F_GET_MAX_DATA.
    PERFORM F_GET_MAX_HOURS.
    PERFORM F_GET_MAX_LIT.
    PERFORM prepare_final_rec USING'M'. " Modify Existing Record
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    ElSE.
    PERFORM prepare_final_rec USING'A'. " Append New Record.
    ENDIF.
    ENDLOOP.
    LOOP AT i_final into wa_final.
    on change of wa_final-equnr.
    perform build_fieldcatalog.
    endon.
    uline.
    endloop.
    refresh i_final.
    clear i_final.
    FORM F_GET_MAX_DATA.
    select single MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv )
    into corresponding fields of (wa_final-max_date_km,wa_final-min_date_km,wa_final-max_km ,wa_final-min_km)
    from equi AS a
    inner join equz as b
    on aequnr = bequnr
    inner join iloa as f
    on biloan = filoan
    inner join imptt as c
    on aobjnr = cmpobj
    inner join eqkt as d
    on aequnr = dequnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate
    and
    e~cancl ne 'X' and
    e~recdu = 'KM'
    AND a~equnr = wa_data-equnr.
    ENDFORM.
    FORM F_GET_MAX_HOURS.
    select single MAX( erecdv ) MIN( erecdv )
    into corresponding fields of (wa_final-max_hr, wa_final-min_hr)
    from equi AS a
    inner join equz as b
    on aequnr = bequnr
    inner join iloa as f
    on biloan = filoan
    inner join imptt as c
    on aobjnr = cmpobj
    inner join eqkt as d
    on aequnr = dequnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate
    and
    e~cancl ne 'X' and
    e~recdu = 'H'
    AND a~equnr = wa_data-equnr .
    ENDFORM.
    FORM F_GET_MAX_LIT.
    select SUM( e~recdv )
    into corresponding fields of (wa_final-fuel_con2)
    from equi AS a
    inner join eqkt as b
    on bequnr = aequnr
    inner join imptt as c
    on cmpobj = aobjnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate
    and
    e~cancl ne 'X' and
    e~recdu = 'L'
    AND a~equnr = wa_data-equnr.
    ENDFORM.
    FORM prepare_final_rec USING p_mode TYPE char1.
    wa_final-t_max_min_km = wa_final-max_km - wa_final-min_km .
    wa_final-t_max_min_hr = wa_final-max_hr - wa_final-min_hr.
    if wa_final-t_max_min_km eq 0 .
    wa_final-km_l = ( wa_final-max_km - wa_final-min_km ) / ( wa_final-fuel_con2 ) .
    ELSE.
    wa_final-km_l = 0.
    endif.
    if wa_final-t_max_min_hr eq 0 .
    wa_final-l_p2 = ( wa_final-fuel_con2 ) / ( wa_final-t_max_min_hr ) .
    ELSE.
    wa_final-l_p2 = 0.
    endif.
    IF p_mode = 'A'.
    wa_final-equnr = wa_data-equnr.
    wa_final-eqktx = wa_data-eqktx.
    wa_final-eqfnr = wa_data-eqfnr.
    wa_final-t_max_min_km = wa_final-min_km - wa_final-max_km .
    wa_final-t_max_min_hr = wa_final-max_hr - wa_final-min_hr.
    wa_final-km_l = ( wa_final-max_km - wa_final-min_km ) / ( wa_final-fuel_con2 ).
    wa_final-l_p2 = ( wa_final-fuel_con2 ) / ( wa_final-t_max_min_hr ) .
    APPEND wa_final TO i_final .
    ELSE.
    MODIFY i_final FROM wa_final
    TRANSPORTING
    eqfnr
    max_date_km
    min_date_km
    max_date_lit
    min_date_lit
    max_date_hr
    min_date_hr
    max_km
    min_km
    max_hr
    min_hr
    t_max_min_km
    t_max_min_hr
    fuel_con2
    km_l
    l_p2
    where equnr = wa_data-equnr.
    ENDIF.
    ENDFORM. " PREPARE_FINAL_REC
    *& Form BUILD_FIELDCATALOG
    Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    I.e. Field type may be required in-order for
    the 'TOTAL' function to work.
    fieldcatalog-fieldname = 'EQUNR'.
    fieldcatalog-seltext_m = 'Equip no'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 0.
    fieldcatalog-outputlen = 10.
    fieldcatalog-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    fieldcatalog-do_sum = 'X'.
    fieldcatalog-no_zero = 'X'.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'EQKTX'.
    fieldcatalog-seltext_m = 'Description'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 1.
    fieldcatalog-outputlen = 40.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'EQFNR'.
    fieldcatalog-seltext_m = 'Sortfield'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 2.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MIN_DATE_KM'.
    fieldcatalog-seltext_m = 'Min Date'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 3.
    fieldcatalog-outputlen = 12.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MAX_DATE_KM'.
    fieldcatalog-seltext_m = 'Max Date'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 4.
    fieldcatalog-outputlen = 12.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MIN_KM' .
    fieldcatalog-seltext_m = 'Min KM'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 5.
    fieldcatalog-outputlen = 12.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MAX_KM' .
    fieldcatalog-seltext_m = 'Max KM'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 6.
    fieldcatalog-outputlen = 12.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'T_MAX_MIN_KM' .
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-seltext_m = 'Total KM'.
    fieldcatalog-col_pos = 7.
    fieldcatalog-outputlen = 12.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MIN_HR' .
    fieldcatalog-seltext_m = 'Min Hr'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 8.
    fieldcatalog-outputlen = 12.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MAX_HR' .
    fieldcatalog-seltext_m = 'Max Hr'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 9.
    fieldcatalog-outputlen = 12.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'T_MAX_MIN_HR' .
    fieldcatalog-seltext_m = 'Total HR'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 10.
    fieldcatalog-outputlen = 12.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'FUEL_CON2' .
    fieldcatalog-seltext_m = 'Fuel'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 11.
    fieldcatalog-outputlen = 12.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'KM_L' .
    fieldcatalog-seltext_m = 'Km/L'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 12.
    fieldcatalog-outputlen = 12.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'L_P2' .
    fieldcatalog-seltext_m = 'Lit/HR'.
    fieldcatalog-tabname = 'i_final'.
    fieldcatalog-col_pos = 13.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    endform. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    Build layout for ALV grid report
    form build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
    gd_layout-totals_only = 'X'.
    gd_layout-f2code = 'DISP'. "Sets fcode for when double
    "click(press f2)
    gd_layout-zebra = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text = 'helllllo'.
    endform. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    Display report using ALV grid
    form display_alv_report.
    gd_repid = sy-repid.
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
    i_callback_program = gd_repid
    i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    i_callback_user_command = 'USER_COMMAND'
    i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    it_special_groups = gd_tabgroup
    IT_EVENTS = GT_XEVENTS
    i_save = 'X'
    is_variant = z_template
    tables
    t_outtab = i_final
    exceptions
    program_error = 1
    others = 2.
    if sy-subrc eq 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    endform. " DISPLAY_ALV_REPORT

  • InputDate Column Filter Date Format Problem

    Hi,
    I have an af:table with filterable columns and some of these columns are based on Timestamp VO attributes.
    When I enter a date filter - either manually or from the associated date picker, the filter is applied correctly using a date format of dd/MM/yyyy.
    However, when the table is subsequently refreshed, the filter value is still present but has been re-formatted to "yyyy-MM-dd hh:mi:ss" format (default format for a Timestamp datatype?). The an error appears in the column filter component - "Error: The date is not in the correct format".
    If I want to retain the filter value across queries, how can this be achieved?
    My table column is defined as follows:
    <af:column sortProperty="#{bindings.ViewDataVO1.hints.LastReadingDate.name}"
                                                   filterable="true" sortable="true"
                                                   headerText="#{bindings.ViewDataVO1.hints.LastReadingDate.label}"
                                                   id="c59"
                                                   rendered='#{bindings.ViewDataVO1.hints.LastReadingDate.displayHint != "Hide"}'
                                                   displayIndex="#{bindings.ViewDataVO1.hints.LastReadingDate.displayHeight}">
                                            <f:facet name="filter">
                                                <af:inputDate value="#{vs.filterCriteria.LastReadingDate}" id="id4">
                                                    <af:convertDateTime
                                                                        pattern="#{bindings.ViewDataVO1.hints.LastReadingDate.format}"/>
                                                </af:inputDate>
                                            </f:facet>
                                            <af:outputText value="#{row.LastReadingDate}" id="ot59">
                                                <af:convertDateTime pattern="#{bindings.ViewDataVO1.hints.LastReadingDate.format}"/>
                                            </af:outputText>
                                        </af:column>I've tried messing with the properties of the af:convertDateTime component, but I'm thinking the problem is in the population of the filter facet inputDate with the vs.filterCriteria.LastReadingDate value. This does not appear to be re-formatted for display - but I don't know how to manipulate this value...
    Or is there a better way? This seems more complicated than it should be...?
    By the way, I am using JDeveloper 11.1.2.1.0 for my development.
    Thanks.

    Does it work fine if you change the pattern for convertDateTime?
    I.e
    change
    <f:facet name="filter">
                                                <af:inputDate value="#{vs.filterCriteria.LastReadingDate}" id="id4">
                                                    <af:convertDateTime
                                                                        pattern="#{bindings.ViewDataVO1.hints.LastReadingDate.format}"/>
                                                </af:inputDate>
                                            </f:facet>to
    <f:facet name="filter">
                                                <af:inputDate value="#{vs.filterCriteria.LastReadingDate}" id="id4">
                                                    <af:convertDateTime
                                                                        pattern="dd/MM/yyyy"/>
                                                </af:inputDate>
                                            </f:facet>-Arun

  • Web service date format problem

    Hi, I am using a web service from another R/3 server. Its date format is like this..
    - <xsd:simpleType name="date">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="10" />
      <xsd:pattern value="\d\d\d\d-\d\d-\d\d" />
      </xsd:restriction>
    when I created a Proxy class, the date field  length is 8.
    I write my code and tryed execution. Its not giving any result and no exceptions also.
    I think the problem is with Date field..
    Suggest me how to solve this problem.
    Regards,
    Dhanunjaya Reddy

    Hi Dhanunjaya,
    If you are calling web service from your code, then it is executing like this->
    Your Code--> Proxy---> Already existing web service
    You are making  a call to proxy, not to web service directly.
    And in proxy it is defined as type D( with length 8) which is equivalent to YYYYMMDD.
    So try passing the value  YYYYMMDD(eg 20070505) from your code.
    Regards,
    Piyush
    YYYYMMDD

  • Urgent date format problem

    Hi every one
    I have a problem with date format in my database.
    I am using Oracle8 Release 8.0.4.0.0 - Production server.
    Generally all procedures in my application runs with the date format DD-MON-YY
    I dont know suddenly what happens to this format and it changes to YYYY/DD/MM
    and all my procedures will run with the format YYYY/DD/MM then nothing happens in the database.
    Please tell me why this date change happening
    Thanks
    ...

    One possible reason :
    TEST@db102 SQL> select sysdate from dual;
    SYSDATE
    13-AUG-06
    TEST@db102 SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [ora102 ~ db102]$ export NLS_DATE_FORMAT=YYYY/MM/DD
    [ora102 ~ db102]$ sqlplus test/test
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Aug 13 12:03:19 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    TEST@db102 SQL> select sysdate from dual;
    SYSDATE
    2006/08/13
    TEST@db102 SQL>                                                                                    

  • Date format problem in excel format

    Hi,
    I am uploading the date field  from excel to program.
    My problem is in date format.
    I am gettting the date format in ddmmyyyy if it is 01012006 then my excel sheet contains the date as 1012006 i.e '0' initial zero is truncated in the excel sheet .
    Now how can i use this date in my program i.e i have to convert into date as per program requirements like dd.mm.yyyy  .How can i convert.
    Thanks and regards,
    shyla

    Hi Shyla,
    if the provided excel sheet contains date in format "20122006" the field is considered as a number format.
    In this case you can do the following select the whole column and go to format/cells. Choose the "custom" category on the Number tab and
    enter zeros in eight digits, i.e. 00000000 under "Type:".
    This should solve your problem before uploading the data into SAP.

Maybe you are looking for

  • Is FaceTime no longer working under ios 5.1.1 (iphone 4)?

    EVerytime someone tries to call me using FaceTime an I pick up, it tries to connect and then it says "FaceTime beendet" (= "Facetime cancelled"). Just like the other Person would deny the call. Same thing when I try to call someone. everything works

  • Is there a compatibility issue with the Current USB 3 external Hard drives and MacBook Pro 2011 (USB 2)?

    I am currently having bad hangs with my 13" MacBook Pro (2011) which I book 2012 ad a New external Harddrive (WD My Passport Edge) which was given to me as a gift. Friends of mine told me there is a compatibility issue between the USB 3 cord and the

  • Passing a filter through an onclick, master/detail xml

    I've been hijacked into helping out with a family history project, and I'm having trouble with a photo gallery page that needs to be filtered by family surname.  See http://www.shtetlinks.jewishgen.org/mattersburg/html/photo_gallery2.htm for work in

  • Banking Information problem with italian iban

    Hi, I have a problem with bank information for itunes connect books. When I insert ABI/CAB it's all ok but when i proceed to insert IBAN (i'm italian) and account number i receive error "Please enter a valid IBAN." WHY? my account number is long 12 a

  • How Do I remove DRM on epub?

    How Do i remove the DRM on ibooks, so i can read them on my pc. I purchased an ibook and i would like to read it, but i cant because of some ******** DRM. Whats the point of this? i purchased the book and i would like to read it on any device.