ALV Excel Output - Formatting of Columns

Hi guys,
I have a requirement to format the date column output from an alv grid to a spreadsheet.
The date in the alv is 01.01.2007 and they want this to appear as 01/01/2007 in the spreadsheet. I noticed in SE16N that this functionality exists, as the date in the spreadsheet is seperated by /.
The bespoke report is currently using the standard SAP FM REUSE_ALV_GRID_DISPLAY.
Any help would be greatly appreciated.
Many Thanks,
Philip Johannesen

Button in alv grid cell using REUSE_ALV_GRID_DISPLAY
REUSE_ALV_GRID_DISPLAY
Please give me reward points..

Similar Messages

  • Problem with Excel output format

    Hi Guys,
    I am creating a report in XML Publisher (not standalone). I am facing some problems could anyone please help me to figure out the issues.
    Is it possible to have all three output format (PDF, HTML & EXCEL) exact (same aligned) only by creating a single RTF Template? I am facing the problem with Excel output format the output format of excel is taking excels cell formatting.
    Example Numeric fields --> Right Aligned, text fields --> Left Aligned
    One more issue with excel is -ve(negative) values are getting displayed in red and in brackets like ($13) (with red color).
    Our client want excel output on priority.
    Is there any limitation for excel output format of reports?
    It is very urgent for us please help.
    Any help would be highly appreciated.
    Thanks,
    Pragati
    Edited by: user11237443 on Aug 27, 2009 1:22 AM

    Hi Mahi,
    Thanks for your response. But i could not understand how can we write wrapper program could you please give some light on this or provide some link it would be helpful for me:-)
    I have read that blog for excel limitations but i have more question?
    1) What about the negative values?
    if any field is displaying negative amount then excel not displaying right value for that:(
    2)How can we align header or data?
    Do XMLP with EBS provide any solution for formatting in excel?
    3) If for the alignment of numeric value we concatenate them with any special character then how can we perform calculation that field?
    Here are so many formatting issues do we need to write any code in xml for that?
    Please help.
    Many Thanks,
    Pragati

  • In BI Publisher Report of excel output for one column is filled with spaces

    Hello,
    We have issue in BI Publisher report of excel output.
    In Excel output for one column few records are displaying as left alignment
    and few record are displaying as right alignment.
    If you are having any xml tag or any syntax for removing spaces for left side
    Please help on this issue.
    Thanks in Advance.
    Regards,
    Swaraj

    Please post the details of the application release, database version and OS along with BI Publisher.
    Is the issue with all reports or specific one(s) only?
    Do you have the patches in the following docs applied?
    Overview of Available Update Patches for Oracle BI Publisher Enterprise 10g [ID 797057.1]
    Overview of Available Update Patches for Oracle BI Publisher Enterprise 11g [ID 1276869.1]
    Overview of Available Patches for Oracle XML Publisher embedded in the Oracle E-Business Suite [ID 1138602.1]
    BI Publisher 10g RTF Template Changes Alignment Settings for Numbered Lists [ID 1418504.1]
    Thanks,
    Hussein

  • ALV Excel export format XXL & MHTML

    Hi Experts,
    In the ALV export to Spreadsheet there are several formats to choose from. MHTML follows the screen column order (or as set in fieldcat). But XXL format moves the columns around -- columns with floating number are shifted to the very end of a row.
    Is there a way to make XXL respect the column order as set in the Field Catalog? I know MHTML format can be a workaround. But users have used XXL for most of other reports, I don't want to make an exception.
    Thank you!
    Pulau

    Hi Dan,
    no, I don't think so. MHTML is really what-you-see-is-what you get, ABAP uses it internally for the data transfer for inline excel (application running in control area) and everything is retained including sort orders, totals and subtotals and cell colors.
    I think you can get your users used to MHTML. Probably if you rename it to .xls excel will open it anyway.
    Regards,
    Clemens

  • Fixed column width in Excel output

    Hi,
    Can we fix a column width when we are viewing the report output in excel? Can we do that in RTF template?
    If the column name is too long, it is automatically inreasing width of the column...But I need the column to be of a fixed width.

    You should try Excel templates instead of RTF templates. This is the best method to control Excel output formatting like column width.did you try excel template ?
    for example for 3 nested group?
    from Re: Can XDODTEXE produce BI Publisher output?
    i tested true excel template on ebs r12.1.2 and it works only for one group and for two group the result awful it duplicate and mix data
    IMHO true excel template very limited yet

  • Issue with Excel output in BI Publisher(OBIEE 11g)

    Hi All,
    I have designed my BIP report in RTF Layout, it contains pivot table( with one column and one row and a measure column).  when i export the report in Excel output format, i have 3 issues.
    i) I have fixed the pivot table row height as 13.75 pixels in RTF Layout but when i export it into Excel output it comes with 15 pixels as row height.
    ii) In layout i have Arial 8 as font formatting, in Excel output it comes with calibri 11 (when i double click on the cell it shows Arial 8).
    iii) Pivot table has month Column which grows horizontally when i run the report ie. Jan, Feb,..Dec.In Excel it has to show each month with a single column is my requirement like
    A
    B
    C
    D
    E
    Jan
    Feb
    Mar
    Apr
    Sales Quantity
    120
    110
    150
    120
    But it shows like below, each month occupied multiple columns; it affect the report structure.
    A
    B
    C
    D
    E
    Jan
    Feb
    Sales Quantity
    120
    110
    Can anyone help me on this.
    Thanks in Advance
    Arun.

    Try using substring instead of substr. You may want to try LOGO1 and LOGO2 as texts first just to ensure that the condition is working.
    <?xdofx: if substring(OU_NAME,1,3)='MAC' then LOGO1 else LOGO2 end if?>
    Hope this helps.

  • AutoWrap in Excel Output

    Hi Experts,
    We have a requirement to build a report in Excel output format.
    The report is having 48 Columns.
    When we run the report the columns in Excel sheets get autowrap because of which we are not able to get data in required format.
    Could you all please suggest a work around.
    Client want the report to get displayed properly without columns gettning autowrap
    Thanks and Regards,
    Andy

    Hi,
    Facing the same problem , Raised an SR with oracle too.They also told it's problem with excel and they cant handle.Any inputs will be welcome regarding this.
    Kind regards,
    Mahi

  • Tab not working on ALV report output in Persona

    In normal SAP GUI we can move the cursor position on ALV report output between different column by pressing TAB on keyboard. But in case of persona 2.00, TAB doesn't work and we have to click on each cell of the report output whatever we want to highlight. Is there any settings or SAP note we can implement to so TAB will work on persona.
    Thanks,
    harkamal

    Hi Devendra Singh,
    I think it's not possible to show all field values in another Language (Eg Thai) But it's possible if it's short Text, Long Text etc
    SE63 and follow menu
    Translation
    ABAP Objects
    Short Text / Long Text Etc..
    AND
    Translation
    NON ABAP Objects
    For that also you have to maintain it first in SE63..
    [SAP Help1|http://help.sap.com/erp2005_ehp_04/helpdata/EN/77/5719d2492011d1894a0000e829fbbd/frameset.htm]
    [SAP Help2|http://help.sap.com/erp2005_ehp_04/helpdata/EN/b4/54601d77f38e429ffad9e3e11c1b25/frameset.htm]
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Opening up an Excel output takes a lot of time whenever the file size is la

    Hi All,
    We have some BI Pub reports with excel output format. These files have records in the order of thousands. The file sizes are > 2MB. Its taking a lot of time to open such files. Does anyone have any idea how can we get around this problem ??
    Thanks in advacne,
    Venkatesh N

    Another point is that BIP doesn't create a native/binary Excel file but an XML output. When you open this XML once and save it again as *.XLS it's size will decrease significantly and Excel will open it much faster.
    This applies to Excel 2000 - 2003, I don't know how it works with Office 2007.
    Regards,
    Stefan

  • Excel OutPut and Dynamically select No of Records in tabular Canvas

    Hi,
    I have Oracle foms 10g R2 I have two queries.
    1. If I select spreadsheet(Excel) output format in report the items disperse and it is not formatted as it appears during development, what is the reason and how can I fix it.
    2. I have canvas on which I am displaying multiple records(tabular canvas) but I don't want to fix the no. of record to displyed during development I want it to be dynamic based on other value, I already check SET_BLOCK_PROPERTY builtin but nothing found to be useful is it possible to set this or is there any other way to do the same job.
    Many Thanks, Khawar.

    Khawar,
    1. This is a reports question. Please post your question 1 in the Reports forum.
    2. This is not possible, but there is a workaround. See
    Dynamically setting the no of records to display!

  • ALV Report output in Excel format

    Hi ,
    I am facing a different behaviour in two computers , while trying to take an Excel format of an ALV report output. After generating the ALV output ,in one , when I click on the Excel Format button - the Excel spreadsheet opens with the output data. In the second computed , under the same action , a blank Excel sheet opens .
    Could someone tell me a solution . What aspect is responsible for this ?
    Regards ,
    Sujata

    Reduce the MACRO security settings in the Excel to Medium.
    Open an execl sheet, Chose from menu Tootls->Macro->Security.
    Chose the radio-buton medium. Close the file and all excel applications.Then try downloading again.
    Regards,
    Ravi

  • How to download alv grid output(with field catalog) into excel file format

    Hi all,
    How to download alv grid output(with field catalogs) into excel file format and same file has to download to application server.
    Please help.
    Regards,
    Satya.

    Hi,
    On list where alv is displayed, select export icon( green color -> ),select spread sheet.
    This will display records in Excel sheet.

  • How to  send ALV output data into Excel sheet format via Mail to the user?

    Hi friends,
    I have a doubt ie,
    How to  send ALV output data into Excel sheet format via Mail to the user?
    regards
    Moosa

    Hi,
    Provide the output internal table to the objbin in the below FM
    Send Message
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data              = i_docdata
                put_in_outbox              = c_x
           TABLES
                packing_list               = i_objpack
                object_header              = i_objhead
                contents_bin               = i_objbin
                contents_txt               = i_objtxt
                receivers                  = i_reclist
    and specify the document type
      i_objpack-doc_type   = 'XLS'.
    and try.
    Regards,
    Nandha

  • Download alv report output to excel format with out header line

    Hi experts,
    i want to download a alv report output into excel formatt with out the header line but it has to download including field description. as this output will fed into another transaction, the downloaded excel file should be with out header line.
    fro eg:
    Report   : Zabc                      ABAP Development          Page  :     1
    Run Date : 12/14/06                                                     System: UD400 
    Run Time : 08:45:37
    this header details should not be downloaded into the excel file.
    could somebody help me please.
    thanks
    deepu

    hi jayanti,
    thanks for your response.
    i have delclared all the field types as character but still it is not downloading and it 's sy-subrc is 4... the code is as below.
    *field names
      lt_fieldnames-value = 'Material Number'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Plant'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Material Group'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Material Description'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'UOM'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Price Unit'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Material Type'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'X-Plant Status'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Valuation Class'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = lw_avmng.
      APPEND lt_fieldnames.
      lt_fieldnames-value = lw_avntp.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Latest PO Qty'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Latest PO Cost'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'PO Creation Date'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = lw_fcaqt.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Prev. Yr. Std. Cost'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = lw_stcst.
      APPEND lt_fieldnames.
      CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
        EXPORTING
          file_name                       = 'XLSHEET'
        CREATE_PIVOT                    = 0
        DATA_SHEET_NAME                 = ' '
        PIVOT_SHEET_NAME                = ' '
        PASSWORD                        = ' '
        PASSWORD_OPTION                 = 0
        TABLES
        PIVOT_FIELD_TAB                 =
          data_tab                        = t_output1
          fieldnames                      = lt_fieldnames
        EXCEPTIONS
          file_not_exist                  = 1
          filename_expected               = 2
          communication_error             = 3
          ole_object_method_error         = 4
          ole_object_property_error       = 5
          invalid_pivot_fields            = 6
          download_problem                = 7
          OTHERS                          = 8
      IF sy-subrc <> 0.
        MESSAGE e001 WITH 'Data could not be downloaded'.
      ENDIF.
    ENDFORM.                               " z_dwn_xl
    thanks
    deepu

  • Download the ALV Report output into excel sheet or notepad

    Hi,
    how to downlaod the alv report out into excel sheet or notepad in a proper manner. program contain large number records....
    Thanks in advance!!!!
    Regards,
    kranthi.

    Hi
    Download a report to excel with format (border, color cell, etc) 
    Try this program...it may help you to change the font ..etc.
    Code:
    REPORT ZSIRI NO STANDARD PAGE HEADING.
    this report demonstrates how to send some ABAP data to an
    EXCEL sheet using OLE automation.
    INCLUDE OLE2INCL.
    handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT,        " Excel object
          H_MAPL TYPE OLE2_OBJECT,         " list of workbooks
          H_MAP TYPE OLE2_OBJECT,          " workbook
          H_ZL TYPE OLE2_OBJECT,           " cell
          H_F TYPE OLE2_OBJECT.            " font
    TABLES: SPFLI.
    DATA  H TYPE I.
    table of flights
    DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
    read flights
      SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
    display header
      ULINE (61).
      WRITE: /     SY-VLINE NO-GAP,
              (3)  'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (4)  'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (8)  'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
      ULINE /(61).
    display flights
      LOOP AT IT_SPFLI.
      WRITE: / SY-VLINE NO-GAP,
               IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
      ENDLOOP.
      ULINE /(61).
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-007
           EXCEPTIONS
                OTHERS     = 1.
    start Excel
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    PERFORM ERR_HDL.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
    CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
    PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-008
           EXCEPTIONS
                OTHERS     = 1.
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
      PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - start
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP  EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    tell user what is going on
      SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - end
    disconnect from Excel
         CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING  #1 = 'C:\SKV.XLS'.
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL.
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    FORM FILL_CELL USING I J BOLD VAL.
      CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL.
    ENDFORM.
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    FORM ERR_HDL.
    IF SY-SUBRC <> 0.
      WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
      STOP.
    ENDIF.
    ENDFORM.                    " ERR_HDL
    Please note that this example maybe slow at filling the excel table
    (perhaps four fields per second on a 900 MHz machine - almost 30 seconds
    for a short example).
    To get the data on properties and methods - there is a bit of smoke and mirrors
    going on here; they are EXCEL properties and methods, not sap ones - so you need
    to look at excel help to determine how a particular function is structured. then
    build the block in sap, as shown in the example.
    If you only want to transfer the data to Excel like when you transfer the data from
    ALV to Excel simply use the Function Modules:
    XXL_SIMPLE_API
    If you want more modifications when you transfer it to Excel use:
    XXL_FULL_API

Maybe you are looking for