ALV - output to file

Hello,
I am trying to save the ALV displayed data as a text file and I would like
to keep the headings from be outputted to the text file. I would appreciate
any help you may have.

Hi,
If u want to save the output of the ALV dispay on text file....
then execute the following code.....and in the out put ur having an icon with Local file(CtrlShiftF9) u will get options select where u  want to store data......
TABLES:Z50889_BMS_TABLE, SSCRFIELDS.
TYPE-POOLS:SLIS.
TYPES:BEGIN OF ST_TAB1,
      EMPID TYPE ZKKEMPID,          "Employee ID
      EMPNAME TYPE ZKKNAME,         "Employee Name
      EMPDEPARTMENT TYPE ZKKDEPT,   "Department
      EMPPROJECT TYPE ZKKPROJECT,   "Project
      EMPLOGIN TYPE ZKKLOGIN,       "Login Time
      EMPSALARY TYPE ZKKSALARY,     "EMployee Salary
      END OF ST_TAB1.
DATA:
*Declaration of internal table to store data
      WA_TAB1 TYPE  ST_TAB1,
      IT_TAB1 TYPE STANDARD TABLE OF ST_TAB1,
*Declaration of variables used in the program
      V_NUMBER LIKE Z50889_BMS_TABLE-EMPID,
      V_PROG TYPE SY-REPID,
*Declaration of internal table for the funtion codes
      IT_EXC TYPE TABLE OF RSEXFCODE,
      WA_EXC TYPE          RSEXFCODE,
*Declaration of internal table and work area to the display
      IT_FIELDCAT  TYPE SLIS_T_FIELDCAT_ALV,
      WA_FIELDCAT  TYPE SLIS_FIELDCAT_ALV,
      WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
      IT_EVENTS TYPE SLIS_T_EVENT,
      WA_EVENTS TYPE SLIS_ALV_EVENT.
*Declaration of selection-screen block
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
SELECT-OPTIONS:SO_NUM  FOR  V_NUMBER.
SELECTION-SCREEN END OF BLOCK B1.
INITIALIZATION.
  SSCRFIELDS-FUNCTXT_01 = 'CREATE'.
  SSCRFIELDS-FUNCTXT_02 = 'CHANGE'.
  WA_EXC-FCODE  = 'ONLI'.
  APPEND WA_EXC TO IT_EXC.
  V_PROG = SY-CPROG.
START-OF-SELECTION.
  PERFORM FETCH_DATA.
  PERFORM DISPLAY.
*&      Form  to fetch_data from the table  Z50889_BMS_TABLE
FORM FETCH_DATA .
  SELECT EMPID EMPNAME EMPDEPARTMENT EMPPROJECT EMPLOGIN EMPSALARY FROM
  Z50889_BMS_TABLE INTO TABLE IT_TAB1 WHERE EMPID IN SO_NUM.
ENDFORM.                    " fetch_data
*&      Form to  display the output
FORM DISPLAY .
  PERFORM INITIALIZE_BLOCK.
  PERFORM FIELD_CATALOG.
  PERFORM LAYOUT.
  PERFORM EVENTS.
  PERFORM APPEND_TO_LAYOUT.
  PERFORM BLOCK_DISPLAY.
ENDFORM.                    " display
*&      Form  initialize_block
FORM INITIALIZE_BLOCK .
  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
    EXPORTING
      I_CALLBACK_PROGRAM = V_PROG.
  I_CALLBACK_PF_STATUS_SET       = ' '
  I_CALLBACK_USER_COMMAND        = ' '
  IT_EXCLUDING                   = IT_EXCLUDING
CALL FUNCTION 'REUSE_ALV_CHECKBOX_SET'
  CHANGING
    CT_FIELDCAT       = IT_FIELDCAT
ENDFORM.                    " initialize_block
*&      Form for field_catalog
FORM FIELD_CATALOG .
  WA_FIELDCAT-FIELDNAME = 'EMPID'.
  WA_FIELDCAT-SELTEXT_L = 'EMPLOYEE ID'.
  WA_FIELDCAT-COL_POS     = 0.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  WA_FIELDCAT-FIELDNAME = 'EMPNAME'.
  WA_FIELDCAT-SELTEXT_L = 'EMPLOYEE NAME'.
  WA_FIELDCAT-COL_POS     = 1.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  WA_FIELDCAT-FIELDNAME = 'EMPDEPARTMENT'.
  WA_FIELDCAT-SELTEXT_L = 'DEPARTMENT'.
  WA_FIELDCAT-COL_POS     = 3.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  WA_FIELDCAT-FIELDNAME = 'EMPPROJECT'.
  WA_FIELDCAT-SELTEXT_L = 'PROJECT'.
  WA_FIELDCAT-COL_POS     = 4.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  WA_FIELDCAT-FIELDNAME = 'EMPLOGIN'.
  WA_FIELDCAT-SELTEXT_L = 'LOGIN TIME'.
  WA_FIELDCAT-COL_POS     = 5.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  WA_FIELDCAT-FIELDNAME = 'EMPSALARY'.
  WA_FIELDCAT-SELTEXT_L = 'SALARY'.
  WA_FIELDCAT-COL_POS     = 6.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
ENDFORM.                    " field_catalog
*&      Form  layout
FORM LAYOUT .
  WA_LAYOUT-ZEBRA ='X'.
  WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
  WA_LAYOUT-WINDOW_TITLEBAR = 'EMPLOYEE DETAILS'.
ENDFORM.                    " layout
*&      Form  events
      text
-->  p1        text
<--  p2        text
FORM EVENTS .
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      I_LIST_TYPE     = 1
    IMPORTING
      ET_EVENTS       = IT_EVENTS[]
    EXCEPTIONS
      LIST_TYPE_WRONG = 1
      OTHERS          = 2.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " events
*&      Form  APPEND_TO_LAYOUT
FORM APPEND_TO_LAYOUT .
  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
      IS_LAYOUT                  = WA_LAYOUT
      IT_FIELDCAT                = IT_FIELDCAT
      I_TABNAME                  = 'IT_TAB1'
      IT_EVENTS                  = IT_EVENTS
    TABLES
      T_OUTTAB                   = IT_TAB1
    EXCEPTIONS
      PROGRAM_ERROR              = 1
      MAXIMUM_OF_APPENDS_REACHED = 2
      OTHERS                     = 3.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " APPEND_TO_LAYOUT
*&      Form to call  BLOCK_DISPLAY
FORM BLOCK_DISPLAY .
  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    EXCEPTIONS
      PROGRAM_ERROR = 1
      OTHERS        = 2.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " BLOCK_DISPLAY

Similar Messages

  • Problem with alv output export to text file

    hi experts,
    when iam exporting alv output to text file,
    some data is missing in text file.say for example sold-to-party value is 1155027 in alv out put,but in text file it is showeing only 115502 ,
    the last digit is missing,
    can anyone help urgent!!!!!

    and when you export it to excel?
    from here you could save it as text file too...
    A.

  • How to set default file path while downloading alv output

    Hi,
    Can anyone tell me that how to set default file path while downloading the ALV output to system using Local file button on tool bar.
    Please look below screenshots:
    Kindly help me resolve it.
    Thanks in advance.
    Regards,
    Ashutosh Katara

    This information initial value is (maybe) stored in Windows Register (register.exe) at Software\SAP\SAPGUI Front\SAP Frontend Server\Filetransfer -> PathDownload, you can read it thru class CL_GUI_FRONTEND_SERVICES method GET_UPLOAD_DOWNLOAD_PATH and update it thru method REGISTRY_SET_VALUE. (Else there may be some parameter ID to force data, but I'm no longer sure)
    Regards,
    Raymond

  • ALV Output to Excel file

    Hi All,
    I am downloading the ALV output to Excel file.I am making use of  LIST--->EXPORT--->SPREADSHEET option.
    My list is having Header, Footer, sub totals and totals.When i transfer the list i am facing following problems
    1.Even i am getting the empty columns betweeen my output.
    2.In the Place of sub totals i am getting astericks
    3.On the top of the records downloaded,"DYNAMIC LIST DISPLAY" is found.I want to avoid this text on the top
    Thanks,
    Ravee...

    Hello Vinod,
    1.I am getting the empty columns betweeen my output.
    I am having 16 columns in the ALV output,but i got 19 columns in my excel file.
    2.In the Place of sub totals i am getting astericks.
    Generally there is no possibility to download the sub totals.i am using LIST->EXPORT->SPREADSHEET.
                     I am having the sub totals in my output.
    *You would have noticed the' * ' for sub total and ' ** ' for grand totals values.*These sub total & total values are not downloaded but these asterisks are carried to excel file.
    3.On the top of the records downloaded,"DYNAMIC LIST DISPLAY" is found.I want to avoid this text on the top.
    I am using the application tool bar icon only.Still i am getting the same.
    Thanks,
    Ravee...

  • How to download the blocked ALV output to PDF file.

    How to download the blocked ALV output to PDF file.
    I am able to download the BLocked ALV output in PDF format,
    but the each bolck in ALV is displaying different pages of PDF.
    In my report I have 4 block in 1 page, I am able to see the output in PDF but in different page.
    How to avoid the Page-break in PDF.
    Thanks,
    Ravi Yasoda.

    hi,
    I believe that your have 4 containers on the screen with individual ALV display. in this case, there is no way to get combined PDF output to my knowledge.
    However you can use Smartform/Sapscript as output which would allow you to display ALV in blocks and also print it in one.
    Regards,
    Nirmal

  • To download the Output of ALV to Excel file with Marco

    Hello Masters ,
    I m working on a ALV report in which either we can see the output or can download the ouptput and format that file before sending by mail..
    the following steps are currently used to download and format the ALV output .
    1. Save file form unix server
    2. Download the file to computer.
    3. Run a macro to format the execl file  and
    4. Send the file by mail.
    Apart from this I have to implement a new functionality by which we can directly send the result to spool so that it can be sent directly by mail .
    Can Anyone help me out????????
    Thanks & Regards
    Varlani Amit

    You will be having all data to be send in an internal table, same as your ALV internal table.
    you can provide a button or menu in alv screen to send directly without storing.
    for this you
    1. first write spool
    2. send it through mail.
    1. Writting a spool
    *Get the printer name from TVARVC table.
      select single low from tvarvc into l_destination
           where name = 'PRINTER'
             and type = 'P'
             and numb = '0000'.
      if sy-subrc ne 0.
         l_destination   = 'LOCL'.
      endif.
    *Get the print parameters.
      call function 'GET_PRINT_PARAMETERS'
        EXPORTING
          copies                 = 1
          department             = 'SYSTEM'
          destination            = l_destination
          expiration             = 2
          immediately            = ' '
          layout                 = 'X_65_255'
          line_count             = 65
          line_size              = 255
          list_name              = 'ABC'
          list_text              = 'XYZ
          mode                   = ' '
          new_list_id            = 'X'
          no_dialog              = 'X'
          receiver               = 'SAP*'
          release                = 'X'
          sap_cover_page         = 'X'
          user                   = sy-uname
        IMPORTING
          out_parameters         = l_params
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          others                 = 4.
      case sy-subrc.
        when 1.
          raise get_print_info_not_found.
        when 2.
          raise get_print_invalid_prt_params.
        when 3.
          raise get_print_invalid_arch_params.
        when 4.
          raise get_print_others.
      endcase.
    *start spool writing.
      new-page print on parameters l_params no dialog.
      uline.
      skip.
      write: 27 text-022 centered. "report name
      skip.
      uline.
    Do formatting as you want.
      loop at ALV_OUTPUT_INTERNAL TABLE..
        write:/  ALV_OUTPUT_INTERNAL TABLE-fileds...
      endloop.
      uline.
    *end spool writing.
      new-page print off.
    2. Sending a mail.
    Use FM 'SO_DOCUMENT_SEND_API1' for sending a mail

  • Problem while downloading the alv output to excel file.

    Hii,
    While downloading the alv output to an excel file i am facing a problem. Either the output comes as 1.23456E+11 or the values get cut .
    Cant put in txt file  as the users require to calculate directy and i have even tried to increase the output length .But both doesnt help.
    So what are the other ways to do so.
    Edited by: mansi_v27 on Mar 24, 2010 12:35 PM

    Hi,
    Welcome to SCN!!!.
    Please go through the forum rules. This has been discussed many times. You can search in the forum for this.
    Infact there is no problem. Just expand that excel cell. You can see the full value. This is standard excel property.
    Thanks,
    Vinod.

  • Regarding ALV output  to Excel file download

    Hi all,
    i had a requirement when downloading the ALV output to the Excel file it should ask for the password.if the user enters the password then this pass word shuld be assigned to the  Excel file that was downloaded.
    Can i know how this can be implemented

    Hi,
    Using EXCEL_OLE_STANDARD_DAT you can specify the PASSWORD & PASSWORD OPTION.
    Regards,
    Sharat

  • Alv output- download to excel file

    Hi
    I have ALV report. My requirement is
    For example i have 10 records in my ALV output.
    I want to download first 5 data to excel file.
    so i need to select the data and click the button download in alv screen. I created the download button in ALV screen.
    how to write coding for this

    Hi Kumar K,
    U can do it by feeling another internal table from the final internal table which u displayed...
    suppose u want the record 5 to 12 then
    LOOP AT itab FROM 5 TO 12.
    Append itab to itab2.
    ENDLOOP.
    So now Itab2 contains record 5 to 12...
    Logic:
    Create one Custom Button ... Now For Sy-ucomm of that button... provide popup window with FROM and TO parameters...
    Then using Loop... Endloop... select that much records form internal table to another internal table say itab2...
    Now using GUI_DOWNLOAD or WS_DOWNLOAD or any other FMs and pass the internal table to this FM...
    For more information on LOOP Syntax...
    LOOP AT itab - cond
    Syntax
    ... [FROM idx1] [TO idx2] [WHERE log_exp].
    Extras:
    1. ... FROM idx1
    2. ... TO idx2
    3. ... WHERE log_exp
    Effect
    The table rows to be read in a LOOP-loop can be limited by optional conditions; if no conditions are specified , all rows of the table are read.
    Addition 1
    ... FROM idx1
    Effect
    The specification FROM is only possible with standard tables and sorted tables. This specification only accepts table rows starting from table index idx1. For idx1, a data object of the type i is expected. If the value of idx1 is smaller or equal to 0, then it will be set to 1. If the value is larger than the number of table rows, the loop is not passed through.
    Addition 2
    ... TO idx2
    Effect
    The specification TO is only possible with standard tables and sorted tables. The specification only accepts table rows after table index idx2. For idx2, a data object of the type i is expected. If the value of idx2 is smaller or equal to 0, then the loop will not be passed. If the value is larger than the number of table rows, then the value will be set to the number of rows. If idx2 is smaller than idx1, then the loop is not passed as well.
    Addition 3
    ... WHERE log_exp
    Effect
    WHERE can be specified with all table-types. After WHERE, you can specify any logical expression log_exp in which the first operand of any singular comparison is a component of the internal table. For this reason, all logical expressions are possible except for IS ASSIGNED, IS REQUESTED and IS SUPPLIED. Dynamic specification of a component through bracketed character-type data objects is not possible. Loops at sorted tables must have compatible operands of the logical expression. All rows are read for which the logical expression is true.
    Notes
    The logical expression specified after WHERE is analyzed once at entry into the loop. Possible changes of the second operand during loop processing are not taken into account.
    While with standard tables all rows of the internal table are checked for the logical expression of the WHERE- addition, with sorted tables and hash tables (as of Release 7.0) you can achieve optimized access by checking that at least the beginning part of the table key in sorted tables and the entire table key in hash tables is equal in the logical expression through queries linked with AND. Optimization also takes effect if the logical expression contains other queries linked with AND with arbitrary operators.
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7

  • Want to save the alv output in local file

    Hi,
    i want to save the alv output to local file throuh menu.
    in out put
    system>LIst>save
    using oops alv
    Regards
    Jagadeeshwar.B

    Hi,
    I get the following dump when i try to download alv output to local file.Please suggest what is to be done:-
    Runtime Errors         PERFORM_NOT_FOUND            
    Except.                CX_SY_DYN_CALL_ILLEGAL_FORM  
    Date and Time          09/23/2008 22:09:28          
    Error analysis                                                                     
        An exception occurred that is explained in detail below.                       
        The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_FORM', was   
         not caught in                                                                 
        procedure "METHOD_PRINT_TOP_OF_PAGE" "(FORM)", nor was it propagated by a      
         RAISING clause.                                                               
        Since the caller of the procedure could not have anticipated that the          
        exception would occur, the current program is terminated.                      
        The reason for the exception is:                                               
        The program "SAPLSLVC_FULLSCREEN" is meant to execute an external PERFORM,     
        namely the routine "TOP_OF_PAGE_BATCH " of the program "ZRTCLT06_ALV ", but    
        this routine does not exist.                                                   
    Line  SourceCde                                                                               
    133   endif.                                                                               
    134                                                                               
    135   export alv_form_html from abap_false                                                       
      136          to memory id 'ALV_FORM_HTML'.                                                       
      137                                                                               
    138 endform.                               " METHOD_END_OF_LIST                                  
      139 &----                     
      140 *&      Form  METHOD_PRINT_TOP_OF_PAGE                                                       
      141 &----                     
      142 *       text                                                                               
    143 ----                     
      144 *  -->  p1        text                                                                       
      145 *  <--  p2        text                                                                       
      146 ----                     
      147 form method_print_top_of_page using value(i_table_index) type syindex.                       
      148                                                                               
    149   if gt_grid-r_salv_fullscreen_adapter is bound.                                             
      150     if not gt_grid-i_callback_top_of_page is initial and                                     
      151        not i_callback_program is initial.                                                    
      152       perform (gt_grid-i_callback_top_of_page)                                               
      153         in program (i_callback_program) using i_table_index.                                 
      154     endif.                                                                               
    155   else.                                                                               
    156     if not gt_grid-i_callback_top_of_page is initial and                                     
      157        not i_callback_program is initial.                                                    
      158       perform (gt_grid-i_callback_top_of_page)                                               
      159         in program (i_callback_program).                                                     
      160     endif.                                                                               
    161   endif.                                                                               
    162                                                                           
    >>>> endform.                               " METHOD_PRINT_TOP_OF_PAGE         
    164 ----   
    165 *       FORM METHOD_PRINT_END_OF_LIST                                 *   
    166 ----   
    167 *       ........                                                      *   
    168 ----   
    169 form method_print_end_of_list.                                            
    170   if not gt_grid-i_callback_end_of_list is initial and                    
    171      not i_callback_program is initial.                                   
    172     perform (gt_grid-i_callback_end_of_list)                              
    173       in program (i_callback_program).                                    
    174   endif.                                                                  
    175                                                                           
    176 endform.                               " METHOD_PRINT_END_OF_LIST         
    177 &----  
    178 *&      Form  METHOD_DOUBLE_CLICK                                         
    179 &----  
    180 *       text                                                              
    181 ----  
    182 *  -->  p1        text

  • Download of alv output in a file

    Hi all,
    I need to download the output which is present in alv into a file.How can i do that?.
    Regards,
    Lisa.

    Hi
    u can use
    gui_download
    v_file id nothing but the local file name
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = 'v_file'
       FILETYPE                        = 'ASC'
      tables
        data_tab                        = internal table
    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 <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    or
    after the output u do this
    system->list->save->localfile.
    here u can download it in the local file.
    thanks
    Vikrant

  • Clearing of ALV output is not happening in one side of the output.

    Hi All,
    I have created a simple upload program and using a Post button I am posting the Material Document. I have uploaded the file, I am using a ALV splitter to display the output ( Line Item in left panel and Message log in the right panel).
    If I upload another Excel file on the same screen, and click on 'Upload' button, left panel is getting refreshed with new set of line items whereas in the Right Panel Message Log details of First uploaded file is present, it is not getting refreshed.
    I used Free(), Refresh and Refresh_Table_dsiplay keywords to clear it, but its not working.
    In debug mode, If I see the internal table which is used to store the Message Log Details is empty, but the message is still present in the ALV output for newly uploaded file.
    Kindly give your valuable inputs.
    Thanks & Regards,
    Karthikeyan G.

    Hello Karthikeyan G,
    have you tried to cl_gui_cfw=>flush after your Refresh_Table_Display?
    Also,when you write ALV splitter, did you use easy-splitter or the regular splitter container?
    You ran the methods against the correct instance, right
    Hope that helps,
    Frank.

  • Error in ALV output

    Hi All,
    I am getting a runtime error in output while i try to do sum in ALV output.
    In my ouput table i want to do sum for below feilds those are defined in output table :
    CURR TYPE P DECIMALS 2,         
    B30 TYPE  P DECIMALS 2,        
    B60 TYPE P DECIMALS 2,         
    B90 TYPE P DECIMALS 2,       
    B120 TYPE P DECIMALS 2,        
    BG121 TYPE P DECIMALS 2,
    i defined feildcatalog as below:
    WA_FIELDCAT-FIELDNAME = 'B60'.
    WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
    WA_FIELDCAT-SELTEXT_L = TEXT-033.
    WA_FIELDCAT-DO_SUM = 'X' .
      WA_FIELDCAT-OUTPUTLEN = 17.
      WA_FIELDCAT-DATATYPE = 'DEC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR  WA_FIELDCAT.
    even if i try to download the ouput feilds in file,then also i am getting a run time error as field symbols are not assign,
    Please help.
    Thanks and Regards,
    Mohit

    Hi,
    I am getting a dump that cause of  by a message type (X).Same i get if i try to download the file.
    My ouput internal table is as below:
    data:BEGIN OF IT_FINAL occurs 0,
          BUKRS TYPE BUKRS,               "Company code
          KUNNR TYPE KUNNR,               "Customer number
          NAME1 TYPE NAME1,               "Name
          BILL_TO TYPE KUNNR,              "Bill To
          BILL_NAME TYPE NAME1,           "Bill To Name
          BRANCH TYPE FILKD,              "Branch
          BRANCH_NAME TYPE NAME1,         "Branch Name
          BRANCH_REGION TYPE REGIO,      "Region
          BRANCH_CITY TYPE ORT01,        "City
          BELNR TYPE BELNR,              "Accounting Document Number
          ACC_CLK_SOLD  TYPE BUSAB,       "A/C Clerk Sold To
          ACC_CLK_SOLD_NAME TYPE SNAME,  "A/C Name
          ACC_CLK_PAYER TYPE BUSAB,      "A/C Payer
          ACC_CLK_PAYER_NAME TYPE BUSAB,  "A/C Payer Name
          ASM_PART  TYPE  KUNN2,          "ASM Partner
          ASM_NAME TYPE   NAME1,          "ASM Name
          DUNNING TYPE BUSAB,             "Dunning Clerk
          KATR4 TYPE KATR4,               "Local /National Account
          ZUONR TYPE DZUONR,              "Assingment Number
          REFERENCE TYPE XBLNR,           "Reference
          XREF1  TYPE  XREF1,             "Ref Key1
          XREF2  TYPE  XREF2,             "Ref Key2
          XREF3  TYPE  XREF3,             "Ref Key3,
          SGTXT     TYPE SGTXT,           "Item Text
          DUE_DATE  TYPE SY-DATUM,        "Due Date
          DOC_DATE  TYPE BLDAT,           "Doc Date
          BILL_DOC_NO TYPE VBELN,         "Billing Doc Number
          ZTERM TYPE  DZTERM,              "Terms
          HKONT TYPE HKONT,               "Gl Account
          CURR TYPE P DECIMALS 2,         "Current Balance
          B30 TYPE  P DECIMALS 2,         "1-30
          B60 TYPE P DECIMALS 2,          "32-60
          B90 TYPE P DECIMALS 2,          "61-90
          B120 TYPE P DECIMALS 2,         "91-120
          BG121 TYPE P DECIMALS 2,        " >121
          BAL TYPE p DECIMALS 2,          "Balance
          P_CURR TYPE CHAR10,       "Current Percentage
          PB30 TYPE CHAR10,         "1-30 %
          PB60 TYPE CHAR10,         "32-60 Percentage
          PB90 TYPE CHAR10,         "61-90 Percentage
          PB120 TYPE CHAR10,        "91-120 Percentage
          PBG121 TYPE CHAR10,       ">121 %
          END OF it_final..
    My fieldcatalog is below:
    WA_FIELDCAT-FIELDNAME = 'BUKRS'.
        WA_FIELDCAT-TABNAME   =  'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L =   TEXT-004.
        WA_FIELDCAT-OUTPUTLEN = 12.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'KUNNR'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-005.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'NAME1'.
        WA_FIELDCAT-TABNAME   =  'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L =  TEXT-006.
        WA_FIELDCAT-OUTPUTLEN = 30.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BILL_TO'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-007.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BILL_NAME'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-008.
        WA_FIELDCAT-OUTPUTLEN = 30.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BRANCH'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-009.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BRANCH_NAME'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-043.
        WA_FIELDCAT-OUTPUTLEN = 30.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BRANCH_REGION'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L =  TEXT-010.
        WA_FIELDCAT-OUTPUTLEN = 8.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BRANCH_CITY'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-011.
        WA_FIELDCAT-OUTPUTLEN = 12.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BELNR'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-012.
        WA_FIELDCAT-OUTPUTLEN = 11.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ACC_CLK_SOLD'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-013.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ACC_CLK_SOLD_NAME'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-014.
        WA_FIELDCAT-OUTPUTLEN = 30.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ACC_CLK_PAYER' .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L =  TEXT-015.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ACC_CLK_PAYER_NAME'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L =  TEXT-016.
        WA_FIELDCAT-OUTPUTLEN = 30.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ASM_PART'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-017.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ASM_NAME'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-018.
        WA_FIELDCAT-OUTPUTLEN = 30.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'DUNNING' .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-019.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'KATR4'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-020.
        WA_FIELDCAT-OUTPUTLEN = 2.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ZUONR'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-044.
        WA_FIELDCAT-OUTPUTLEN = 18.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'REFERENCE'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-021.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'XREF1'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-022.
        WA_FIELDCAT-OUTPUTLEN = 12.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'XREF2'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-023.
        WA_FIELDCAT-OUTPUTLEN = 12.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'XREF3'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-024.
        WA_FIELDCAT-OUTPUTLEN = 12.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'SGTXT'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-025.
        WA_FIELDCAT-OUTPUTLEN = 50.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'DUE_DATE'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-026.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'DOC_DATE'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-027.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BILL_DOC_NO'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-028.
        WA_FIELDCAT-OUTPUTLEN = 15.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ZTERM'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-029.
        WA_FIELDCAT-OUTPUTLEN = 5.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'HKONT'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-030.
        WA_FIELDCAT-OUTPUTLEN = 11.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'CURR'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-031.
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DO_SUM = 'X' .
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'B30'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-032.
        WA_FIELDCAT-DO_SUM = 'X' .
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'B60'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-033.
        WA_FIELDCAT-DO_SUM = 'X' .
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'B90'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-034.
        WA_FIELDCAT-DO_SUM = 'X' .
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'B120'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-035.
        WA_FIELDCAT-DO_SUM = 'X' .
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BG121'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-036.
        WA_FIELDCAT-DO_SUM = 'X' .
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BAL'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-045.
        WA_FIELDCAT-DO_SUM = 'X' .
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'P_CURR'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-037.
        WA_FIELDCAT-OUTPUTLEN = 17.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'PB30'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-038.
        WA_FIELDCAT-OUTPUTLEN = 17.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'PB60'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-039.
        WA_FIELDCAT-OUTPUTLEN = 17.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'PB90'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-040.
        WA_FIELDCAT-OUTPUTLEN = 17.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'PB120' .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-041.
        WA_FIELDCAT-OUTPUTLEN = 17.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'PBG120' .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-042.
        WA_FIELDCAT-OUTPUTLEN = 17.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
         Please help.
    Thanks
    Mohit

  • Download colored ALV output in to EXCEL sheet

    Hi ,
    I want to download colored ALV output to Excel sheet with color.
    one of the field in ALV is with 4 colors depending on condition.
    i am unable to download the color using download option(that field is comming with out color).
    Please help me by providing the solution.
    Thanks in advance.
    Regards
    sarath

    Hi Srini,
    thanks for the reply.
    i am using standard download function only.
    if i use download->local file->HTML Format only the font is appearing in colors.in case of spread sheet no color comming.
    but my requirement is to download into excel and  background also with color(green...) font in black like that.
    (exactly appearing in the ALV)
    Thanks
    sarath

  • To download alv output to two excel sheets because of large data

    Hi all,
    I want to download alv output to excel sheet,I know how to do,but the no of record is very large and can not be accomodated in one sheet.
    can anyone please tell how to download it into two sheets or some other way.
    I want excel format only.
    Regards,
    sudha

    hi sudha yadav,
    right now i am working on the same issue.
    what right i am doing is that,
    i want to download an internal table it is containing more than 2 lakhs records but excel can accomidate 60000 records, so
    before call gui download i am sending first 60000 records into another internal table with same time, by using append statemen and indexs,
    that new internal table i am downloading
    again i am repeating the same thing by using sy-tabix,
    finally i am creating more than one excel file
    by using oops concepts we can also create in one excel file no of work sheets
    but its lengthy process so i am right now creating no of excel files only
    if it is useful , pls rewards points to this answer

Maybe you are looking for

  • Restored our SSRS 2008 R2 from one server to another; Dates are in UK format and not US

    We have restored our SSRS 2008 R2 from one server to another. The original server was in US locale/culture. The new server was in UK locale/culture, when the restore happened. However it should have been in US locale/culture. We have made this change

  • To mix or not to mix that is the question

    Hi, Whilst doing some research on JSP's I came across this line: "For more complicated HTML, using the out variable all the time loses some of the advantages of JSP programming. It is simpler to mix scriptlets and HTML. " (http://www.jsptut.com/Mixin

  • FAQ: Does Lightroom 4.3 install on Windows Vista?

    Yes, but if you have experienced some trouble when attempting to install Lightroom 4.3 on Windows Vista it may be because the downloaded installer is being blocked by Vista. See this TechNote for instructions on how to allow Lightroom 4.3 installatio

  • What's the better graphics card?

    The Radeon HD 6750M (1GB) from the 2011 macbook pros or the nVidia Geforce GT 650m (1GB) in the current refresh?

  • Message error in Nokia 5800 XM

    Hi, I'm using Nokia 5800 XM. In my phone, I am facing one issue with call summary. Even I set this option Settings->Calling->Call->Summary after Call -OFF It will display Balance and expiry date. (as I am using Pre-paid connection). I called Airtel,