All the columns of an alv grid report are not downloading in excel in 1 lin

Hi All,
I have some 60 columns in my alv grid report and user can download the report using list->export->localfile->spreadsheet.
What the issue is that all the columns are not downloading in one line, instead they split in two rows.
Please help.
Regards,
Neha Patel

hi,
just use this procedure it will solve your problem:
Firstly export  the data to memory using the FM LIST_FROM_MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = t_listobject
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE e000(su) WITH text-001.
ENDIF.
then i converted it into ASCII using LIST_TO_ASCI,
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = t_xlstab
listobject = t_listobject
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE e003(yuksdbfzs).
ENDIF.
This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
cl_abap_char_utilities=>horizontal_tab.
Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
This will create an excel attachment.
Sample code for formatting the data for the attachment in excel format.
u2022     Format the data for excel file download
LOOP AT t_xlstab INTO wa_xlstab .
DESCRIBE TABLE t_xlstab LINES lw_cnt.
CLEAR lw_sytabix.
lw_sytabix = sy-tabix.
u2022     If not new line then replace '|' by tabs
IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
WITH cl_abap_char_utilities=>horizontal_tab.
MODIFY t_xlstab FROM wa_xlstab .
CLEAR wa_xlstab.
wa_xlstab = cl_abap_char_utilities=>newline.
IF lw_cnt NE 0 .
lw_sytabix = lw_sytabix + 1.
u2022     Insert new line for the excel data
INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
lw_cnt = lw_cnt - 1.
ENDIF.
CLEAR wa_xlstab.
ENDIF.
ENDLOOP.
Sample code for creating attachment and sending mail:
FORM send_mail .
u2022     Define the attachment format
lw_doc_type = 'XLS'.
u2022     Create the document which is to be sent
lwa_doc_chng-obj_name = 'List'.
lwa_doc_chng-obj_descr = w_subject. "Subject
lwa_doc_chng-obj_langu = sy-langu.
u2022     Fill the document data and get size of message
LOOP AT t_message.
lt_objtxt = t_message-line.
APPEND lt_objtxt.
ENDLOOP.
DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
IF lw_tab_lines GT 0.
READ TABLE lt_objtxt INDEX lw_tab_lines.
lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
lwa_doc_chng-obj_langu = sy-langu.
lwa_doc_chng-sensitivty = 'F'.
ELSE.
lwa_doc_chng-doc_size = 0.
ENDIF.
u2022     Fill Packing List For the body of e-mail
lt_packing_list-head_start = 1.
lt_packing_list-head_num = 0.
lt_packing_list-body_start = 1.
lt_packing_list-body_num = lw_tab_lines.
lt_packing_list-doc_type = 'RAW'.
APPEND lt_packing_list.
u2022     Create the attachment (the list itself)
DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
u2022     Fill the fields of the packing_list for creating the attachment:
lt_packing_list-transf_bin = 'X'.
lt_packing_list-head_start = 1.
lt_packing_list-head_num = 0.
lt_packing_list-body_start = 1.
lt_packing_list-body_num = lw_tab_lines.
lt_packing_list-doc_type = lw_doc_type.
lt_packing_list-obj_name = 'Attach'.
lt_packing_list-obj_descr = w_docdesc.
lt_packing_list-doc_size = lw_tab_lines * 255.
APPEND lt_packing_list.
u2022     Fill the mail recipient list
lt_reclist-rec_type = 'U'.
LOOP AT t_recipient_list.
lt_reclist-receiver = t_recipient_list-address.
APPEND lt_reclist.
ENDLOOP.
u2022     Finally send E-Mail
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = lwa_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = lw_sent_to_all
TABLES
packing_list = lt_packing_list
object_header = lt_objhead
contents_bin = t_xlstab
contents_txt = lt_objtxt
receivers = lt_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Hope it will help you
Regards
Rahul sharma

Similar Messages

  • How to keep track of the changes done in ALV GRID Report

    Hi Experts,
    how to keep track of the changed record in ALV GRID Report. how to set the field to be editable even for the entire row also. Can anybody guide along with code also?...
    Valuable answers will be rewarded.
    Thanks,
    Satish.

    Hi,
    Access the table through SM30. It comes blank as standard. Click "New Entries" and make entries for changes to be tracked. For example, whenever an org. unit changes 002 and 003 relationship, you will make entries like:
    01 O 1001 B002 Activate box checked
    01 O 1001 B003 Activate box checked
    Here, 01 is your active plan version, O is org. unit, 1001 is infotype and B002 and B003 are the subtypes. You can also use * for infotype and subtype which means every change will be logged.
    If you then run the report RHCDOC_DISPLAY through SA38, it will pick up all the changes pertaining to B002 and B003 relationship for org. units (in the above example).
    Similarly, you can set up this table for other object types.
    For more information, follow SPRO>Personnel Management>OM>Basic Settings>Activate change documents and go through the documentation for that node. Also, read up the documentation for the report.
    Hope this helps.
    Donnie

  • VF05 Report(ALV GRID REPORT) to be exported into excel without  Header

    Hi
    I need to export the VF05 Billing due list report(ALV Grid Report) into excel with out having the Top of the page. I need to export only the bottom grid into excel sheet.
    Plz help me on this.  URGENT

    Dear Chandra sekhar
    Once VF05 is executed, select "List" on top left followed by "Save - File" and "Spreadsheet".
    By default, the data will be downloaded into a text file.  Open the file and select "Save as" and choose "Excel" and save.  Now you can make changes whatever you want.
    Thanks
    G. Lakshmipathi

  • ALV GRID Report is not showing all records which is in internal table

    hi all,
    have one doubt. please clarify me. ALV Report is working fine since long tiem. But suddenly this report is showing few records only for the given input.   Example:   it_main table have 50 records, but output is showing only 10 records only. (we have not made any modifications in this report).
    temporarily i have given excel output file from it_main table. excel file is showing all records.
    here it_main have all the records. but output is showing few records only. it is not showing any error. i have tested with REUSE_ALV_LIST_DISPLAY function also. but it also showing same results(few records only.)
    please give me some idea.
    FORM display_alv_report.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_buffer_active          = 'X'
          i_callback_program       = sy-repid
          is_layout                = wa_layout
          it_fieldcat              = it_fcat
          it_events                = it_events
          i_save                   = 'A'
          is_variant               = wa_variant
        TABLES
          t_outtab                 = it_main
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE text-204 " 'Error in Display the list'
        TYPE 'I'.
        LEAVE TO LIST-PROCESSING.
      ENDIF.
    ENDFORM.            .                    "DISPLAY_ALV_REPORT
    Best Regards,
    Srinivas

    hi
    Please study this program and give me suggestions.
    ALV Declaration
    DATA : it_events TYPE slis_t_event,               "ALV event
               it_fcat   TYPE slis_t_fieldcat_alv,        "Field catalog
               it_list_top_of_page TYPE slis_t_listheader,
               c_tabname  TYPE slis_tabname   VALUE 'IT_MAIN'.
    DATA : wa_layout  TYPE slis_layout_alv,
                wa_event   TYPE slis_alv_event,
               wa_fcat    TYPE slis_fieldcat_alv,
               wa_variant TYPE disvariant.
    START-OF-SELECTION.
      PERFORM material_pass.
      PERFORM data_retrieval.
    END-OF-SELECTION.
      PERFORM sub_display_report.
    FORM sub_display_report .
      DATA status(1).
      IF r1 = 'X'.
        PERFORM build_fieldcatalog USING :
          '1'  'ERDAT'     'S.O DATE'             '' '10'  'X',
          '2'  'VBELN'     'SALE ORDER'           '' '10'  'X',
          '3'  'POSNR'     'SALE ITEM'            '' '6'   '',
          '4'  'BSTKD'     'CUSTOMER PO'          '' '35'  '',
          '5'  'BEZEI'     'REASON FOR REJECTION' '' '40'  '',
          '6'  'PLNUM'     'PLANNED ORDER'        '' '10'  '',
          '7'  'AUFNR'     'PROD.ORDER.'          '' '12'  '',
          '8'  'MATNR'     'MATERIAL NUMBER'      '' '18'  '',
          '9'  'MAKTX'     'MATERIAL DESCRIPTION' '' '40'  '',
          '10' 'WERKS'     'PLANT'                '' '4'   '',
          '11' 'KWMENG'    'SALE ORDER QTY'       '' '15'  '',
          '12' 'VRKME'     'UNIT'                 '' '4'   '',
          '13' 'GAMNG'     'PROD.ORDER QTY'       '' '13'  '',
          '14' 'IGMNG'     'CONFIRMED ORDER QTY'  '' '13'  '',
          '15' 'GMEIN'     'UNIT'                 '' '4'   '',
          '16' 'MENGE'     'G.R QUANTITY'         '' '13'  '',
          '17' 'SOBAL'     'S.O BALANCE'          '' '13'  '',
          '18' 'PRDBAL'    'PROD.BALANCE'         '' '13'  '',
          '19' 'GSM'       'GSM'                  '' '4'   '',
          '20' 'SIZE1'     'SIZE1'                '' '10'  '',
          '21' 'SIZE2'     'SIZE2'                '' '10'  ''.
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            filename              = pathname
            filetype              = ftype
            append                = 'X'
            write_field_separator = 'X'
          TABLES
            data_tab              = it_mains
          EXCEPTIONS
            file_write_error      = 1.
        IF sy-subrc = 0.
          status = 'S'.
        ELSE.
          status = 'E'.
        ENDIF.
      ELSEIF r2 = 'X' OR r3 = 'X'.
        PERFORM build_fieldcatalog USING :
          '1'  'ERDAT'     'S.O DATE'             '' '10'  'X',
          '2'  'VBELN'     'SALE ORDER'           '' '10'  'X',
          '3'  'POSNR'     'SALE ITEM'            '' '6'   '',
          '4'  'BSTKD'     'CUSTOMER PO'          '' '35'  '',
          '5'  'BEZEI'     'REASON FOR REJECTION' '' '40'  '',
          '6'  'PLNUM'     'PLANNED ORDER'        '' '10'  '',
          '7'  'AUFNR'     'PROD.ORDER.'          '' '12'  '',
          '8'  'MATNR'     'MATERIAL NUMBER'      '' '18'  '',
          '9'  'MAKTX'     'MATERIAL DESCRIPTION' '' '40'  '',
          '10' 'WERKS'     'PLANT'                '' '4'   '',
          '11' 'KWMENG'    'SALE ORDER QTY'       '' '15'  '',
          '12' 'VRKME'     'UNIT'                 '' '4'   '',
          '13' 'GAMNG'     'PROD.ORDER QTY'       '' '13'  '',
          '14' 'IGMNG'     'CONFIRMED ORDER QTY'  '' '13'  '',
          '15' 'GMEIN'     'UNIT'                 '' '4'   '',
          '16' 'MENGE'     'G.R QUANTITY'         '' '13'  '',
          '17' 'SOBAL'     'S.O BALANCE'          '' '13'  '',
          '18' 'PRDBAL'    'PROD.BALANCE'         '' '13'  '',
          '19' 'GSM'       'GSM'                  '' '4'   '',
          '20' 'SIZE1'     'SIZE1'                '' '10'  '',
          '21' 'CUT1'      'CUT1'                 '' '11'  '',
          '22' 'SIZE2'     'SIZE2'                '' '10'  '',
          '23' 'CUT2'      'CUT2'                 '' '11'  '',
          '24' 'SIZE3'     'SIZE3'                '' '10'  '',
          '25' 'CUT3'      'CUT3'                 '' '11'  '',
          '26' 'SIZE4'     'SIZE4'                '' '10'  '',
          '27' 'CUT4'      'CUT4'                 '' '11'  '',
          '28' 'SIZE5'     'SIZE5'                '' '10'  '',
          '29' 'CUT5'      'CUT5'                 '' '11'  '',
          '30' 'SIZE6'     'SIZE6'                '' '10'  '',
          '31' 'CUT6'      'CUT6'                 '' '11'  ''.
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            filename              = pathname
            filetype              = ftype
            append                = 'X'
            write_field_separator = 'X'
          TABLES
            data_tab              = it_mainall
          EXCEPTIONS
            file_write_error      = 1.
        IF sy-subrc = 0.
          status = 'S'.
        ELSE.
          status = 'E'.
        ENDIF.
      ENDIF.
      PERFORM build_layout.
      PERFORM build_events.
      PERFORM sub_comment_build USING it_list_top_of_page.
      PERFORM sub_set_variant.
      PERFORM display_alv_report.
      IF status = 'S'.
        MESSAGE 'Excel Output file Downloaded to Given Path' TYPE 'I'.
      ELSE.
        MESSAGE 'Download Not Possible' TYPE 'I'.
      ENDIF.
    ENDFORM.                    " SUB_DISPLAY_REPORT
    FORM BUILD_FIELDCATALOG
    FORM build_fieldcatalog USING  p_col_pos
                                   p_fieldname
                                   p_text
                                   p_datatype
                                   p_outputlen
                                   p_col_freez.
      wa_fcat-row_pos        = '1'.
      wa_fcat-col_pos        = p_col_pos.
      wa_fcat-fieldname      = p_fieldname.
      wa_fcat-tabname        = c_tabname.
      wa_fcat-reptext_ddic   = p_text.
      wa_fcat-datatype       = p_datatype.
      wa_fcat-ddic_outputlen = p_outputlen.
      wa_fcat-key            = p_col_freez.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    FORM build_layout.
      CLEAR: wa_layout.
      wa_layout-window_titlebar   = 'LIST OF GSM WISE OPEN SALE ORDERS'.
      wa_layout-colwidth_optimize = 'X'.
      wa_layout-totals_text       = 'CUMULATIVE'.
    ENDFORM.                    "BUILD_LAYOUT
    *&      Form  BUILD_EVENTS
    FORM build_events.
      CLEAR wa_event.
      REFRESH it_events.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = it_events
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      IF sy-subrc = 0.
        READ TABLE it_events INTO wa_event
             WITH KEY name = 'TOP_OF_PAGE'.
        IF sy-subrc EQ 0.
          wa_event-form = 'TOP_OF_PAGE'.
          APPEND wa_event TO it_events.
          CLEAR wa_event.
        ENDIF.
      ENDIF.
    ENDFORM.                    "BUILD_EVENTS
         -->P_IT_LIST_TOP_OF_PAGE  text
    FORM sub_comment_build  USING it_top_of_page TYPE slis_t_listheader.
      DATA ls_line TYPE slis_listheader.
      CLEAR ls_line.
      ls_line-typ = 'H'.
      ls_line-info = str1.
      APPEND ls_line TO it_top_of_page.
      CLEAR ls_line.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         it_list_commentary = t_header[].
    ENDFORM.                    " SUB_COMMENT_BUILD
    *&      Form  SUB_SET_VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM sub_set_variant .
      CLEAR wa_variant.
      wa_variant-report = sy-repid.
      wa_variant-username = sy-uname.
    wa_variant-variant = c_variant.
    wa_variant-variant = p_layout.
    ENDFORM.                    " SUB_SET_VARIANT
    *&      Form  DISPLAY_ALV_REPORT
    *Display Report Using ALV GRID
    FORM display_alv_report.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_buffer_active          = 'X'
          i_callback_program       = sy-repid
         i_callback_pf_status_set = c_pf_status
         i_callback_user_command  = c_user_command
          is_layout                = wa_layout
          it_fieldcat              = it_fcat
         it_sort                  = it_sort[]
          it_events                = it_events
          i_save                   = 'A'
          is_variant               = wa_variant
        TABLES
          t_outtab                 = it_main
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE text-204 " 'Error in Display the list'
        TYPE 'I'.
        LEAVE TO LIST-PROCESSING.
      ENDIF.
    ENDFORM.            .                    "DISPLAY_ALV_REPORT
    *ALV Report Header
    FORM top_of_page.
      DATA : t_header TYPE slis_t_listheader WITH HEADER LINE,
             wa_header TYPE slis_listheader,
             t_line LIKE wa_header-info,
             ld_lines TYPE i,
             ld_linesc(10) TYPE c.
      wa_header-typ  = 'H'.
    T_HEADER-INFO = 'LIST OF GSM WISE OPEN SALE ORDERS'.
      wa_header-info = str1.
      APPEND wa_header TO t_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header[].
    ENDFORM.                    "TOP_OF_PAGE
    here it_main internal table having all data. but output is showing few records only.
    pl. give some idea.
    Thanks & Regards
    Srinivas.

  • How to validate the columns in dynamic alv grid

    Hi Friends,
    I want to validatethe value of all the columens (min 1 and max 40) which i create dynamically in alv grid.
    value must be between 0 and 1 only.
    Please help ,, need urgently.

    method handle_data_changed.
         data: ls_good type lvc_s_modi,
               li_diff type i,
               value type p DECIMALS 3,
               old_value type p DECIMALS 3,
               lw_outtab1 type gt_tab.
    clear value.
           loop at er_data_changed->mt_good_cells into ls_good.
           value = ls_good-value.
           old_value = ls_good-value.
            if value lt 0 or value gt 1.
               MESSAGE 'Value is out of range' TYPE 'I'.
              Read table gt_outtab1 into lw_outtab1 index ls_good-row_id .
               perform show_alv.
               clear ls_good.
            ENDIF.
          ENDCASE.
           ENDLOOP.
    I again created the table.. actually data is not changed in the internal table but still it shows the changed value in the alv grid. even in build the table again and call the refersh alv grid method..

  • How to find all the columns in an ALV Layout?

    Hi all
       Here's what I need to do. When I run a program (with ALV output in online mode) in the background mode, I need to save the data to a file. And this file is supposed to contain only those columns in a specified ALV Layout.
      Any suggestion how to achieve this?
      Thank you so much!!!

    hi,
    u are appending to a field catlog.
    eg:
      int_fieldcatalog-fieldname   = 'CHECT'.
      int_fieldcatalog-seltext_m   = 'Check No'.
      int_fieldcatalog-col_pos     =  0.
      int_fieldcatalog-outputlen   = 13.
      int_fieldcatalog-emphasize   = 'X'.
      int_fieldcatalog-key         = 'X'.
      APPEND int_fieldcatalog TO int_fieldcatalog.
      CLEAR  int_fieldcatalog.
    so chk this int_fieldcatalog internal table.
    it will containthe field in the field in the ALV display.
    rgds
    anver

  • I just  downloaded the ios7 and now it won't let me update any of my apps it keeps takeing me out of the apple store than all the apps that need to be updated are not on the list anymore

    I Just downloaded the ios7 on my iPod 5 and it will not let me update my apps every time I try they are gone and it exiting out of the apple store also my battery has been dieing a lot faster lately too

    @tx4kings
    While on your iPhone
    log out of iTunes
    restart your device
    connect to a strong wifi
    log back into iTunes
    update

  • All the Google toolbar buttons(other then print) are not visible after installing Firefox 4

    Google toolbar buttons (other then print) are not visible after installing Firefox 4 for Mac.

    Yes - there is a fix... called IE9... http://windows.microsoft.com/en-US/internet-explorer/downloads/ie-9/worldwide-languages

  • ALV totals row ,should not download in EXCEL

    Hello ,
                  I have developed a ALV report with subtotals.
    In the output, it will display an extra row with the Grand total, but when we try to downalod into Local PC excel file,
    it is downlaoding the totals row also. But the requirement is not to download that.
    Any option is there to not to downlad that row ?
    Let me know if anything needed.
    Thanks,
    AV

    Hi,
    I will suggest one thing.
    <li>Define layout structure
    DATA: wa_layout type SLIS_LAYOUT_ALV.
    <li>One checkbox on selection-screen for with or without total line.
    PARAMETERS: p_check AS CHECKBOX.
    <li>Now set the below on based on checkbox value
    IF p_check = 'X'. "Lets say without total line.
    wa_layout-no_totalline = 'X'.
    ENDIF.
    <li>Now pass wa_layout through REUSE* function module.
    Thanks
    Venkat.O

  • Microsoft Excel Icon in ALV Grid Report

    Hi all,
    We have a customized report. When we execute that reports, it open in ALV Grid format. When we choose "Microsoft Excel" Icon to change layout to Excel, it then shows the report in excel without any data.
    Can any one please tell me that why there is no data? should i need to do any settings in excel for this?
    Please respond.
    Best Regards,
    AI

    Hi,
    Refer these:
    Microsoft Excel Icon in ALV Grid Report
    Re: Not able display the Excel Icon in ALV List Display
    Hope it helps
    Regards
    Mansi

  • ALV Grid Report spool problem with column with no data

    Hello All,
    I have created a simple alv grid report the report has a description field of 40 ch for which I have made the display length as 20 ch . This works fine in the foreground but when I run the report in background when there is no data in this column this being overwritten with the next column. Which is causing a mismatch between the header and the data below it.
    Also when I try to download the report in foreground into excel the columns are not matching with the headers this again happens for columns when there is no data.
    Kindly please suggest what is going wrong.
    Thanks,
    ranjan

    Hi,
    For checking the output from background job, check the job and enter JDBG in the command bar and execute.
    Check the field catalog and the table contents in debugging just before display.
    Edited by: Jayanthi Jayaraman on Dec 2, 2010 4:09 AM

  • How to display first SPACE character in Column of ALV Grid Report?

    Hello All,
    In ALV Grid report, One of the column has a value like ' Test_Value'. In this value first character is SPACE but in display SPACE is not appearing.
    Field catalog type is:- slis_t_fieldcat_alv
    I have used the function module:- REUSE_ALV_GRID_DISPLAY
    Is there any settings required in Fieldcatalog Internal table for displaying leading SPACE chara.?
    its a field not the header.
    thanks in advance.
    Rahul

    Hi all,
    did any body have a solution for this problem?
    In ALV Grid report, One of the column has a value like ' Test_Value'. In this value first character is SPACE but in display SPACE is not appearing.
    Field catalog type is:- slis_t_fieldcat_alv
    I have used the function module:- REUSE_ALV_GRID_DISPLAY
    Is there any settings required in Fieldcatalog Internal table for displaying leading SPACE chara.?
    its a field not the header.
    thanks in advance.
    Rahul

  • How to get the alv grid report in another screen when double click on basic

    Hi.
    I have created an alv report using class cl_gui_alv_grid.I got another report in the same screen,when double clicked on basic list(using double_click event).I want to get this report in another screen.What i have to do?(In classical reports i worked with sy-lsind = 1 ,but how to do here?)
    How to set color to the selected rows in the alv grid report?I worked with change_data_from_inside method of cl_gui_alv_grid.But it didn't work out..
    With Regards,
    Ramana.

    On double click event . you will have to call another screen say 9000.
    now within screen 900 PBO.. you will have to prepare the fieldcatalog/layout.. and the table to be displayed there.
    in PAI of screen 9000, you can return to the original ALV.
    method double_click.
    call screen 9000.
    endmethod.
    " now in PBO create a module display_alv2
    module display_alv2.
    'prepare the fieldcat/layout info for new alv
    'add the data to the new ALV table
    'instantiate the grid call.. etc
    'call the ALV
    endmodule
    "in PAI
    module exit.
    case sy-ucomm.
    when 'ENT1'.
      leave to screen 0.
    endcase.
    endmodule
    while preparing the field catalog you can mention the EMPHASIZE field, whish will give color to tht column
    E.g
    *--Service Order
        ls_fieldcat-tabname   = 'IT_FINAL_VALID'.
        ls_fieldcat-fieldname = 'AUFNR'.
        ls_fieldcat-scrtext_m = 'Service Order'.
        ls_fieldcat-ref_table = 'AUFK'.
        ls_fieldcat-ref_field = 'AUFNR'.
        ls_fieldcat-col_pos   = 1.
        ls_fieldcat-outputlen = 12.
        ls_fieldcat-emphasize = 'C400'.  "This will add color to the cell
        APPEND ls_fieldcat TO fcat_valid.
    Hope this helps.

  • How to display first SPACE charcter in Column of ALV Grid Report?

    Hello experts,
    In ALV Grid report, One of the column has a value like ' Test_Value'. In this value first character is SPACE but in display SPACE is not appearing.
    Field catalog type is:- slis_t_fieldcat_alv
    I have used the function module:- REUSE_ALV_GRID_DISPLAY
    Is there any settings required in Fieldcatalog Internal table for displaying leading SPACE chara.?
    Please suggest.
    Thanks & Regards
    Jagesh

    hi,
    After fetching the data into the intenal table.
    loop that internal table.
    declara a variable of type character  and length 1.
    see the example code below
    DATA : wa_space ,
             tbx TYPE sy-tabix.
      wa_space = ' '.  "---> press ALT+255 to get space
      LOOP AT it INTO wa.
        tbx = sy-tabix.
        CONCATENATE wa_space wa-<fname> INTO wa-<fname>.
        MODIFY it INDEX tbx  FROM wa  TRANSPORTING fname.
      ENDLOOP.
    Hope it helps you.
    Thanks & Regards

  • Short dump when exporting the ALV grid report in to spread sheet

    HI,
    I am facing a problem when downloading ALV grid report in to spread sheet LIST>EXPORT>LOCAL FILE -->SPREADSHEET.
    in shotdump the cursor shows : "assign cline+cbegin(clength) to <field_cont>."
    In SAP internal table LIST,in the first record the value of the filed LENG is 0. when i have changed this value ex:10 etc it is coming properly.
    Kindly help me
    Nagendra

    Is this a standard SAP report, or your own? Can you tell what your report does, if it is a custom ALV report?

Maybe you are looking for