How to create column header text while downloading file

How can we create column header text while downloading file using function GUI_DOWNLOAD(in SAP Release 4.6c) because there is no FIELDNAMES parameter in
4.6c version.

Hii,
  Check this sample code. I have called GUI_DOWNLOAD twice. Onetime to download header of table and next time data of table
REPORT  z_file_download.
DATA: w_name(90) TYPE c.
DATA:
  BEGIN OF fs_flight,
    carrid   LIKE sflight-carrid,
    connid   LIKE sflight-connid,
    fldate   LIKE sflight-fldate,
    price    LIKE sflight-price,
    currency LIKE sflight-currency,
  END OF fs_flight.
DATA:
  BEGIN OF fs_head,
    carrid(10) TYPE c,
    connid(10) TYPE c,
    fldate(10) TYPE c,
    price(10) TYPE c,
    curr(10) TYPE c,
  END OF fs_head.
DATA:
  t_head LIKE
   TABLE OF
         fs_head.
DATA:
  t_flight LIKE
     TABLE OF
           fs_flight.
fs_head-carrid = 'CARRID'.
fs_head-connid = 'CONNID'.
fs_head-fldate = 'FLDATE'.
fs_head-price  = 'PRICE'.
fs_head-curr   = 'CURRENCY'.
APPEND fs_head TO t_head.
SELECT-OPTIONS:
  s_carrid FOR fs_flight-carrid.
START-OF-SELECTION.
  SELECT carrid
         connid
         fldate
         price
         currency
    FROM sflight
    INTO TABLE t_flight
   WHERE carrid IN s_carrid.
CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
*   BIN_FILESIZE                  =
    filename                      = 'D:\flight.xls'
   FILETYPE                      = 'ASC'
*   APPEND                        = ' '
    WRITE_FIELD_SEPARATOR         = 'X'
*   HEADER                        = '00'
*   TRUNC_TRAILING_BLANKS         = ' '
*   WRITE_LF                      = 'X'
*   COL_SELECT                    = ' '
*   COL_SELECT_MASK               = ' '
*   DAT_MODE                      = ' '
*   CONFIRM_OVERWRITE             = ' '
*   NO_AUTH_CHECK                 = ' '
*   CODEPAGE                      = ' '
*   IGNORE_CERR                   = ABAP_TRUE
*   REPLACEMENT                   = '#'
*   WRITE_BOM                     = ' '
* IMPORTING
*   FILELENGTH                    =
  tables
    data_tab                      = t_head
EXCEPTIONS
   FILE_WRITE_ERROR              = 1
   NO_BATCH                      = 2
   GUI_REFUSE_FILETRANSFER       = 3
   INVALID_TYPE                  = 4
   NO_AUTHORITY                  = 5
   UNKNOWN_ERROR                 = 6
   HEADER_NOT_ALLOWED            = 7
   SEPARATOR_NOT_ALLOWED         = 8
   FILESIZE_NOT_ALLOWED          = 9
   HEADER_TOO_LONG               = 10
   DP_ERROR_CREATE               = 11
   DP_ERROR_SEND                 = 12
   DP_ERROR_WRITE                = 13
   UNKNOWN_DP_ERROR              = 14
   ACCESS_DENIED                 = 15
   DP_OUT_OF_MEMORY              = 16
   DISK_FULL                     = 17
   DP_TIMEOUT                    = 18
   FILE_NOT_FOUND                = 19
   DATAPROVIDER_EXCEPTION        = 20
   CONTROL_FLUSH_ERROR           = 21
   OTHERS                        = 22
IF sy-subrc NE 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename                = 'D:\flight.xls'
      filetype                = 'ASC'
      append                  = 'X'
      write_field_separator   = 'X'
    TABLES
      data_tab                = t_flight
    EXCEPTIONS
      file_write_error        = 1
      no_batch                = 2
      gui_refuse_filetransfer = 3
      invalid_type            = 4
      no_authority            = 5
      unknown_error           = 6
      header_not_allowed      = 7
      separator_not_allowed   = 8
      filesize_not_allowed    = 9
      header_too_long         = 10
      dp_error_create         = 11
      dp_error_send           = 12
      dp_error_write          = 13
      unknown_dp_error        = 14
      access_denied           = 15
      dp_out_of_memory        = 16
      disk_full               = 17
      dp_timeout              = 18
      file_not_found          = 19
      dataprovider_exception  = 20
      control_flush_error     = 21
      OTHERS                  = 22.
  IF sy-subrc EQ 0.
    MESSAGE 'Download successful' TYPE 'I'.
  ENDIF.
  IF sy-subrc NE 0.
*  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
Regards
Abhijeet

Similar Messages

  • How to get column header text in IWDTable

    Hi
    Just want to know how to get column header name in IWDTable.
    I know that you can get it with
    IWDAbstractTableColumn[] groupedColumns = table.getGroupedColumns();
    for (int i = 0; i < groupedColumns.length; i++) {
         IWDAbstractTableColumn column = groupedColumns<i>;
         column.getHeader().getText();
    But what if text isnt set on header level but its rendered from cellEditor  model binding (im not sure if its like that).

    Finally after your suggestion i did it with this code
    String header = column.getHeader().getText();
                       if ((header == null || header.length() == 0) && column instanceof IWDTableColumn){
                            IWDTableCellEditor tableCellEditor = ((IWDTableColumn) column).getTableCellEditor();
                            if (tableCellEditor instanceof IWDTextView){
                                 String bindingPath = ((IWDTextView)tableCellEditor).bindingOfText();
                                  StringTokenizer tokenizer = new StringTokenizer(bindingPath,".");
                                  String token = "";
                                  IWDNodeInfo nodeInfo = context.getNodeInfo();
                                  while (tokenizer.hasMoreTokens()){
                                       token = tokenizer.nextToken();
                                       if (tokenizer.hasMoreTokens()){
                                            nodeInfo = nodeInfo.getChild(token);          
                                  IWDAttributeInfo attribute = nodeInfo.getAttribute(token);
                                  ISimpleType simpleType = attribute.getSimpleType();
                                  simpleType.getDescription();
                                 header = simpleType.getDescription();

  • How to define Column Header text table control

    Hi All,
    I have to create a function in which user will pass Field Name, Field Description.
    I have to show that field description in Table Control Columns as Text for columns.
    Like if a user pass Material , PLant etc, then first column header text will be Material and so on and in rows it will show the data.
    One more thing, is it possible to define the technical attributes like length based on field passed through function.
    Please help me to find out the solution.
    Thanks
    Piyush Mathur

    Hi Piyush,
    here are the some components of the screen . you can change tehm at run time in your code.
    components: name,input,output,required,length,active,invisible,intensified,group1,group2...etc.
    at ruin time you modify these attributes..
    your requirement is to change the name attribute.
    regards,
    sateesh

  • SSIS : How to create Column Header dynamically using expression in Flat File Source

    Hi Team,
    I need to keep configured Header Names for columns, Is there is any way to set each column name from expression? or is there is any other way?

    Nope
    But you could add a dummy row to your source to include column headers and then use options column headers in first row in flat file connection manager.
    So suppose you've three columns column0,coulmn1,column2 and you want to make it as ID,Name,Datethen make source query as
    SELECT 'ID' AS Col1,'Name' AS Col2,'Date' AS Col3, 0 AS ord
    UNION ALL
    SELECT Column1,Column2,Column3,1
    FROM YourTable
    ORDER BY Ord
    then choose  column headers in first row option
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to change "Details" column header text in AdvanceTable in AdvancedTable

    Hi All,
    i am using adavanced table in advanced table in OAF page to show the master and details ,
    my requirement is to change the header text of "Details" to some other meaning ful text .
    "Details' column will be visible at runtime ,no we cant change using process request ,
    Please help me on this ,its urgent
    Thanks & Regards
    Maheswara Raju

    You can get the handle to the Detail column by using the following:
    UINode d = outerTable.getDetail();
    However, as per OAF developer guide, it is not possible to change the label for the detail column. The devloper guide has the following:
    "In accordance with BLAF guidelines, the Detail column header text for the detail disclosure column and the Show/Hide link texts within the cells of the detail disclosure column can not be modified."
    Cheers,
    Saurabh

  • How to align ADF column header text

    Hi,
    I want to align ADF column header text to center regardless of whether the contents are text (which should be left aligned - done by the "formatType" attribute) or number (which should be right aligned - done by the "formatType" attribute) within a ADF table. the styleclass attributes also doesnt work. can anybody help me pl?
    Afi

    Hi Afi,
    use
    <af:column>
      <f:facet name="header">
        <af:panelHorizontal halign="center">
          <af:outputText value="#{bindings.DeptView.labels.Dname}"/>
        </af:panelHorizontal>
      </f:facet>
      <af:inputText value="#{row.Dname}"/>
    </af:column>instead of
    <af:column headerText="#{bindings.DeptView.labels.Dname}">
      <af:inputText value="#{row.Dname}"/>
    </af:column>Rado

  • Change column header text dynamically

    Hi,
    I have requirement to change the column header text dynamically in sap gui programming. but couldn't see straight forward way to achieve this.
    i tried following link but no success:
    [Re: Dynamic header text in table control - Dialog programming;
    Please share your suggestions if it can be acheived.
    Thanks,
    Rahul
    Edited by: Rahul Yadav on Oct 25, 2010 7:29 PM

    >
    anmol112 wrote:
    > Hi,
    >   So you can try 1 thing,
    > * Dont use default Column Headings
    > * Create I/O and choose ouput only and fix them in place of Column headings.
    > * pass the values to these I/O accordingly.
    >
    >
    > Thanks,
    > Anmol.
    How is this different from the previous post?
    Rob

  • Report painter - Choosing column heading text

    Hi SDN
    I'm having a specific problem with getting the right column heading text into my G/L report painter report created in FGI2/FGI5. In the report painter form I have created the three texts for my column (short, medium and long text). In order for the heading to be meaningful I need the report to show the medium or long text. This is also the case when I run the report as object type Object list. Here the medium text is displayed. However, when I run the report as a Classic drilldown report or a Graphical report output the short column heading text is shown.
    Now, I know from running the standard report 0SAPBLNCE-01 in FGI0 that it is possible to have the long column header text shown in the report, so I'm not willing to give up. But can any of you guys help me on how to make the report show the correct text?
    Kind rgds
    Steen Koefoed

    Hi Anna and thanks for your suggestion. I have tried changing the header text length in the form as you suggested, but it does not seem to affect the display in neither of the three output types of the report. I assume that there must be a way to control the text header length specifically for each of the three output types. But how....

  • How to create a LONG TEXT object in BAPI_ALM_NOTIF_CREATE

    Dear experts,
    Would you please give me a hand how to create a LONG TEXT object when creating a new Notification using BAPI_ALM_NOTIF_CREATE.
    The snapit of my code is below. The Notification is created but without a long text.
    THANK YOU!!
    Data:
        lv_it_longText type STANDARD TABLE OF BAPI2080_NOTFULLTXTI,
          lv_st_longText like LINE OF  lv_it_longText,
      lv_st_longText-OBJTYPE = 'QME'.
      lv_st_longText-TEXT_LINE = DESCRIPTIONLONG.
    CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'
      EXPORTING
      EXTERNAL_NUMBER          =
       notif_type               = 'M1'
        notifheader              = lv_header
      TASK_DETERMINATION       = ' '
      SENDER                   =
      ORDERID                  =
    IMPORTING
       NOTIFHEADER_EXPORT       = lv_header_import
    TABLES
    *NOTITEM                  =   lv_it_item
      NOTIFCAUS                =
      NOTIFACTV                =
      NOTIFTASK                =
      NOTIFPARTNR              =
       LONGTEXTS                = lv_it_longText
      KEY_RELATIONSHIPS        =
       RETURN                   = lv_it_return.

    Hi
    Make sure you have filled OBKEY.
    OBJKEY must have the corresponding sort field for the values named below :-
    1. QMEL - Notification header
    2. QMFE - Notification item
    3. QMUR - Notification cause
    4. QMSM - Notification task
    5. QMMA - Notification action
    The combination of sort field of item/cause, item/task and item/action must be unique within a notification. If you leave the sort field empty and the OBJTYP = QME, then a long text is created for the notification header.
    Regards
    Abhii

  • Change Table control Column Header text dynamically

    Hi,
    I have an requirement to change table control column header text dynamically.
    i.e. I have about 10 columns in table control, out that need to change 5 columns header text. These header texts are stored in an internal table.
    I had looked into the below link but could not get exactly how to do it.
    Dynamic headers in table control
    Could you please tell me how to do that.
    Thanks in Advance.

    Hi Saba,
    What you will need to do is this.....
    1. First replace the column Header Text box by I/O Fields and name them accordingly.
    Say for example we will consider the same example which i had explained in the link.
    there in the column header we want the header to change when some dates and entered into two fields which are out of table control say
    Start Date: 01.01.2010 to End Date: 06.01.2010
    Now we want the header to look like this,
    Column  No.    -        1               2             3                  4               5               6
    Header label   -    01/FRI       02/SAT     03/SUN       04/MON     05/TUE      06/WED
    Header name -    SPOTS1   SPOTS2    SPOTS3      SPOTS4     SPOTS5    SPOTS6
    then you go as per the instructions in the link......
    Let me know if you need further help,
    Hope this solves your problem....
    Regards,
    Abhijit G. Borkar

  • Restricted Key Figure Column heading text missing

    Hello,
    I created a restricted Key Figure in a BEX report and dragged this RKF into the columns tab. when i execute the report , the column header text for the restricted key figure is missing. The values are fine, but the header column text  for that KF is missing. any help?
    Thanks
    justin

    Hi Justine...
    I think u r doing something wrong..........Either u can create Global Restricted Key(Infoprovider level) or Local restricted ket figure(Query level)..........If u create Global........then  in the left pane............Right click on the Keyfigure >> New restricted Key figure...........to create in the Query level..........In the context menu>> choose Edit........... or select the heading of the Rows or Columns directory
    and use the right mouse button to choose New Structure..........In both the cases....there is a Description Field........u hav to write the description there............U can change the technical name also.........then save it........
    May be it is a temporary bug............just come out the query..and again reopen it......
    Regards,
    Debjani.....

  • How To avoid column heading for only total line in ALV list Display

    Hi,
    How To avoid column heading for only total line in ALV list Display.

    Hi,
    to change colunm header field catlog is built
    look at the example below
    Changing column text headers
    use this to change, hide, or alter the ALV columns
    CLEAR: gt_fcat.
    READ TABLE gt_fcat WITH KEY fieldname = 'TEXT1' " ***
    *TEXT1 is your field name
       ASSIGNING <gtfcat>.
    IF sy-subrc = 0.
       <gtfcat>-coltext   = 'Date Type'.
       <gtfcat>-no_out    = ' '.
       <gtfcat>-tooltip   = 'Date Type Text from IT0019'.
       <gtfcat>-seltext   = 'IT0019'.
    keep seltext to '' if u want to hide
    ENDIF.
    regards
    austin

  • Vc++ how to read column header of cursor

    How to fetch the Column name or header of the stored procedure which is using a cursor as the output.
    P_out  out sys_refcursor
    need to read the column name of this output.
    I am using Vc++ code to reterive the data, in Vc++ how to read column header of cursor

    You haven't provided much detail to go on.  How are you reading data from the ref cursor? Do you already have a reader from it?
    Maybe this helps.
    Greg
    create or replace procedure proc1 (v1 out sys_refcursor) as
    begin
    open v1 for select * from emp;
    end;
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    public class RefCur
        public static void Main()
            using (OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl"))
                con.Open();
                using (OracleCommand cmd = new OracleCommand("proc1", con))
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new OracleParameter("v1", OracleDbType.RefCursor, ParameterDirection.Output));
                    cmd.ExecuteNonQuery();
                    using (OracleDataReader reader = ((OracleRefCursor)cmd.Parameters[0].Value).GetDataReader())
                        for (int i=0;i<reader.FieldCount;i++)
                            Console.WriteLine(reader.GetName(i));

  • How to create a OTR Text in Web Dynpro ?

    Hi All,
    Please help, How to create a OTR Text in Web Dynpro ?
    Urgent.
    Thanks in advance.
    Kaleem.

    Hi Kaleemullah,
    To create OTR Text, T-Code is SOTR_EDIT. If you run this transaction then one screen will appear. There you can choose Long Text or Short Text based on your
    Text. You can choose language also. In Text field you can enter your text. You can put WDYV in your Object Type field. In Text block Length can be increased to 25 as it may be problem if language conversion of Text happens. You must fill your package field and save the OTR.
    I hope you can be able to create OTR Text now.
    Best Regards,
    bansidhar

  • Re: Increasing Column Header Length While Printing in ALV Grid

    Hi
    For some column headers in a report, the translations in Turkey are more than 40 characters, because of which while executing the report in TR language, the column header is getting truncated.
    So, I would like to know if we can increase the column header length while printing the ALV Grid(OO ALV) output.
    Or else, Is there any way where we can divide the column header into 2 rows.
    Please let me know.
    Thanks and Regards,
    Vishwa.

    Jose and Sivaram,
    Thanks for replying.
    The problem we have is with the column headers, there is a limit of 40 characters for the column header in ALV reports. So, increasing the outputlen also did not help.
    Regards,
    Vishwa.

Maybe you are looking for

  • FCP 6.0.2 - Capture Successful - Clips not saved! Help!

    I'm running FCP 6.0.2 on OS X 10.4.11 I have a Sony HDR-FX1 camera and do most of my filming in SD DV. I'm trying to capture footage on several tapes (about an hour per tape) using the Log and Capture method. The camera is plugged into my front firew

  • How to remove sim card from N8

    so o2 will be along tomorrow to swap my 3 day old N8 for one that (hopefully) works properly!  Problem is, I can't see how to remove the sim card.  If I push it in it doesnt click and eject - failing that am I supposed to press somewhere for it to ej

  • How can I reinstall iphoto on new hard drive?

    Original purchase came with iphoto installed.  After hard drive crash new hard drive does not have iphoto app.  Anyone have any idea how to reinstall without having to purchase?  Had to install original OS X 10.6.8 Snow Leopard

  • Bapi BAPI_ACC_INVOICE_RECEIPT_POST

    Hi, I want to be able to use the bapi with tax. I have the following code which gives me the result: E FF 747 Tax amount must not be greater than the tax base. Its not clear to me what i do wrong when filling the tables for the bapi. Any help will be

  • Safari 6.0.4 - java applet keeps running when not in use?

    Mac OS X 10.7.5 Safari 6.0.4 all the latest updates (software) as of 4/27/13 Oracle's Java r 21 also installed (latest) website: http://javatester.org/version.html NOTE: I have seen this on more than 1 computer that the 1st time running the Java appl