Reg: Print in ALV List

Hi Experts,
I have a requirement where i have to display an ALV List without the TOP OF PAGE contents, but when i click print option in the ALV List i have to print the data with the TOP OF PAGE.
How can i achieve this. Kindly help at the earliest.
Thanks and Regards
Vikram S

Do as given below.
Before building fieldscatalog
perform eventtab_build.
  data: ls_event type slis_alv_event.
  call function 'REUSE_ALV_EVENTS_GET'
    exporting
      i_list_type     = 0
    importing
      et_events       = lt_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.
  read table lt_events with key name = slis_ev_top_of_page
  into ls_event.
  if sy-subrc = 0.
    move 'TOP_OF_PAGE' to ls_event-form.
    modify lt_events from ls_event index sy-tabix.
  endif.
  clear ls_event.
form top_of_page.                                           "#EC CALLED
  data: ls_line type slis_listheader.
  clear gt_list_top_of_page.
  clear ls_line.
  ls_line-typ  = 'S'.
  ls_line-key = text-400.
  append ls_line to gt_list_top_of_page.
  clear ls_line.
  ls_line-typ  = 'S'.
  ls_line-key  = text-200.
  ls_line-info = period.
  append ls_line to gt_list_top_of_page.
if sy-ucomm eq 'PRINT'
  call function 'REUSE_ALV_COMMENTARY_WRITE'
       exporting
           i_logo             = 'ENJOYSAP_LOGO'
            it_list_commentary = gt_list_top_of_page.
endform.                    "top_of_page
endif.

Similar Messages

  • Problem  in Printing the ALV list

    Hi,
       I have one problem with printing the ALV list. While printing the ALV list(thro Print Icon on application Tool bar) ,Fist page of my print out contains some other inforamtion.
      inforamtions included two tables
      first table  contains Sort Criteria, Ascdg, Descnd, Subtotal  columns.
      And second table contains Data statistics , number of
    columns.
    But from Second page onwards , my alv list printed correctly .
      How can i avoid the First page inforamtion and
          what is the Reason of coming like this?
    Thanks,
    Neptune.M

    I assume you are using function module Reuse_alv_grid_display or reuse_alv_list_display for ALV.
    If this is the case, there is a parameter called IS_PRINT that you need to supply while calling the function module.
    you can for exapmle declare
    data:
    printstruc type SLIS_PRINT_ALV.
    printstruc-NO_PRINT_LISTINFOS = 'X'.
    call function 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
    IS_PRINT = printstruc
    There are many other flags in is_print structures that you can use to manipulate the printing.
    Cheers!

  • How to print two alv lists in one spool request

    Hello,
    I have made a report which has one alv list based on CL_SALV_TABLE and a message box displayed in a splitter container based on SBAL. In dialog mode everything is fine.
    If I run the report in batch mode, I have put the alv table to
    list_display = abap_true.
    For printing the messages I am using FM BAL_DSP_LOG_PRINT. It has this nice parameter
    i_s_list_append = abap_true.
    Unfortunatly the messages are not appended to the alv list, nor are they in the same spool request.
    I think the system will put it only into the first spool request, when the name, the printer, the number of prints and the format are the same and of couse, if the spool request is still open for appenfing (which it is).
    The name and the format are not the same in my case. So I tried to set the name to TEST using the print options of the FM
    ls_print_options-print_ctrl-pri_params-plist = 'TEST'.
    But unfortunately it is not working. No changes to the name, when I run the report in batch mode.
    Who has experiance with that? Why are both lists not in the same spool request? Are my findings right? Why isn't the name changed?
    Thank you for your help,
    Peter

    do 2 times
    perform write_form.
    end do.
    for header u can give condtion in form.
    use if condition in the editor...
    this will help u...
    Reward IF....... <= IF what? Points removed... read [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]!
    Regards
    Anbu
    Edited by: Julius Bussche on Jul 17, 2008 7:01 PM

  • Problem with printing ALV lists

    Hey Guys,
    I have a problem with printing ALV lists ,
    I created a report with several ALV lists (not grids) on the same screen but when i attempt to print the report
    it prints each alv list on a different page..so if i have 3 alv lists in the same report it will print the report on 3 pages
    How can i print  them all in one page?
    Thanks in advance
    Noha Salah.

    Hey Max,
    I tried setting the Layout-list_append  before my block_list_append function call
    And setting the is_print-NO_NEW_PAGE , it printed the 3 lists on one page the only problem i have
    is that the lists are truncated and the list formats has totally been messed up..how can i restore them back
    to their original format?

  • Alv list printing-dump error

    hai,
    i get following dump error when tryign to print a alv list report.
    'Illegal interruption of the event LOAD-OF-PROGRAM.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "SAPLSZA12" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    Error analysis
    During the flow of the event LOAD-OF-PROGRAM (event for the
    initialization of an ABAP program), a condition occurred under which
    the event was to be left early. This is not permitted as it would
    result in an inconsistent status in the ABAP program.'
    the problem resolves for a particular output(when i restrict the list to lesser rows) by changing FORMAT from
    X_65_255 to X_90_120 in the print dialog properties option..
    anycase i will have to print the output for all conditions.

    hi,
      did check..
    i am using a report program(and directly executing from se38)
    it doesnt come under module pool.
    however u r link suggests that,when the function module for ALV LIST DISPLAY is called,the error is triggered(LOAD OF PROGRAM)..
    hmm checking further in these lines..
    thanks for the inputs..

  • Alv list report-problems while printing

    hai,
    i get following dump error when tryign to print a alv list report.
    'Illegal interruption of the event LOAD-OF-PROGRAM.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLSZA12" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        During the flow of the event LOAD-OF-PROGRAM (event for the
        initialization of an ABAP program), a condition occurred under which
        the event was to be left early. This is not permitted as it would
        result in an inconsistent status in the ABAP program.'
    the problem resolves for a particular output(when i restrict the list to lesser rows) by changing FORMAT from
    X_65_255 to X_90_120 in the print dialog properties option..
    however this restricts the coloumn width..
    anycase i will have to print the output for all conditions.
    the problem seems to be centred around number of rows in the list output..

    is somethign wrong with the values in this internal table gt_comtypes_tab...
    this is where the dump is pointing..at LAOD OF PROGRAM EVENT
    1     FUNCTION addr_get_conversion_table.
    2     *"----
    3     ""Lokale Schnittstelle:
    4     *"  EXPORTING
    5     *"     VALUE(COMTYPES_TAB) TYPE  ADCOMTYPES_TAB
    6     *"  EXCEPTIONS
    7     *"      INTERNAL_ERROR
    8     *"----
    9
    10       comtypes_tab = gt_comtypes_tab.
    11
    12     ENDFUNCTION.
    values of gt_comtypes_tab.
    2     TEL     ADTEL
    3     FAX     ADFAX
    4     TTX     ADTTX
    5     TLX     ADTLX
    6     INT     ADSMTP
    7     RML     ADRML
    8     X40     ADX400
    9     RFC     ADRFC
    10     PRT     ADPRT
    11     SSF     ADSSF
    12     URI     ADURI
    13     PAG     ADPAG

  • ALV List  printing correction

    Hi
    I am trying to print a ALV list that contains Subtotals and Grand Total. I want subtotals and grand total to be bold while printing. i can see the subtotal and grand total are bold in list display but only grand total is printed bold.
    can anybody help me where to do the setting to print subtotals in bold.
    Thanks
    hem

    hi
    ABAP Certification, Smartform, Sapscripts, BAPI, JAVA, Visual Basic Programming Books
    A Simple ABAP ALV LIST VIEWER Example
    This ALV program have all the basic report requirements such as page heading, page no, sub-total and a grand total.
    This is a basic ALV with the followings:-
    - Page Heading
    - Page No
    - Sub-Total
    - Grand Total
    REPORT ZALV.
    TYPE-POOLS: SLIS.
    DATA: G_REPID LIKE SY-REPID,
    GS_PRINT            TYPE SLIS_PRINT_ALV,
    GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
    GT_EVENTS           TYPE SLIS_T_EVENT,
    GT_SORT             TYPE SLIS_T_SORTINFO_ALV,
    GS_LAYOUT           TYPE SLIS_LAYOUT_ALV,
    GT_FIELDCAT         TYPE SLIS_T_FIELDCAT_ALV,
    FIELDCAT_LN LIKE LINE OF GT_FIELDCAT,
    COL_POS TYPE I.
    DATA: BEGIN OF ITAB,
      FIELD1(5) TYPE C,
      FIELD2(5) TYPE C,
      FIELD3(5) TYPE P DECIMALS 2,
    END OF ITAB.
    DATA: BEGIN OF ITAB1 OCCURS 0.
      INCLUDE STRUCTURE ITAB.
    DATA: END OF ITAB1.
    DATA: BEGIN OF ITAB_FIELDCAT OCCURS 0.
      INCLUDE STRUCTURE ITAB.
    DATA: END OF ITAB_FIELDCAT.
    Print Parameters
    PARAMETERS:
                P_PRINT  AS CHECKBOX DEFAULT ' ', "PRINT IMMEDIATE
                P_NOSINF AS CHECKBOX DEFAULT 'X', "NO SELECTION INFO
                P_NOCOVE AS CHECKBOX DEFAULT ' ', "NO COVER PAGE
                P_NONEWP AS CHECKBOX DEFAULT ' ', "NO NEW PAGE
                P_NOLINF AS CHECKBOX DEFAULT 'X', "NO PRINT LIST INFO
                P_RESERV TYPE I.                  "NO OF FOOTER LINE
    INITIALIZATION.
    G_REPID = SY-REPID.
    PERFORM PRINT_BUILD    USING GS_PRINT.      "Print PARAMETERS
    START-OF-SELECTION.
    TEST DATA
    MOVE 'TEST1' TO ITAB1-FIELD1.
    MOVE 'TEST1' TO ITAB1-FIELD2.
    MOVE '10.00' TO ITAB1-FIELD3.
    APPEND ITAB1.
    MOVE 'TEST2' TO ITAB1-FIELD1.
    MOVE 'TEST2' TO ITAB1-FIELD2.
    MOVE '20.00' TO ITAB1-FIELD3.
    APPEND ITAB1.
    DO 50 TIMES.
      APPEND ITAB1.
    ENDDO.
    END-OF-SELECTION.
    PERFORM BUILD.
    PERFORM EVENTTAB_BUILD CHANGING GT_EVENTS.
    PERFORM COMMENT_BUILD  CHANGING GT_LIST_TOP_OF_PAGE.
    PERFORM CALL_ALV.
    FORM BUILD.
    DATA FIELD CATALOG
    Explain Field Description to ALV
    DATA: FIELDCAT_IN TYPE SLIS_FIELDCAT_ALV.
    CLEAR FIELDCAT_IN.
    FIELDCAT_LN-FIELDNAME = 'FIELD1'.
    FIELDCAT_LN-TABNAME   = 'ITAB1'.
    *FIELDCAT_LN-NO_OUT    = 'X'.  "FIELD NOT DISPLAY, CHOOSE FROM LAYOUT
    FIELDCAT_LN-KEY       = ' '.   "SUBTOTAL KEY
    FIELDCAT_LN-NO_OUT    = ' '.
    FIELDCAT_LN-SELTEXT_L = 'HEAD1'.
    APPEND FIELDCAT_LN TO GT_FIELDCAT.
    CLEAR FIELDCAT_IN.
    FIELDCAT_LN-FIELDNAME = 'FIELD2'.
    FIELDCAT_LN-TABNAME   = 'ITAB1'.
    FIELDCAT_LN-NO_OUT    = 'X'.
    FIELDCAT_LN-SELTEXT_L = 'HEAD2'.
    APPEND FIELDCAT_LN TO GT_FIELDCAT.
    CLEAR FIELDCAT_IN.
    FIELDCAT_LN-FIELDNAME     = 'FIELD3'.
    FIELDCAT_LN-TABNAME       = 'ITAB1'.
    FIELDCAT_LN-REF_FIELDNAME = 'MENGE'. "<- REF FIELD IN THE DICTIONNARY
    FIELDCAT_LN-REF_TABNAME   = 'MSEG'.  "<- REF TABLE IN THE DICTIONNARY
    FIELDCAT_LN-NO_OUT        = ' '.
    FIELDCAT_LN-DO_SUM        = 'X'.   "SUM UPON DISPLAY
    APPEND FIELDCAT_LN TO GT_FIELDCAT.
    DATA SORTING AND SUBTOTAL
    DATA: GS_SORT TYPE SLIS_SORTINFO_ALV.
    CLEAR GS_SORT.
    GS_SORT-FIELDNAME = 'FIELD1'.
    GS_SORT-SPOS      = 1.
    GS_SORT-UP        = 'X'.
    GS_SORT-SUBTOT    = 'X'.
    APPEND GS_SORT TO GT_SORT.
    CLEAR GS_SORT.
    GS_SORT-FIELDNAME = 'FIELD2'.
    GS_SORT-SPOS      = 2.
    GS_SORT-UP        = 'X'.
    *GS_SORT-SUBTOT    = 'X'.
    APPEND GS_SORT TO GT_SORT.
    ENDFORM.
    FORM CALL_ALV.
    ABAP List Viewer
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = G_REPID
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_STRUCTURE_NAME = 'ITAB1'
    IS_LAYOUT =  GS_LAYOUT
    IT_FIELDCAT = GT_FIELDCAT[]
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
      IT_SORT = GT_SORT[]
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
      IT_EVENTS = GT_EVENTS[]
    IT_EVENT_EXIT =
      IS_PRINT = GS_PRINT
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = ITAB1
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2.
    ENDFORM.
    HEADER FORM
    FORM EVENTTAB_BUILD CHANGING LT_EVENTS TYPE SLIS_T_EVENT.
    CONSTANTS:
    GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
    *GC_FORMNAME_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE'.
      DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                I_LIST_TYPE = 0
           IMPORTING
                ET_EVENTS   = LT_EVENTS.
      READ TABLE LT_EVENTS WITH KEY NAME =  SLIS_EV_TOP_OF_PAGE
                               INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
        APPEND LS_EVENT TO LT_EVENTS.
      ENDIF.
    define END_OF_PAGE event
    READ TABLE LT_EVENTS WITH KEY NAME =  SLIS_EV_END_OF_PAGE
                             INTO LS_EVENT.
    IF SY-SUBRC = 0.
      MOVE GC_FORMNAME_END_OF_PAGE TO LS_EVENT-FORM.
      APPEND LS_EVENT TO LT_EVENTS.
    ENDIF.
    ENDFORM.
    FORM COMMENT_BUILD CHANGING GT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
      DATA: GS_LINE TYPE SLIS_LISTHEADER.
      CLEAR GS_LINE.
      GS_LINE-TYP  = 'H'.
      GS_LINE-INFO = 'HEADER 1'.
      APPEND GS_LINE TO GT_TOP_OF_PAGE.
      CLEAR GS_LINE.
      GS_LINE-TYP  = 'S'.
      GS_LINE-KEY  = 'STATUS 1'.
      GS_LINE-INFO = 'INFO 1'.
      APPEND GS_LINE TO GT_TOP_OF_PAGE.
      GS_LINE-KEY  = 'STATUS 2'.
      GS_LINE-INFO = 'INFO 2'.
      APPEND GS_LINE TO GT_TOP_OF_PAGE.
    CLEAR GS_LINE.
    GS_LINE-TYP  = 'A'.
    GS_LINE-INFO = 'ACTION'.
    APPEND GS_LINE TO  GT_TOP_OF_PAGE.
    ENDFORM.
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
      WRITE: SY-DATUM, 'Page No', SY-PAGNO LEFT-JUSTIFIED.
    ENDFORM.
    FORM END_OF_PAGE.
      WRITE at (sy-linsz) sy-pagno CENTERED.
    ENDFORM.
    PRINT SETTINGS
    FORM PRINT_BUILD USING LS_PRINT TYPE SLIS_PRINT_ALV.
      LS_PRINT-PRINT              = P_PRINT.  "PRINT IMMEDIATE
      LS_PRINT-NO_PRINT_SELINFOS  = P_NOSINF. "NO SELECTION INFO
      LS_PRINT-NO_COVERPAGE       = P_NOCOVE. "NO COVER PAGE
      LS_PRINT-NO_NEW_PAGE        = P_NONEWP.
      LS_PRINT-NO_PRINT_LISTINFOS = P_NOLINF. "NO PRINT LIST INFO
      LS_PRINT-RESERVE_LINES      = P_RESERV.
    ENDFORM.
    *END OF ZALV PROGRAM
    i copied the program from the below link
    http://www.sap-basis-abap.com/sapalv.htm
    hope it will help you
    Regards
    Sreelatha Gullapalli

  • Print ALV list shaded

    Hi all,
    Currently if we print an ALV list, the font of the subtotal and total lines would be bold. But the user wants the subtotal and total lines to be shaded, to be more outstanding. Is there a way to do that?
    I tried the printer inialization in the device type but it didn't work, as I am not familiar with the PCL language.
    Thanks
    ben

    Hi,
    Are you using ALV OOPs or ordinary FM?
    IF it is through OOPs, you can write some class methods for this and using simple WRITE stmts set the format of the line.
    If it is Fm, I think it is difficult to have this line shaded.
    Regards
    Subramanian

  • How to print text on container using oop on alv list

    Hello Guru's,
             pl guide me how to print text on container using alv list-display which have interactive events  using     oop classes/methods ...
                    I want to print hard coded text on coantainer , on double clicking it will call another screen.
    Pl Help..
    Message was edited by:
            paresh sonavane

    Hi Paresh,
           1.      Go to the Layout and Create One custom container box and give name it.
            2. Custom Container is the one type of tool and its used for Displaying the Reports 
                with the use of ABAP Objects.
            3. Go to se38 and Write The Following Code.
    tables ZTEAM_GD.
    DATA : OBJ TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
           OBJ1 TYPE REF TO CL_GUI_ALV_GRID.
    DATA IT_TEAM LIKE TABLE OF ZPLAYER_BAT_DET       .
    SELECT * FROM ZPLAYER_BAT_DET INTO TABLE IT_TEAM.
    CREATE OBJECT OBJ
      EXPORTING
        CONTAINER_NAME              = 'ALV'.          -
    > Give ur Container Name
    CREATE OBJECT OBJ1
      EXPORTING
        I_PARENT          = OBJ.
    CALL METHOD OBJ1->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
        I_STRUCTURE_NAME              = 'ZPLAYER_BAT_DET'
      CHANGING
        IT_OUTTAB                     = IT_TEAM.
    *CALL METHOD OBJ1->SET_DROP_DOWN_TABLE
    EXPORTING
       I_STRUCTURE_NAME = 'ZTEAM_GD'
    CHANGING
       IT_OUTTAB        = IT_TEAM.
    CALL SCREEN 9000.
    *&      Module  USER_COMMAND_9000  INPUT
          text
    MODULE USER_COMMAND_9000 INPUT.
    CASE SY-UCOMM.
    WHEN 'EXT'.
      LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPU     
    Thanks.
    Reward If Helpful.

  • Printing ALV list with ADS (pdf printer) in non-english charset

    Hello!
    I have an issue about printing alv list with pdf printer in non-english charset. We have two printers. One for alv lists (SWINCF: Casc.Fonts SAPWIN Unicode) and one for pdf forms(adobe document service). I want to use one printer for any documents. But PDF printer prints non-english charset like ########.
    What can I do ?

    Hi, Roman!
    I want to use PDF printer for both types of output. I have a dedicated java instance for ADS.
    There is a device type for our Kyocera Printer. My pdf printer prints ALV list good exept russian charset.
    It prints like #####

  • Down loading ALV List to local file /print

    hi ,
    We have a program that displays data on an ALV list. Then, when you click on the 'Print' icon, or try to download to a local file, it gives a short dump with a message 'OBJECTS_NOT_CHARLIKE'.
    Any solutions on the same ....
    thanks

    Hi,
    i hope you have all your data in and internal table.
    If this is so use the following code,
    *--- Down load the file
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    filename = lv_file
    filetype = 'DAT'
    TABLES
    data_tab = gt_excel1
    EXCEPTIONS
    file_open_error = 1
    file_write_error = 2
    invalid_filesize = 3
    invalid_type = 4
    no_batch = 5
    unknown_error = 6
    invalid_table_width = 7
    gui_refuse_filetransfer = 8
    customer_error = 9
    OTHERS = 10.
    IF sy-subrc = 0.
    MESSAGE i000(zf) WITH text-017.
    ELSE.
    MESSAGE e939(zf) WITH lv_file. "Errors while downloading.
    ENDIF.
    Following should be passed,
    v_file --> file path with file name (provide filename with '.xls' extension)
    gt_excel --> Internal table which has to be downloaded to excel.
    thanks
    vijay
    reward points if helpful.

  • Couldn't print header of ALV list

    Hi All,
    I couldn't print header for the alv list. Code is below.
    REPORT ztest123456 .
    TYPE-POOLS: slis.
    DATA: wa_fieldcat TYPE slis_fieldcat_alv,
          g_t_tfieldcat TYPE slis_t_fieldcat_alv,
          itab1 TYPE STANDARD TABLE OF cdhdr,
          g_t_event TYPE slis_t_event,
          wa_event TYPE slis_alv_event,
          g_pos TYPE i VALUE 1,
          head TYPE slis_t_listheader,
          wa_head TYPE slis_listheader.
    START-OF-SELECTION.
      SELECT * FROM cdhdr INTO TABLE itab1
      WHERE objectclas = 'COND_A'
        AND tcode = 'VK12'.
      SORT itab1 BY objectclas.
      wa_head-typ  = 'H'.
      wa_head-info = 'Records in cdhdr table'.
      APPEND wa_head TO head.
      PERFORM sub_fldctlg USING: 'OBJECTCLAS' 'ITAB1' 13 'Object class'.
          FORM sub_fldctlg                                              *
    FORM sub_fldctlg USING u_fname TYPE slis_fieldcat_alv-fieldname
                           u_tname TYPE slis_fieldcat_alv-tabname
                           u_outlen TYPE slis_fieldcat_alv-outputlen
                           u_seltext TYPE slis_fieldcat_alv-seltext_l.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = g_pos.          "Column Position
      wa_fieldcat-fieldname = u_fname.      "Field Name
      wa_fieldcat-tabname = u_tname.        "Table Name
      wa_fieldcat-outputlen = u_outlen.     "Output column Length
      wa_fieldcat-seltext_l = u_seltext.    "Column Header
      g_pos = g_pos + 1.                    "Incrementing column position
      APPEND wa_fieldcat TO g_t_tfieldcat.    "Appending field Catalog
    ENDFORM.
    *&      Form  sub_top
    FORM sub_top.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = head.
    ENDFORM.                    " sub_top
    END-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           IMPORTING
                et_events = g_t_event.
      READ TABLE g_t_event INTO wa_event WITH KEY name = 'TOP_OF_PAGE'.
      IF sy-subrc EQ 0.
        wa_event-form = 'SUB_TOP'.
        MODIFY g_t_event FROM wa_event INDEX sy-tabix.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         i_callback_program             = sy-repid
         it_fieldcat                    = g_t_tfieldcat
         it_events                      = g_t_event
        TABLES
          t_outtab                       = itab1.
    Thanks in advance.

    Hi,
    The issue is resolved. I just pass the program name (SY-REPID) through a variable to the function module that displays list/grid. I came to know that these system variable behavior is UN-predictable in SAP and hence passed program name through a global variable instead of using a system variable value.
    Thanks..

  • Font is small while printing alv list report

    Hi,
    while printing ALV list report font is too small, can you tell me where i can increase the font size. I tried in GUI font ,In which i can increase the font for GUI, not for ALV priniting . Can any body help me to solve this problem?
    Regards,
    siva kumar

    HI Kushboo,
    I think You are talking about header text in ALV , while printing ALV list i need to increase all the font size.. In fieldcatlog there is no option called Style...for increasing ALV font line item details. Can you tell me which style you are talking about?
    Regards,
    siva kumar

  • Print ALV List

    Hi experts,
    T code ME2m   after executing i would like to print that sheet . with all coloms in A4 size paper.
    how can Increse size of LETTERS  and  colom and rows.
    after pressing PRINT icon  we will get pop up window(Print ALV List.
    then Output device -  Local
    number of copies1
    Print from page   1         1
    Then i  clicked   PROPERTIES  
    then i double clicked  PARAMETER VALUE     X_65_255
    then i selected  Format  radio button  then i selected  X_58_170..
    then i executed..
    that tiem system giving message   like
    System cannot print the last 176 columns of the
    report
    but i am not getting all the fealds in the page ?
    how to do configuration for this.
    Regards,
    Anthyodaya.

    In ME2N menu List --> Export document to word processing -> Create word document-> Start MS word.
    After downloading,Click F11,Save it as word document,Adjust page set up to Land Scape and also custom paper format
    to accommodate all fields in print.

  • Alv List  print printer information in 1st page

    Hi,
    At the time of alv list printing the following information is printed on 1st page. How to avoid this information when printing.
    INITSTRING
    Start r_3-Prolog
    Drucker :  Wipro EX-330+DX
    System :   RAP (reprdfo)
    User :        11BO
    End  r_3-Prolog
    Thanks in advance.

    Hi GoldMoon,
    (edit) Print another basic ABAP list (print anything else) on the same printer to see if that first page is printed. If yes, it's probably either SAP, OS, or Print Server cover page. They are explained in "cover page" SDN wiki, there are explanations how the cover page can be output (and so you can deduce how to remove it).
    Best regards,
    Sandra
    Edited by: Sandra Rossi, 5 minutes later

Maybe you are looking for

  • KT3- Ultra aru board (ms-6380e series) processor question

    Ok i'm running a msi kt3 ultra aru motherboard with bios version 5.7 looking at the cpu charts i'm slightly confused. What I'm wondering is can I run an athlon 3000 processor on this board? I know its going to raise the bus speed up but I'm running p

  • Consumer/customer relations payment load report

    is there any standard report for Consumer/customer relations payment load report.....for country specific

  • Adobe Forms: how to avoid blank pages in the output

    Hi Guys, when i am executing a report using adobe forms for limited records i can see the output in single page in pdf without any blank pages before or after the output page.But if the records exceed then in the output i can see first 3 blank pages

  • Wrong links in webgui

    Hi forum, I am pretty new to SRM. I am working with a system where I am facing some problems with some links. Loging on the WebGUI doesn't make any problems... http://myhost.mydomain:8001/sap/bc/gui/sap/its/bbpstart?sap-client=800 ... but when I clic

  • Creating something similiar to this

    Hi! I want to create a picture like this: http://www.google.no/imgres?imgurl=http://farm4.static.flickr.com/3409/3256194469_8549469b 11.jpg&imgrefurl=http://www.flickr.com/explore/interesting/2009/02/05/&usg=__AuM7l5MoQG9hu FF0K3WOCwBsXpM=&h=334&w=50