Column Headings display in Uppercase as default

Is there a way i can make a newly created workbook display all column headers in uppercase, by default. Currently the column heading are in lower case and i have to go and manually change all column headings into uppercase

Well, you cannot do anything at the workbook level, that I am aware of (where want all caps for one workbook, but not all caps for another workbook).
Let me do mention this. When you create a business area, you follow a load wizard to step you through the steps to create the business area. The last step (or one of the last steps - cannot quite remember the order) is where you name the business area and give it a description. Below the Description section is a section to control how you want object names to generate. There is a Capitalize option, with the default being to capitalize the first letter of every word. I think here you could say to capitalize every letter. Since the heading default for every item in a folder is the item name, by saying to capitalize every letter for business area objects, then you would end up with all caps for your workbook headings that use this business area. The downside is that this holds true for any workbook using the business area.
For business areas that already exist, you can manually change the property, in Discoverer Administrator, for every item in the business area, one at a time. There is a heading property for each item. You would just type in the heading that you want to be the default for that item. Yes, this would be extremely tedious, but that option is available for you.
Personally, I would leave the load wizard default as is and just change any headings that I want to change when I create a workbook. If someone really wants their headings all in caps, then I would do that for that workbook. For most people I think the default works fine. But if you are sure that you always want headings in caps, then make sure you pick the right option whenver you create a new business area.
Does this make sense? Good luck.
John Dickey

Similar Messages

  • Column Headings Display

    Hi Experts,
    I am developing a Classical Report. So, for displaying the Column Headings in the output list, Is there any other alternative apart from the mentioning of the Column headings with the WRITE statement?
    ThanQ.
    Message was edited by:
            Srinivas

    text elements..
    go thru navigation.
    or else
    write: text-001. (double click on 001) and create
    yah u can get multiple lines here.
    ex.
    write: text-001,
           text-002.
    in 001 mention 'document' and in 002 'number'.
    it will display as
    documnet
    number
    hope vertical line is not possible in this method
    Message was edited by:
            Santhosh Reddy

  • Clasical Report column headings display

    Hi ABAPERS
        iam working on clasical report. in that i have to display 16 field headings.
    when executing the report, the column headers should be frozen at the top so that when the user is scrolling down, they can see what the column title is.
    how can i over come this problem.

    Hi,
    you mean the column headings should be displayed even though
    the user scrolls down the output.
    For classical reports, according to me it is not possible.
    We will be using the write statement to display the records,
    so it is static for the report.
    If you want the output what you are expecting then go for ALV's.
    Regards,
    Venkatesh

  • Still not possible (4.0 EA3) to copy displayed column headings from ref cursor output.

    Hi,
    I've created an enhancement request to allow displayed column headings from ref_cursor output to be copied.
    This is still not possible (4.0 EA3)
    The ref cursor data can be copied, but not the headings..
    See July 2012 discussion of problem in comments at
    http://www.thatjeffsmith.com/archive/2011/12/sql-developer-tip-viewing-refcursor-output/

    Hi,
    I think you're out of luck... except if you're on 11g where you can use DBMS_SQL.TO_CURSOR_NUMBER to convert the REF CURSOR to a DBMS_SQL cursor, and then benefit from the DBMS_SQL package to get column details.
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_sql.htm#CHDJDGDG

  • Changing default JTable column headings

    Hi,
    I've created a simple JTable using the following constructor:
    JTable table = new JTable ( numRows, numCols);
    and I would now like to change the default column headings ("A", "B", "C" etc) to something else. I'm trying to use the following method
    setColumnIdentifiers
    but how do I access the DefaultTableModel associated with table so that I can call this method?
    Is there another way of changing the headings of my simple table?
    Thanks a lot,
    Leori.

    myTable.getTableHeader().getColumnModel().getColumn(0).setHeaderValue("Foo");

  • Display of Column Headings in Time Tracking System

    Hi
    In Time Tracking Application, instead of displaying the Day of the week like
    MON, TUE , Wed, Thu, Fri , Sat, Sun
    iS it Possible to display along with the date like below in the column headings based on the week
    selected?
    Mon TUE WED THU FRI SAT SUN
    03 04 05 06 07 08 09
    Can any one helo me on this regard.

    Hi,
    Please check if you are created the elements for the dynamic node and corresponding attributes are set.
    if you want to display the corresponding column heading in the dynamic table you should use ResultSetMetaData, like retrieving of data from table using ResultSet.
    ResultSetMetaData rsm =(ResultSetMetaData)st.executeQuery("select * from <Table_Name");
    IWDTableColumn tabColumn1=(IWDTableColumn)view.createElement(IWDTableColumn.class,"Column1");
    IWDCaption column1Cap=(IWDCaption)view.createElement(IWDCaption.class,"column1Cap");
    nameCap.setText(rsm.getColumnName(1));
    tabColumn1.setHeader((IWDCaption)column1Cap);
    like this you can add columns to table and set column headings.
    regards
    karthik

  • How to display the column headings in Script

    Hi Experts,
    I am getting the script output like as follows.
    000001       aaaaaaa
    000002       bbbbbbb
    but I want to maintain the column headings for these like
    Material      description
    000001       aaaaaaa
    000002       bbbbbbb
    Please tell me how to maintain the headings for script ouput.
    Thanks & Regards,
    Nagaraju C.

    In the main window,
    /E    Item Header
    HD  Material,, Description
    /E   Item Line
    HD  &ITAB-MATNR&,, &ITAB-MAKTX&
    HD is the paragraph format for which you have to maintain the tabs, margins etc.,
    Thanks,
    Srinivas

  • 3.1EA1: Column Headings don't display when using SQL*Plus formatting

    The Col[umn] command doesn't show the column headings or the total lines in sqldev. This SQL command:
    -- Size per datafile
    col tablespace_name format a10 head 'Tablespace'
    col file_name format a40 head DataFileName
    col cursize form 999.99 head "CurrSize|GB"
    col maxsize form 999.99 head "MaxSize|GB"
    col Autoextensible form a4 head "Auto"
    break on tablespace_name
    compute sum label Total of cursize maxsize on tablespace_name
    select tablespace_name,
    file_name,
    bytes/1024/1024/1024 cursize,
    maxbytes/1024/1024/1024 maxsize,
    autoextensible
    from dba_data_files
    where tablespace_name = 'TS_DP'
    Looks like this in sqldev:
    TS_DP /ddawno/oradata/data01/dp_data22.dbf 1.76 1.76 YES
    TS_DP /ddawno/oradata/data01/dp_data01.dbf 1.76 1.76 YES
    22 rows selected
    But looks like this in SQLPlus:
    CurrSize MaxSize
    Tablespace DataFileName GB GB Auto
    TS_DP /ddawno/oradata/data01/dp_data22.dbf 1.76 1.76 YES
    /ddawno/oradata/data01/dp_data01.dbf 1.76 1.76 YES
    Total 36.20 31.64
    22 rows selected.
    Edited by: 893982 on Nov 1, 2011 11:09 AM Fix dashed line formatting.

    Hi, thanks for the response.
    No, I do not have "set heading off" somewhere. What I pasted into my original post is the entire script that I am running from the worksheet, and I am not using a startup script.
    Odd that the column formatting works for you, yet the list of unsupported commands that you pointed me to says that col[umn] is not supported. Help column from within sqldev contradicts that documentation, showing that col[umn] is supported, but only for the "NEW_V[ALUE] syntax."
    Wow, there's nothing like enabling the most obscure keyword just to be able to say that a function is supported. Oh, well, at least the scripts that I download from the web run now. In 3.0 they died with a hard error just because the col[umn] keyword was used.

  • How to haveour own titles/captions in selection screen & in column headings

    we have SAP B1 2005 A, MS SQL 2005
    though i am new to MSSQL/T-SQL programming, purely through lot of trials & errors i have learnt & managed to develop many reports/queries !
    but, i am facing some problems : how to have our own captions/title for the options in selection screen & aso in reports/queries column headings.
    e.g. :
    for Customer Aging analysis, i would like to accept a set of 3 parameters (aging days) from the user. where the user may enter the values 30, 60 & 90 OR any other values.
    i have the following codes for this purpose (considering my question's (over) size, only small portions of my program are given below)
    declare @mdue1 int,
               @mdue2 int,
                @mdue3 int
    set @mdue1 = [%1]
    set @mdue2 = [%2]
    set @mdue3 = [%3]
    but, in the selection screen, the system displays "%1 Debit Amount   Greater than" as the caption & 0.00 as the default value. the same is the case for the other two parameters [%2] & [%3] also.
    i tried defining the variable @mdue1 as smallint & also tinyint, but the result is the same.
    how to have our own captions/title for the options in selection screen instead of the ones displayed by t-sql based on our SELECT statement.
    how to have our own column headings, dynamically defined/coined using variables instead of hard coded columns headings (within quotes).
    e.g. in the select statement, instead of defining a column as '<= 30 Days' = T0.due_1
    i would like to get the number of days from the user, who may enter 30 or 40 or whatever.
    i would like to display the value that the user entered in the column heading using a variable say @mcol1
    declare @mcol1 varchar(10)
    set @mcol1 = '<= 'convert(varchar(10), @mdue1)' Days'
    SELECT T0.CardCode,@mcol1 = T0.due_1 from #CustAging T0
    but, this ends up in error.
    i have already searched the net for ebooks, articles, etc. for a solution to this problem, but till now, i could not find any addressing these problems.
    i have just registered in this forum with a hope to get a solution. thanks a lot in advance.
    Thanks & Regards,
    Raghu Iyer
    Place : Vapi, Gujarat, India

    thanks a lot, lstvan.
    i think, it i a good "trick" worth trying out.
    well, i will now mark this question as answered, but still, if anyone has a direct solution "problem", please do share with us.
    i am able to write queries (in fact, full fledged programs) in T-SQL & getting the desired output and for such a trivial thing i do not want to go for an add-on SDK module. but, considering the limitations of T-SQL and the complex requirements of real business world, i think, we have to go the .net way only.
    regarding add-ons, i heard that add-ons will slow down SAP B1. is it true ?
    Thanks & Regards,
    Raghu iyer

  • How to download output data into Excel with all Column Headings

    Hi Experts,
    Please tell me How to download output data of ALV Grid into Excel file with all Column Headings and I want to do this using coding,
    please send me if any solution is available.
    Thanks & Regards,
    Yogesh

    VERSION CONTROL (Most recent on top):                                *
      DATE(mm.dd.yyyy)    AUTHOR                                         *
      06.25.2007         Pattan Naveen                                   *
    Hi yogesh,,
    Go through this in this u find ur solution.
    report ZTEst_programe no standard page heading
                               line-size 100
                               line-count 50(5)
                               message-id zz.
    *--alv type declaration
    type-pools: slis.
    *--Tables:
    tables: anla,
            anlz,
            anlh,
            anlb,
            anlc.
    data: v_pos type i.
    data: v_ndjar type i.
    data: v_ndper type i,
          v_ndperndabp type i,
          v_ndjarndabp1 type i,
          v_ndjarndabp type i,
          value type i,
    date(10) type c value '2006.12.04'.
    data: c_0000(4) type c value '0000'.
    data: begin of it_final occurs 0,
             anlkl(8),
             bukrs(4),
             anln1 like anla-anln1,
             anln2 like anla-anln2,
             txt50 like anla-txt50,
             txa50 like anla-txa50,
             anlhtxt like anlh-anlhtxt,
             sernr like anla-sernr,
             invnr like anla-invnr,
             menge like anla-menge,
             meins like anla-meins,
             inken like anla-inken,
               ivdat like anla-ivdat,
             aktiv like anla-aktiv,
             gsber like anlz-gsber,
             kostl like anlz-kostl,
             kostlv like anlz-kostlv,
             werks like anlz-werks,
             stort like anlz-stort,
              raumn like anlz-raumn,
              txjcd like anlz-txjcd,
             ord41 like anla-ord41,
             ord44 like anla-ord44,
             gdlgrp like anla-gdlgrp,
             anlue like anla-anlue,
             lifnr like anla-lifnr,
             typbz like anla-typbz,
             aibn1 like anla-aibn1,
          aibn2 like anla-aibn2,
            aibdt like anla-aibdt,
             posnr like anla-posnr,
            vmgli like anla-vmgli,
            invzu like anla-invzu,
            ernam like anla-ernam,
            erdat like anla-erdat,
             afabe like anlb-afabe,
            afasl like anlb-afasl,
             ndjar like anlb-ndjar,
             ndper like anlb-ndper,
            afabg like anlb-afabg,
            ndabj like anlc-ndabj,
            ndabp like anlc-ndabp,
            andsj like anlc-andsj,
             andsp like anlc-andsp,
            safbg like anlb-safbg,
             umjar like anlb-umjar,
           inbda like anlb-inbda,
           kansw like anlc-kansw,
           knafa like anlc-knafa,
            kaafa like anlc-kaafa,
                     deakt like anla-deakt,
    kanza like anlc-kanza,
    kaufw like anlc-kaufw,
    kinvz like anlc-kinvz,
    ksafa like anlc-ksafa,
    kmafa like anlc-kmafa,
      end of it_final.
    data: begin of it_final_as91 occurs 0,
             anlkl(8),
             bukrs(4),
             anln1 like anla-anln1,
             anln2 like anla-anln2,
             txt50 like anla-txt50,
             txa50 like anla-txa50,
             anlhtxt like anlh-anlhtxt,
             sernr like anla-sernr,
             invnr like anla-invnr,
             menge like anla-menge,
             meins like anla-meins,
             inken like anla-inken,
             ivdat like anla-ivdat,
             aktiv like anla-aktiv,
             gsber like anlz-gsber,
             kostl like anlz-kostl,
             kostlv like anlz-kostlv,
             werks like anlz-werks,
             stort like anlz-stort,
             raumn like anlz-raumn,
             txjcd like anlz-txjcd,
             ord41 like anla-ord41,
             ord44 like anla-ord44,
             gdlgrp like anla-gdlgrp,
             anlue like anla-anlue,
             lifnr(10),
             typbz(15),
             aibn1 like anla-aibn1,
             aibn2 like anla-aibn2,
            aibdt like anla-aibdt,
             posnr like anla-posnr,
            vmgli like anla-vmgli,
            invzu like anla-invzu,
            ernam like anla-ernam,
            erdat like anla-erdat,
    end of it_final_as91.
    data: it_download_as91 like it_final_as91 occurs 0
                                              with header line."#EC NEEDED
    data: begin of it_final_as92 occurs 0,
             anlkl(8),
             bukrs(4),
             anln1 like anla-anln1,
             anln2 like anla-anln2,
             deakt like anla-deakt,
             ernam like anla-ernam,
             erdat like anla-erdat,
             afabe like anlb-afabe,
             afasl like anlb-afasl,
             ndjar like anlb-ndjar,
             ndper like anlb-ndper,
              afabg like date,
             ndabj(3) type c,
             ndabp(3) type c,
            kansw like anlc-kansw,
           knafa like anlc-knafa,
            kaafa like anlc-kaafa,
    kanza like anlc-kanza,
    kaufw like anlc-kaufw,
    kinvz like anlc-kinvz,
    ksafa like anlc-ksafa,
    kmafa like anlc-kmafa,
      end of it_final_as92.
    data: it_download_as92 like it_final_as92 occurs 0
                                              with header line."#EC NEEDED
    data: begin of it_values occurs 0,
             anlkl(8),
             bukrs(4),
             anln1 like anla-anln1,
             anln2 like anla-anln2,
             deakt like anla-deakt,
             afabe like anlb-afabe,
            afasl like anlb-afasl,
             ndjar like anlb-ndjar,
             ndper like anlb-ndper,
             afabg like date,
             ndabj(3) type c,
             ndabp(3) type c,
             afabe_02 like anlb-afabe,
             afasl_02 like anlb-afasl,
             ndjar_02 like anlb-ndjar,
             ndper_02 like anlb-ndper,
              afabg_02 like date,
             ndabj_02 like anlc-ndabj,
             ndabp_02 like anlc-ndabp,
            kansw01 like anlc-kansw,
           knafa01 like anlc-knafa,
            kaafa01 like anlc-kaafa,
              kansw02 like anlc-kansw,
           knafa02 like anlc-knafa,
            kaafa02 like anlc-kaafa,
              kansw03 like anlc-kansw,
           knafa03 like anlc-knafa,
            kaafa03 like anlc-kaafa,
              kansw04 like anlc-kansw,
           knafa04 like anlc-knafa,
            kaafa04 like anlc-kaafa,
              kansw05 like anlc-kansw,
           knafa05 like anlc-knafa,
            kaafa05 like anlc-kaafa,
           kansw06 like anlc-kansw,
           knafa06 like anlc-knafa,
           kaafa06 like anlc-kaafa,
           kansw07 like anlc-kansw,
           knafa07 like anlc-knafa,
           kaafa07 like anlc-kaafa,
           kansw08 like anlc-kansw,
           knafa08 like anlc-knafa,
           kaafa08 like anlc-kaafa,
           kansw09 like anlc-kansw,
           knafa09 like anlc-knafa,
           kaafa09 like anlc-kaafa,
    kanza01 like anlc-kanza,
    kaufw01 like anlc-kaufw,
    kinvz01 like anlc-kinvz,
    ksafa01 like anlc-ksafa,
    kmafa01 like anlc-kmafa,
      end of it_values.
    data: it_values_xls like it_values occurs 0
                                       with header line."#EC NEEDED
    data: begin of it_itab1 occurs 0,
           bukrs like anla-bukrs,
           anlkl like anla-anlkl,
           anln1 like anla-anln1,
             anln2 like anla-anln2,
           txt50 like anla-txt50,
           txa50 like anla-txa50,
           invnr like anla-invnr,
           ktogr like anla-ktogr,
           sernr like anla-sernr,
           menge like anla-menge,
           meins like anla-meins,
           ivdat like anla-ivdat,
           inken like anla-inken,
           aktiv like anla-aktiv,
           deakt like anla-deakt,
           zugdt like anla-zugdt,
           zujhr like anla-zujhr,
           zuper like anla-zuper,
           gdlgrp like anla-gdlgrp,
           anlue like anla-anlue,
           xafabch like anla-xafabch,
           aibn1 like anla-aibn1,
           aibn2 like anla-aibn2,
           aibdt like anla-aibdt,
           posnr like anla-posnr,
           ord41 like anla-ord41,
            ord44 like anla-ord44,
            vmgli like anla-vmgli,
             invzu like anla-invzu,
             typbz like anla-typbz,
             lifnr like anla-lifnr,
             ernam like anla-ernam,
             erdat like anla-erdat,
          end of it_itab1.
    data: begin of it_itab2 occurs 0,
            bukrs like anlz-bukrs,
            anln1 like anlz-anln1,
             anln2 like anla-anln2,
            bdatu like anlz-bdatu,
            werks like anlz-werks,
            gsber like anlz-gsber,
            kostl like anlz-kostl,
            kostlv like anlz-kostlv,
            stort like anlz-stort,
            raumn like anlz-raumn,
            txjcd like anlz-txjcd,
            ipsnr like anlz-ipsnr,
          end of it_itab2.
    data: begin of it_itab3 occurs 0,
            bukrs like anlh-bukrs,
            anln1 like anlh-anln1,
            anlhtxt like anlh-anlhtxt,
           end of it_itab3.
    data: begin of it_itab4 occurs 0,
            bukrs like anlb-bukrs,
            anln1 like anlb-anln1,
             anln2 like anla-anln2,
            afabe like anlb-afabe,
            bdatu like anlb-bdatu,
            afasl like anlb-afasl,
            ndjar like anlb-ndjar,
            ndper like anlb-ndper,
            afabg like anlb-afabg,
            ndurj like anlb-ndurj,
            ndurp like anlb-ndurp,
            umjar like anlb-umjar,
            safbg like anlb-safbg,
            zinbg like anlb-zinbg,
            inbda like anlb-inbda,
            end of it_itab4.
    data: begin of it_itab5 occurs 0,
           bukrs like anlc-bukrs,
           anln1 like anlc-anln1,
             anln2 like anla-anln2,
           gjahr like anlc-gjahr,
           afabe like anlc-afabe,
           zujhr like anlc-zujhr,
           zucod like anlc-zucod,
           ndabj like anlc-ndabj,
           ndabp like anlc-ndabp,
           kansw like anlc-kansw,
           knafa like anlc-knafa,
           kaafa like anlc-kaafa,
           ksafa like anlc-ksafa,
           andsj like anlc-andsj,
           andsp like anlc-andsp,
    kanza like anlc-kanza,
    kaufw like anlc-kaufw,
    kinvz like anlc-kinvz,
    kmafa like anlc-kmafa,
          end of it_itab5.
    ALV DECLARATIONS
    *--declarations for Xls sheet header field names
    data: begin of it_head occurs 0,
    column(70).
    data: end of it_head.
    data: begin of it_head1 occurs 0,
    column(70).
    data: end of it_head1.
    *--type declarations for field catalog for basic report
    data: it_fldcat_head  type slis_t_fieldcat_alv,
          wa_fldcat_head type slis_fieldcat_alv."#EC NEEDED
    data : w_field type slis_fieldcat_alv."#EC NEEDED
    data: it_fldcat_head1  type slis_t_fieldcat_alv,
          wa_fldcat_head1 type slis_fieldcat_alv."#EC NEEDED
    *--type declarations for layout design
    data: wa_layout type slis_layout_alv.
    *--type declarations for list header on grid
    *data: top_of_page type slis_t_listheader.
    *--declaration of variables
    data : w_repid like sy-repid.
    **selection-screen
    select-options: s_bukrs for anla-bukrs,
                    s_anln1 for anla-anln1.
    select-options: s_deakt for anla-deakt,
                    s_gjahr for anlc-gjahr obligatory,
                    s_anlkl for anla-anlkl,
                    s_date for anla-aktiv.
    *selection-screen
    selection-screen begin of block blk1 with frame title  text-022.
    selection-screen begin of line.
    parameters : r1 radiobutton group g1 default 'X'.
    selection-screen comment 20(50) text-020.
    selection-screen end of line.
    selection-screen begin of line.
    parameters : r2 radiobutton group g1.
    selection-screen comment 20(50) text-021.
    selection-screen end of line.
    selection-screen end of block blk1.
    selection-screen begin of block blk2 with frame title  text-023.
    select-options: s_ernam for anla-ernam,
                       s_erdat for anla-erdat .
    selection-screen end of block blk2.
    *--INITIALIZATION
    initialization.
      w_repid = sy-repid.
    at selection-screen.
      if r1 = 'X'.
        perform selection_screen_validation.
      endif.
      if r2 = 'X'.
        perform selection_screen_validation.
      endif.
    *--START-OF-SELCTION
    start-of-selection.
      if r1 = 'X'.
        perform populate-data.
        perform fill_finaldata.
       perform comment_build using top_of_page.
        perform xls_output.
        perform download.
      endif.
      if r2 = 'X'.
        perform populate-data.
        perform fill_finaldata.
        perform fill_as92data.
        perform putdata_horizontal.
        perform xls_output_as92.
        perform download_as92.
      endif.
    *--END-OF-SELCTION
    end-of-selection.
      if r1 = 'X'.
        perform build_layout.
        perform build_fieldcatalog.
       perform top_of_page.
        perform list-display.
      endif.
      if r2 = 'X'.
        perform build_layout.
        perform build_fieldcatalog1.
        perform list-display1.
      endif.
    *&      Form  SELECTION_SCREEN_VALIDATION
          text
    -->  p1        text
    <--  p2        text
    form selection_screen_validation.
    *--validating originating company code
      data: l_bukrs like anla-bukrs."#EC NEEDED
      if not s_bukrs[] is initial.
        select single bukrs from anla
               into l_bukrs
               where bukrs in s_bukrs.
        if sy-subrc <> 0.
          message e000 with text-001 .
        endif.
      endif.
    *--validating originating main asset no.
      data: l_anln1 like anla-anln1."#EC NEEDED
      if not s_anln1[] is initial.
        select single anln1 from anla
               into l_anln1
               where anln1 in s_anln1.
        if sy-subrc <> 0.
          message e000 with text-002 .
        endif.
      endif.
    *--validating originating Deactivation date
      data: l_deakt like anla-deakt."#EC NEEDED
      if not s_deakt[] is initial.
        select single deakt from anla
               into l_deakt
               where deakt in s_deakt.
        if sy-subrc <> 0.
          message e000 with text-004 .
        endif.
      endif.
    *--validating originating asset class.
      data: l_anlkl like anla-anlkl."#EC NEEDED
      if not s_anlkl[] is initial.
        select single anlkl from anla
               into l_anlkl
               where anlkl in s_anlkl.
        if sy-subrc <> 0.
          message e000 with text-006 .
        endif.
      endif.
    *--validating originating Date
      data: l_date like anla-aktiv."#EC NEEDED
      if not s_date[] is initial.
        select single aktiv from anla
               into l_date
               where aktiv in s_date.
        if sy-subrc <> 0.
          message e000 with text-007 .
        endif.
      endif.
    *--validating originating Fiscal year which first acquisition was posted
      data: l_gjahr like anlc-gjahr."#EC NEEDED
      if not s_gjahr[] is initial.
        select single gjahr from anlc
               into l_gjahr
               where gjahr in s_gjahr.
        if sy-subrc <> 0.
          message e000 with text-008.
        endif.
      endif.
      data: l_ernam like anla-ernam."#EC NEEDED
      if not s_ernam[] is initial.
        select single ernam from anla
               into l_ernam
               where ernam in s_ernam.
        if sy-subrc <> 0.
          message e000 with text-009.
        endif.
      endif.
      data: l_erdat like anla-erdat."#EC NEEDED
      if not s_erdat[] is initial.
        select single erdat from anla
               into l_erdat
               where erdat in s_erdat.
        if sy-subrc <> 0.
          message e000 with text-010.
        endif.
      endif.
    endform.                    " SELECTION_SCREEN_VALIDATION
    *&      Form  POPULATE-DATA
          text
    -->  p1        text
    <--  p2        text
    form populate-data.
      select bukrs
             anlkl
             anln1
             anln2
             txt50
             txa50
             invnr
             ktogr
             sernr
             menge
             meins
             ivdat
             inken
             aktiv
             deakt
             zugdt
             zujhr
             zuper
             gdlgrp
             anlue
             xafabch
             aibn1
             aibn2
             aibdt
             posnr
             ord41
             ord44
             vmgli
             invzu
             typbz
             lifnr
             ernam
             erdat
            from anla
                into table it_itab1
                where anlkl in s_anlkl and
                      anln1 in s_anln1 and
                      deakt in s_deakt and
                      bukrs in s_bukrs and
                      aktiv in s_date.
      if sy-subrc ne 0.
        message e000 with 'Data does not exist'(094).
      endif.
      if not it_itab1[] is initial.
        select bukrs
               anln1
               anln2
               bdatu
               werks
               gsber
               kostl
               kostlv
               stort
               raumn
               txjcd
               ipsnr
               from anlz
               into table it_itab2
               for all entries in it_itab1
               where bukrs = it_itab1-bukrs and
                     anln1 = it_itab1-anln1 and
                    anln2 = it_itab1-anln2.
                      anln2 = '0000'.
        if sy-subrc ne 0.
          message e000 with 'Data does not exist'(094).
        endif.
      endif.
      if not it_itab2[] is initial.
        select bukrs
               anln1
               anlhtxt
               from anlh
               into table it_itab3
        for all entries in it_itab2
        where bukrs = it_itab2-bukrs and
              anln1 = it_itab2-anln1.
        if sy-subrc ne 0.
          message e000 with 'Data does not exist'(094).
        endif.
      endif.
      if not it_itab1[] is initial.
        select bukrs
        anln1
        anln2
        afabe
        bdatu
        afasl
        ndjar
        ndper
        afabg
        ndurj
        ndurp
        umjar
        safbg
        zinbg
        inbda
        from anlb
        into table it_itab4
        for all entries in it_itab1
        where bukrs = it_itab1-bukrs and
              anln1 = it_itab1-anln1 and
             anln2 = it_itab1-anln2.
               anln2 = '0000'.
        if sy-subrc ne 0.
          message e000 with 'Data does not exist'(094).
        endif.
      endif.
      sort it_itab4  by bukrs anln1 anln2 afabe.
      if not it_itab4[] is initial.
        select bukrs
              anln1
              anln2
             gjahr
            afabe
            zujhr
            zucod
             ndabj
             ndabp
             kansw
             knafa
             kaafa
             ksafa
             andsj
             andsp
             kanza
    kaufw
    kinvz
    kmafa
             from anlc
             into table it_itab5
             for all entries in it_itab4
             where bukrs = it_itab4-bukrs and
                anln1 = it_itab4-anln1 and
               anln2 = it_itab4-anln2 and
                anln2 = '0000' and
                gjahr in s_gjahr.
        if sy-subrc ne 0.
          message e000 with 'Data does not exist'(094).
        endif.
      endif.
      sort it_itab5 by bukrs anln1 anln2 ndabj ndabp.
    endform.                    " POPULATE-DATA
    *&      Form  FILL_FINALDATA
          text
    -->  p1        text
    <--  p2        text
    form fill_finaldata.
      loop at it_itab5.
        loop at it_itab4 where bukrs = it_itab5-bukrs and
                            anln1 = it_itab5-anln1 and
                            anln2 = it_itab5-anln2 and
                            afabe = it_itab5-afabe.
          it_final-afabe = it_itab4-afabe.
          it_final-afasl = it_itab4-afasl.
          it_final-ndjar = it_itab4-ndjar.
          it_final-ndper = it_itab4-ndper.
          it_final-afabg = it_itab4-afabg.
          it_final-umjar = it_itab4-umjar.
          it_final-safbg = it_itab4-safbg.
          it_final-inbda = it_itab4-inbda.
          it_final-ndabj = it_itab5-ndabj.
          it_final-ndabp = it_itab5-ndabp.
          it_final-kansw = it_itab5-kansw.
          it_final-knafa = it_itab5-knafa.
          it_final-kaafa = it_itab5-kaafa.
          it_final-andsj = it_itab5-andsj.
          it_final-andsp = it_itab5-andsp.
          it_final-kanza = it_itab5-kanza.
          it_final-kaufw = it_itab5-kaufw.
          it_final-kinvz = it_itab5-kinvz.
          it_final-ksafa = it_itab5-ksafa.
          it_final-kmafa = it_itab5-kmafa.
          read table it_itab1 with key   bukrs = it_itab5-bukrs
                                      anln1 = it_itab5-anln1
                                      anln2 = it_itab5-anln2.
          if sy-subrc = 0.
            it_final-anlkl = it_itab1-anlkl.
            it_final-anln1 = it_itab1-anln1.
            it_final-anln2 = it_itab1-anln2.
            it_final-bukrs = it_itab1-bukrs.
            it_final-txt50 = it_itab1-txt50.
            it_final-txa50 = it_itab1-txa50.
            it_final-invnr = it_itab1-invnr.
            it_final-sernr = it_itab1-sernr.
            it_final-menge = it_itab1-menge.
            it_final-meins = it_itab1-meins.
            it_final-ivdat = it_itab1-ivdat.
            it_final-inken = it_itab1-inken.
            it_final-aktiv = it_itab1-aktiv.
            it_final-deakt = it_itab1-deakt.
            it_final-gdlgrp = it_itab1-gdlgrp.
            it_final-anlue = it_itab1-anlue.
            it_final-aibn1 = it_itab1-aibn1.
            it_final-aibn2 = it_itab1-aibn2.
            it_final-aibdt = it_itab1-aibdt.
            it_final-ord41 = it_itab1-ord41.
            it_final-ord44 = it_itab1-ord44.
            it_final-vmgli = it_itab1-vmgli.
            it_final-typbz = it_itab1-typbz.
            it_final-lifnr = it_itab1-lifnr.
            it_final-posnr = it_itab1-posnr.
            it_final-invzu = it_itab1-invzu.
          endif.
          read table it_itab2 with key   bukrs = it_itab5-bukrs
                                    anln1 = it_itab5-anln1
                                    anln2 = it_itab5-anln2.
          if sy-subrc = 0.
            it_final-werks = it_itab2-werks.
            it_final-gsber = it_itab2-gsber.
            it_final-kostl = it_itab2-kostl.
            it_final-kostlv = it_itab2-kostlv.
            it_final-stort = it_itab2-stort.
            it_final-raumn = it_itab2-raumn.
            it_final-txjcd = it_itab2-txjcd.
          endif.
          read table it_itab3 with key  bukrs = it_itab5-bukrs
                                     anln1 = it_itab5-anln1.
          if sy-subrc = 0.
            it_final-anlhtxt = it_itab3-anlhtxt.
          endif.
          append it_final.
          clear it_final.
        endloop.
      endloop.
      loop at it_final.
        move-corresponding it_final to it_final_as91.
        append it_final_as91.
        clear it_final_as91.
      endloop.
      delete adjacent duplicates from it_final_as91 comparing anlkl bukrs
      anln1 anln2.
      it_download_as91[] = it_final_as91[].
    endform.                    " FILL_FINALDATA
    *&      Form  BUILD_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    form build_layout.
      wa_layout-zebra = 'X'.
    endform.                    " BUILD_LAYOUT
    *&      Form  BUILD_FIELDCATALOG
          text
    -->  p1        text
    <--  p2        text
    form build_fieldcatalog.
      if it_fldcat_head is initial.
        v_pos = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'ANLKL'.
        wa_fldcat_head-seltext_l = 'Asset Class'(093).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'BUKRS'.
        wa_fldcat_head-seltext_l = 'Company'(092).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'ANLN1'.
        wa_fldcat_head-seltext_l = 'Asset No'(091).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'ANLN2'.
        wa_fldcat_head-seltext_l = 'Asset Sub No'(090).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'TXT50'.
        wa_fldcat_head-seltext_l = 'Asset Des.'(089).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'TXA50'.
        wa_fldcat_head-seltext_l = 'Asset Des.'(088).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'ANLHTXT'.
        wa_fldcat_head-seltext_l = 'Asset main no txt'(087).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'SERNR'.
        wa_fldcat_head-seltext_l = 's.no/Expl no.'(086).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'INVNR'.
        wa_fldcat_head-seltext_l = 'Inv No'(085).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'MENGE'.
        wa_fldcat_head-seltext_l = 'Qtty'(084).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'MEINS'.
        wa_fldcat_head-seltext_l = 'Units'(083).
        append wa_fldcat_head to it_fldcat_head.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'INKEN'.
        wa_fldcat_head-seltext_l = 'Inv indi.'(082).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'IVDAT'.
        wa_fldcat_head-seltext_l = 'Last inv date'(081).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'AKTIV'.
        wa_fldcat_head-seltext_l = 'Asset Capital date'(080).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'GSBER'.
        wa_fldcat_head-seltext_l = 'Busin. Area'(079).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'KOSTL'.
        wa_fldcat_head-seltext_l = 'cost centre'(078).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'KOSTLV'.
        wa_fldcat_head-seltext_l = 'CC respon.for asset'(077).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'WERKS'.
        wa_fldcat_head-seltext_l = 'Plant'(076).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'STORT'.
        wa_fldcat_head-seltext_l = 'Asset location'(075).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'RAUMN'.
        wa_fldcat_head-seltext_l = 'Room'(074).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'TXJCD'.
        wa_fldcat_head-seltext_l = 'Tax. Jur.'(073).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'ORD41'.
        wa_fldcat_head-seltext_l = 'Evaluation Grp 1'(072).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'ORD44'.
        wa_fldcat_head-seltext_l = 'Evaluation Grp 4'(071).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'GDLGRP'.
        wa_fldcat_head-seltext_l = 'Evalu. group 5'(070).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'ANLUE'.
        wa_fldcat_head-seltext_l = 'Asset Super No'(069).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'LIFNR'.
        wa_fldcat_head-seltext_l = 'Vendor Acct. No.'(068).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'TYPBZ'.
        wa_fldcat_head-seltext_l = 'Reference no'(067).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'AIBN1'.
        wa_fldcat_head-seltext_l = 'Original Asset Trans.'(066).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'AIBN2'.
        wa_fldcat_head-seltext_l = 'Original Asset Trans.'(065).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'AIBDT'.
        wa_fldcat_head-seltext_l = 'Trans. Asset'(064).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'POSNR'.
        wa_fldcat_head-seltext_l = 'WBS Elt. Invt. Proj.'(063).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'VMGLI'.
        wa_fldcat_head-seltext_l = 'Property clas.key'(062).
        append wa_fldcat_head to it_fldcat_head.
       V_POS = 0.
        v_pos = v_pos + 1.
        w_field-col_pos = v_pos.
        wa_fldcat_head-tabname = 'it_FINAL_AS91'.
        wa_fldcat_head-fieldname = 'INVZU'.
        wa_fldcat_head-seltext_l = 'suppl.inv spec.'(061).
        append wa_fldcat_head to it_fldcat_head.
      endif.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  COMMENT_BUILD
          text
         -->P_TOP_OF_PAGE  text
    *form comment_build using top_of_page type slis_t_listheader.
    data: ls_line type slis_listheader.
    ****Header
    clear : ls_line.
    ls_line-typ = 'H'.
    LS_LINE-KEY: not used for this type
    ls_line-info = 'ASSET MASTER DATA LIST'.
    append ls_line to top_of_page.
    ****Selection
    clear ls_line.
    ls_line-typ = 'S'.
    ls_line-key = 'Key 1'.
    ls_line-info = 'Asset Records'.
    append ls_line to top_of_page.
    ****Action
    clear ls_line.
    ls_line-typ = 'A'.
    LS_LINE-KEY: not used for this type
    ls_line-info = 'for AS91'.
    append ls_line to top_of_page.
    *endform. "comment_build
          FORM top_of_page                                              *
    *form top_of_page.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
          exporting
               i_logo             = 'ENJOYSAP_LOGO'
               it_list_commentary = top_of_page.
    *endform. "top_of_page
    *&      Form  LIST-DISPLAY
          text
    -->  p1        text
    <--  p2        text
    form list-display.
    wa_layout-colwidth_optimize = 'X'.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program     = w_repid
               i_callback_top_of_page = 'TOP_OF_PAGE'
                is_layout              = wa_layout
                it_fieldcat            = it_fldcat_head
               i_background_id        = 'ALV_BACKGROUND'
           tables
                t_outtab               = it_final_as91
           exceptions
                program_error          = 1
                others                 = 2.
      if sy-subrc <> 0.
    write:/'No Top of Page'(098).
      endif.
    endform.                    " LIST-DISPLAY
    *&      Form  DOWNLOAD
          text
    -->  p1        text
    <--  p2        text
    form download.
      perform setup_header.
      call function 'DOWNLOAD'
           exporting
                filetype                = 'DAT'
           tables
                data_tab                = it_download_as91
                fieldnames              = it_head
           exceptions
                invalid_filesize        = 1
                invalid_table_width     = 2
                invalid_type            = 3
                no_batch                = 4
                unknown_error           = 5
                gui_refuse_filetransfer = 6
                customer_error          = 7
                others                  = 8.
      if sy-subrc <> 0.
    write:/'Error in file Type'(097).
      endif.
    endform.                    " DOWNLOAD
    *&      Form  setup_header
          text

  • Column headings are missing in the output for ALV?

    Hi all,
    i have coded a small report in ALV mode. i am getting the data but the column headings are missing.
    iam not getting the column headings in the output. it is coming as blank. Could you all please help me out in this?
    below is the code of my program:
                     Includes                                            *
    *---Standard header and footer routines
    INCLUDE zsrepthd.
    *--- ALV Routines
    INCLUDE zvsdi_alv_routines_ver3.
    *--- Authorization Check
    INCLUDE z_selection_auth_check.
                     Types Declarations                                  *
    tables : ekpo.
                     Types Declarations                                  *
    TYPES: BEGIN OF ty_ekpo,
            EBELN(18) TYPE C,
            EBELP(20) TYPE C,
            MATNR(18) TYPE C,
            WERKS(11) TYPE C,
          END OF ty_ekpo.
    *-Output field name
    TYPES: BEGIN OF ty_output,
            EBELN(18) TYPE C,
            EBELP(20) TYPE C,
            MATNR(18) TYPE C,
            WERKS(11) TYPE C,
          END OF ty_output.
    *-Output field name
    TYPES: BEGIN OF ty_fields,
            fname(60) TYPE c,
           END OF ty_fields.
                     Internal Table Declarations                         *
    DATA:it_ekpo TYPE STANDARD TABLE OF ty_ekpo,
    *--- Alv parameters
        it_out_alvp TYPE typ_alv_form_params, "for alv parameters
    *-Field catalog  for ALV display
        it_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    *-Field names for Excel column headings
    it_ekpo_fields TYPE STANDARD TABLE OF ty_fields WITH HEADER LINE.
    **--To store output for Principial Pegging data
    DATA: BEGIN OF it_output occurs 0,
            EBELN(18) TYPE C,
            EBELP(20) TYPE C,
            MATNR(18) TYPE C,
            WERKS(11) TYPE C,
          END OF it_output.
    **--To store output for 2nd
    DATA: BEGIN OF it_output1 occurs 0,
            text(2000),
           END OF it_output1.
                     Data Declarations                                   *
    data: v_ebeln TYPE ekpo-ebeln,
          v_ebelp TYPE ekpo-ebelp,
          v_matnr TYPE ekpo-matnr,
          v_werks TYPE ekpo-werks.
                     Constants Declarations                              *
    CONSTANTS:
         c_0    TYPE i     VALUE  0,
         c_x    TYPE char1 VALUE  'X',
         c_i    TYPE char1 VALUE  'I',
         c_eq   TYPE char2 VALUE  'EQ',
         c_ekpo  TYPE char4 VALUE 'EKPO',
         c_hyfn  TYPE char1 VALUE '-'.
                     Work Area Declarations                              *
    DATA: x_output_ekpo type ty_output,
          x_ekpo type ty_ekpo.
                     Selection Screen                                    *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-f01.
    SELECT-OPTIONS:
          s_ebeln FOR v_ebeln OBLIGATORY,
          s_ebelp FOR v_ebelp,
          s_matnr FOR v_matnr,
          s_werks FOR v_werks.
    SELECTION-SCREEN END OF BLOCK b1.
                     At Selection Screen                                 *
    AT SELECTION-SCREEN.
                     Start-of-Selection                                  *
    START-OF-SELECTION.
    *--- Check Authorizations for Selection-screen
      PERFORM  z_selection_auth_check.
    *--- Fetch Purchasing Document Item data
      PERFORM  fetch_status_pp.
                     End-of-Selection                                    *
    END-OF-SELECTION.
    **-- Download data to final internal table.
      PERFORM data_output.
      IF NOT it_output[] IS INITIAL.
    *--- Fill the structure for calling the ALV form
        PERFORM initialize_alv_params.
    **-- Display ALV Report
        PERFORM setup_and_display_alv_ver2
           USING
         it_out_alvp        "Parameter structure
         it_output[]        "Internal Data table(header table)
         it_output[].       "Dummy table for Hierarchical ALV!!(item table)
        ENDIF.
      IF it_output[] IS INITIAL.
        MESSAGE i999(zi) WITH 'No data found for selection'(i02).
      ENDIF.
    *&      Form  FETCH_STATUS_PP
    Get data from ekpo table
    FORM FETCH_STATUS_PP .
    *-Fetch PP Data from ekpo table
      REFRESH it_ekpo.
      SELECT EBELN
             EBELP
             MATNR
             WERKS
             FROM ekpo
             INTO TABLE it_ekpo
             WHERE ebeln IN s_ebeln
               AND ebelp IN s_ebelp.
      IF sy-subrc = c_0.
        SORT it_ekpo BY ebeln ebelp.
      ENDIF.
    ENDFORM.                    " FETCH_STATUS_PP
    *&      Form  f_top_of_page
    *This is to write the top of page
    FORM top_of_page.
      DATA:  lt_list TYPE slis_t_listheader,
             lx_list TYPE slis_listheader.
    *--- Title name
      CLEAR lx_list.
      lx_list-typ  = 'S'.
      lx_list-key  = 'Title name'(t13).
      lx_list-info = sy-title.
      APPEND lx_list TO lt_list.
      IF NOT lt_list IS INITIAL.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            it_list_commentary = lt_list.
      ENDIF.
    ENDFORM.                    "top_of_page
    *&      Form  init_page_head
    Description : This subroutine initializes the fields in table BHDGD  *
                  for printing the report heading.                       *
    FORM init_page_head.
      bhdgd-line1  = 'SLA Status Report'(h04).
      bhdgd-line2  = sy-title.
      bhdgd-lines  = sy-linsz.
      bhdgd-fcpyrt = sy-uline.
      bhdgd-inifl  = '0'.
    ENDFORM.                    "init_page_head
    *&      Form  initialize_alv_params
    Description : Form to initialize ALV Params
    FORM initialize_alv_params.
      CONSTANTS: lc_alv_grid  TYPE char1 VALUE 'G',  "Grid
                 lc_u         TYPE char1 VALUE 'U'.
      MOVE 'IT_OUTPUT' TO   it_out_alvp-tablname.   "final table
      MOVE sy-repid    TO   it_out_alvp-repid.
      MOVE lc_alv_grid TO   it_out_alvp-alvtype.
      MOVE c_x         TO   it_out_alvp-bringdefaultvar.
      MOVE lc_u        TO   it_out_alvp-variantsavetype.
    ENDFORM.                    " initialize_alv_params
          FORM it_out_init_events                                       *
    -->this is form is to modify the events
    FORM it_out_init_events
          CHANGING
           alevnts TYPE slis_t_event.
      FIELD-SYMBOLS <alevnt> TYPE slis_alv_event.
      LOOP AT alevnts ASSIGNING <alevnt>.
        CASE <alevnt>-name.
          WHEN  slis_ev_top_of_page.
            MOVE 'TOP_OF_PAGE'  TO <alevnt>-form.
        ENDCASE.
      ENDLOOP.
    ENDFORM.                    "it_out_init_events
    *&      Form  DATA_OUTPUT
    Download data to final internal table
    FORM DATA_OUTPUT .
      loop at it_ekpo into x_ekpo.
        x_output_ekpo-ebeln = x_ekpo-ebeln.
        x_output_ekpo-ebelp = x_ekpo-ebelp.
        x_output_ekpo-matnr = x_ekpo-matnr.
        x_output_ekpo-werks = x_ekpo-werks.
        append x_output_ekpo to it_output.
      endloop.
    ENDFORM.                    " DATA_OUTPUT
          FORM it_out_alv_fieldcat_before                               *
    -->  PT_FCAT                                                       *
    -->  ALVP                                                          *
    FORM it_out_alv_fieldcat_before  CHANGING
        pt_fcat TYPE slis_t_fieldcat_alv
        alvp TYPE typ_alv_form_params.
      DATA: lx_fcat TYPE slis_fieldcat_alv.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUTPUT'.
      lx_fcat-fieldname      = 'EBELN'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'Purchasing Doc No'(018).
      lx_fcat-seltext_m      = 'Purchasing Doc No'(018).
      lx_fcat-seltext_s      = 'Purchasing Doc No'(018).
      lx_fcat-reptext_ddic   = 'Purchasing Doc No'(018).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUTPUT'.
      lx_fcat-fieldname      = 'EBELP'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'Item No Purchasing Doc'(020).
      lx_fcat-seltext_m      = 'Item No Purchasing Doc'(020).
      lx_fcat-seltext_s      = 'Item No Purchasing Doc'(020).
      lx_fcat-reptext_ddic   = 'Item No Purchasing Doc'(020).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUTPUT'.
      lx_fcat-fieldname      = 'MATNR'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'Material'(010).
      lx_fcat-seltext_m      = 'Material'(010).
      lx_fcat-seltext_s      = 'Material'(010).
      lx_fcat-reptext_ddic   = 'Material'(010).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUTPUT'.
      lx_fcat-fieldname      = 'WERKS'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'Supply plant'(013).
      lx_fcat-seltext_m      = 'Supply plant'(013).
      lx_fcat-seltext_s      = 'Supply plant'(013).
      lx_fcat-reptext_ddic   = 'Supply plant'(013).
      APPEND lx_fcat TO pt_fcat.
    ENDFORM.                    " it_out_alv_fieldcat_before.
    Regards,
    Shalini
    Edited by: shalini reddy on Oct 7, 2008 5:08 PM

    Hi,
    The heading are in the table pt_fcat - you don't seem to be passing that in form....
    PERFORM setup_and_display_alv_ver2
    USING
    it_out_alvp "Parameter structure
    it_output[] "Internal Data table(header table)
    it_output[]. "Dummy table for Hierarchical ALV!!(item table)
    which I guessing in in one of the includes?
    Saying that the extract pof code does not show where you are calling form it_out_alv_fieldcat_before ...which populates the headings...
    Regards
    Stu

  • REUSE_ALV_GRID_DISPLAY (column headings from ALV to EXCEL) Max please help

    Hi Max,
    If you remember in one of my last post I asked for changing the column headings in ALV display for example from 'Material' to 'Material used'.
    I am using
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
          I_CALLBACK_PROGRAM                = repid
          IT_FIELDCAT                       = field_body
          I_SAVE                            = g_save
          IS_VARIANT                        = g_variant
          IT_EVENTS                         = events
        TABLES
          T_OUTTAB                          = itab.
    And you suggested me the following way....
    loop at field_body into field_wa.
    case field_wa-fieldname.
      when 'Material'.
         field_wa-seltext_l = 'Material used'.
         field_wa-seltext_m = 'Material used'.
         field_wa-seltext_s = 'Material used'.
    endcase.
    modify field_body from field_wa.
    endloop.
    It is working well. In ALV display the column heading is changed to what I wanted. But the question is when I export the displayed ALV to Excel using ALV functionality, Export->Spreadsheet... I see that <b>I dont get the Column Heading into Excel as it was in the ALV display.</b>
    I get in the Excel as 'Material u' or 'Mat. Used'. But when I add this line in the code.....
    when 'Material'.
         field_wa-seltext_l = 'Material used'.
         field_wa-seltext_m = 'Material used'.
         field_wa-seltext_s = 'Material used'.
        <b> field_wa-outputlen = 20.</b>
    Then I see that I get the complete heading in the Excel. But this way the columns with outputlen 20 are taking much space in ALV display.
    Is there any fix for this. May be not mentioning the outputlen but still get the column headings into Excel as it was in ALV display.
    Anyone with ideas please respond. Waiting for replies. Thanks

    Hi
    The labels have a fixed size:
    seltext_l is long   text: 20 char
    seltext_m is medium text: 15 char
    seltext_s is short  text: 10 char
    The text 'Material used' is long 13 char so you should write:
    field_wa-seltext_l = 'Material used'.
    field_wa-seltext_m = 'Material used'.
    field_wa-seltext_s = 'Mat. used'.
    You can try to set the field colwidth_optimize of parameter IT_LAYOUT.
    This field should optimize the width of the colunm
    So
    data layout type SLIS_LAYOUT_ALV.
    layout-colwidth_optimize = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = repid
    IT_LAYOUT   = layout       
    IT_FIELDCAT = field_body
    I_SAVE = g_save
    IS_VARIANT = g_variant
    IT_EVENTS = events
    TABLES
    T_OUTTAB = itab.
    and you can decide which label has to be used:
    field_wa-seltext_l = 'Material used'.
    field_wa-seltext_m = 'Material used'.
    field_wa-seltext_s = 'Mat. used'.
    If you want to set the short text
    field_wa-ddictxt   = 'S'.
    ...medium
    field_wa-ddictxt   = 'M'.
    ...long
    field_wa-ddictxt   = 'L'.
    Max

  • ALV  download to EXCEL  with column headings etc.

    Getting data from a grid to EXCEL can be done in "List" mode vis system==>save etc but it's not particularly user friendly and in any case if you are displaying a nice ALV why should the user have to switch into LIST mode anyway.
    Anyway here's a decent way to do it and it gives great formatted column headings etc etc.
    1) in the ON_TOOLBAR method add this code
    method ON_TOOLBAR.
    type-pools icon.
    CLEAR ls_toolbar.
    MOVE  0 TO ls_toolbar-butn_type.
        MOVE 'EXCEL' TO ls_toolbar-function.
        MOVE  space TO ls_toolbar-disabled.
        MOVE  icon_xxl TO ls_toolbar-icon.
        MOVE 'Excel' TO ls_toolbar-quickinfo.
        MOVE  'EXCEL' TO ls_toolbar-text.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    2) In the ON_USER_COMMAND method add the following
    (if you have a class defined with SE24 you don't need the commented code).
    method ON_USER_COMMAND.
           FOR EVENT before_user_command OF cl_gui_alv_grid
           IMPORTING
             e_ucomm
             sender.
    CASE e_ucomm.
         .......   other toolbar funcs if you have any
          WHEN 'EXCEL'.
            CALL METHOD me->download_to_excel.
        ENDCASE.
    endmethod.
    3) code this method to download to EXCEL
    method DOWNLOAD_TO_EXCEL.
    FIELD-SYMBOLS:
           <fs0> TYPE STANDARD TABLE,
           <fs1> TYPE STANDARD TABLE.
        ASSIGN g_outtab1->* TO <fs0>.
        ASSIGN g_fldcat1->* TO <fs1>.
           CALL FUNCTION  'LVC_TRANSFER_TO_KKBLO'
          EXPORTING
            it_fieldcat_lvc   = <fs1>
        is_layout_lvc     = m_cl_variant->ms_layout
             is_tech_complete  = ' '
          IMPORTING
            es_layout_kkblo   = ls_layout
            et_fieldcat_kkblo = lt_fieldcat.
        LOOP AT lt_fieldcat INTO lt_fieldcat_wa.
          CLEAR lt_fieldcat_wa-tech_complete.
          IF lt_fieldcat_wa-tabname IS INITIAL.
            lt_fieldcat_wa-tabname = '1'.
            MODIFY lt_fieldcat FROM lt_fieldcat_wa.
          ENDIF.
          l_tabname = lt_fieldcat_wa-tabname.
        ENDLOOP.
        CALL FUNCTION 'ALV_XXL_CALL'
             EXPORTING
                  i_tabname           = l_tabname
                  is_layout           = ls_layout
                  it_fieldcat         = lt_fieldcat
                  i_title             = sy-title
             TABLES
                  it_outtab           = <fs0>
             EXCEPTIONS
                  fatal_error         = 1
                  no_display_possible = 2
                  OTHERS              = 3.
        IF  sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    endmethod.
    You get nice column headings etc and decently formatted EXCEL spreadsheet.
    For Office 2007 I think you need to apply a SAP note but it certainly works with OFFICE 2003 which is what we are still using.
    Cheers
    jimbo

    Getting data from a grid to EXCEL can be done in "List" mode vis system==>save etc but it's not particularly user friendly and in any case if you are displaying a nice ALV why should the user have to switch into LIST mode anyway.
    Anyway here's a decent way to do it and it gives great formatted column headings etc etc.
    1) in the ON_TOOLBAR method add this code
    method ON_TOOLBAR.
    type-pools icon.
    CLEAR ls_toolbar.
    MOVE  0 TO ls_toolbar-butn_type.
        MOVE 'EXCEL' TO ls_toolbar-function.
        MOVE  space TO ls_toolbar-disabled.
        MOVE  icon_xxl TO ls_toolbar-icon.
        MOVE 'Excel' TO ls_toolbar-quickinfo.
        MOVE  'EXCEL' TO ls_toolbar-text.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    2) In the ON_USER_COMMAND method add the following
    (if you have a class defined with SE24 you don't need the commented code).
    method ON_USER_COMMAND.
           FOR EVENT before_user_command OF cl_gui_alv_grid
           IMPORTING
             e_ucomm
             sender.
    CASE e_ucomm.
         .......   other toolbar funcs if you have any
          WHEN 'EXCEL'.
            CALL METHOD me->download_to_excel.
        ENDCASE.
    endmethod.
    3) code this method to download to EXCEL
    method DOWNLOAD_TO_EXCEL.
    FIELD-SYMBOLS:
           <fs0> TYPE STANDARD TABLE,
           <fs1> TYPE STANDARD TABLE.
        ASSIGN g_outtab1->* TO <fs0>.
        ASSIGN g_fldcat1->* TO <fs1>.
           CALL FUNCTION  'LVC_TRANSFER_TO_KKBLO'
          EXPORTING
            it_fieldcat_lvc   = <fs1>
        is_layout_lvc     = m_cl_variant->ms_layout
             is_tech_complete  = ' '
          IMPORTING
            es_layout_kkblo   = ls_layout
            et_fieldcat_kkblo = lt_fieldcat.
        LOOP AT lt_fieldcat INTO lt_fieldcat_wa.
          CLEAR lt_fieldcat_wa-tech_complete.
          IF lt_fieldcat_wa-tabname IS INITIAL.
            lt_fieldcat_wa-tabname = '1'.
            MODIFY lt_fieldcat FROM lt_fieldcat_wa.
          ENDIF.
          l_tabname = lt_fieldcat_wa-tabname.
        ENDLOOP.
        CALL FUNCTION 'ALV_XXL_CALL'
             EXPORTING
                  i_tabname           = l_tabname
                  is_layout           = ls_layout
                  it_fieldcat         = lt_fieldcat
                  i_title             = sy-title
             TABLES
                  it_outtab           = <fs0>
             EXCEPTIONS
                  fatal_error         = 1
                  no_display_possible = 2
                  OTHERS              = 3.
        IF  sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    endmethod.
    You get nice column headings etc and decently formatted EXCEL spreadsheet.
    For Office 2007 I think you need to apply a SAP note but it certainly works with OFFICE 2003 which is what we are still using.
    Cheers
    jimbo

  • How to get the Text variables in the Columns Headings

    Hi,
         My requirement is I need to get data for weekly wise and for the last 10 weeks also. For this purpose I used the restricted KF based on the variables (customer exit) and offset. Also used the text variable for displaying from and to days in the column headings. I am getting the right text for the first column only. But the text offset is not considering.
    Ex 07/04/2007 to 07/10/2007      06/27/2007 to 07/03/2007 like that.
    I used the two text variables one for from data and other for to date using the customer exit. I am getting the same text as of the first column for the subsequent columns also. Please help me for getting the right text in the columns.
    Thanks,
    visu

    Hello ,
               The quite simple way is to create a text variable with replacement path , as it replaces the value of customer exit used in the report.
    create two text variables
    First variable:
    1 Replace variable with -
    external characteristic key value
    For interval use ---from value
    2.Secod text variable
    Replace variable with -
    external characteristic key value
    For interval use ---To value
    offset start -0000 offset length0000
    use these variables in the column headings.
    hope it is clear,
    assign points if useful

  • Problem with black Genius bar and column headings

    I have just installed the latest version of iTunes and when in Grid view all the column headings have a black background and also the Genius sidebar has a black background.
    I have tried to create a new iTunes library and they are still black.
    I have installed and uninstalled iTunes - no help.
    I've checked my display settings and they are 32 bit color.

    To go back, reinstall from your last Lion or Snow Leopard backup.

Maybe you are looking for

  • Question onTwo EUL in One environment

    Hi Experts . We are planning to have Fusion middleware setup for Discoverer . we have two EUL's in two different databses . Please let me know how can i create config the environment to use both the discoverer EUL's. i have created two different repo

  • Outlook Contact Card - Organization Tab disabled users

    In Outlook there is a Contact Card showing detailed information about that person. the Organization tab shows the contact's "Manager", "Shares Same Manager" (other contacts with the same manager), and "Direct Reports" (people that report to that cont

  • How file adapter has to pick .stub file???

    Hi guys, Sap system is generating a .stub file.if that file exist then only adapter will send the data to pi. Can we have some settings in Sender File Adapter where in we can Put check condition for .STUB file. I mean, If .STUB file is present in ECC

  • How to create a material for company code ??

    hii Is it possible to create material company code wise .??? If not , explain me the reason ?? Only plant wise is possible in standard SAP?? Thanks

  • Transfer:WM-managed non-HU managed stor location to WM and HU managed sloc

    Dear All, I have one storage location that is Warehouse managed and non-HU managed. I have another sloc that is warehouse managed and also HU managed. I want to move stock from the first to the second. I use HU04 and specify the destination storage t