How to print Page No. in ALV footer.

I am using the follwoing code but when I got print the page numbers are not displaying. I was copy the code from one of group message.
Please tell where I am making mistakes means why page numbers are not displaying at footer.
I want to print 30 rows on each page and display the page no. in footer of each page.
REPORT  zift_test_alv.
Report Name: PS Report                                               *
Created by: IALI                                                     *
Tables ( To support selection screen )
TABLES:
       MSEG.
     S E L E C T I O N   S C R E E N        *
*SELECT-OPTIONS: PostDate FOR BSIS-BUDAT.
SELECTION-SCREEN: Begin of block B01 WITH FRAME TITLE TITLE01.
SELECT-OPTIONS: so_plant                              FOR mseg-werks. " Plant
SELECTION-SCREEN: end of block B01.
      D A T A   D E C L A R A T I O N       *
Types
types: begin of slis_print_alv1,
         no_print_selinfos(1) type c,  " display no selection infos
         no_coverpage(1) type c,                            "
         no_new_page(1) type c,                             "
         reserve_lines type i,         " lines reserved for end of page
         no_print_listinfos(1) type c, " display no listinfos
         no_change_print_params(1) type c,  " don't change linesize
         no_print_hierseq_item(1) type c,  "don't expand item
         print_ctrl type ALV_S_Pctl,
       end of slis_print_alv1.
types: begin of slis_print_alv.
include type alv_s_prnt.
include type slis_print_alv1.
types: end of slis_print_alv.
types: begin of slis_alv_event,
        name(30),
        form(30),
      end of slis_alv_event.
types: slis_t_event type slis_alv_event occurs 0.
TYPES: BEGIN OF ty_mseg,
      WBS         type mseg-PS_PSP_PNR,
      MSEG_WERKS  TYPE MSEG-WERKS, " Plant
      ABLAD       TYPE MSEG-ABLAD, " Unloading Point
      WEMPF       TYPE MSEG-WEMPF, " Goods Receiptent
      MBLNR       TYPE MSEG-MBLNR, " Material Do Number
    end of ty_mseg.
Internal tables and work areas
DATA:
      IT_MSEG         type table of TY_MSEG,
      GV_TITLE       type LVC_TITLE.
DATA: gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
     r_alv_template type ref to ZCL_BT_ALV_TEMPLATE.
Data declarations for the ALV grid
DATA:      r_grid      TYPE REF TO cl_gui_alv_grid.
DATA:      alv_fieldcat TYPE slis_t_fieldcat_alv,
           wa_alv_fieldcat TYPE slis_fieldcat_alv,
           alv_layout   TYPE slis_layout_alv,
           gd_repid     LIKE sy-repid.
Initialization.
  select single max( ddtext ) from dd02t into TITLE01 where tabname    = 'MSEG'
                                                        and ddlanguage = sy-langu."#EC *
      D A T A   S E L E C T I O N           *
START-OF-SELECTION.
SET COUNTRY 'PK'.
  " Getting data from MSEG
  SELECT APS_PSP_PNR AWERKS AABLAD AWEMPF A~MBLNR
      FROM mseg AS A
      INTO table it_mseg
      WHERE a~werks in so_plant.
      A~PS_PSP_PNR IN SO_WBS.
*BREAK-POINT.
       A L V   P R O C E S S I N G          *
END-OF-SELECTION.
PERFORM alv_setup.
PERFORM display_alv.
FORM alv_setup.
  CLEAR wa_alv_fieldcat.
  REFRESH alv_fieldcat.
  wa_alv_fieldcat-key = ''.
  wa_alv_fieldcat-fieldname = 'WBS'.
  wa_alv_fieldcat-seltext_s = 'WBS'.
  wa_alv_fieldcat-seltext_m = 'WBS Element'.
  wa_alv_fieldcat-seltext_l = 'WBS Element'.
  APPEND wa_alv_fieldcat TO alv_fieldcat.
  wa_alv_fieldcat-key = ''.
  wa_alv_fieldcat-fieldname = 'ABLAD'.
  wa_alv_fieldcat-seltext_s = 'Un Ld Pnt'.
  wa_alv_fieldcat-seltext_m = 'Un Lding Pnt'.
  wa_alv_fieldcat-seltext_l = 'Un Loading Point'.
  APPEND wa_alv_fieldcat TO alv_fieldcat.
  wa_alv_fieldcat-key = ''.
  wa_alv_fieldcat-fieldname = 'MSEG_WERKS'.
  wa_alv_fieldcat-seltext_s = 'Plant'.
  wa_alv_fieldcat-seltext_m = 'Plant'.
  wa_alv_fieldcat-seltext_l = 'Plant'.
  APPEND wa_alv_fieldcat TO alv_fieldcat.
  wa_alv_fieldcat-key = ''.
  wa_alv_fieldcat-fieldname = 'WEMPF'.
  wa_alv_fieldcat-seltext_s = 'Good Rec'.
  wa_alv_fieldcat-seltext_m = 'Good Rec'.
  wa_alv_fieldcat-seltext_l = 'Good Receipt'.
  APPEND wa_alv_fieldcat TO alv_fieldcat.
  wa_alv_fieldcat-key = ''.
  wa_alv_fieldcat-fieldname = 'MBLNR'.
  wa_alv_fieldcat-seltext_s = 'Mat Doc'.
  wa_alv_fieldcat-seltext_m = 'Mat Doc'.
  wa_alv_fieldcat-seltext_l = 'Mat. Doc. No.'.
  APPEND wa_alv_fieldcat TO alv_fieldcat.
ENDFORM.                    " alv_setup DMBTR
FORM display_alv.
  gd_repid = sy-repid.
Configure layout of screen
  alv_layout-colwidth_optimize = 'X'.
  alv_layout-zebra             = 'X'.
  alv_layout-no_min_linesize   = 'X'.
Now call display function
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
           i_callback_program       = gd_repid
           i_callback_top_of_page   = 'TOP_OF_PAGE_SETUP' "Ref to form
           is_layout                = alv_layout
           it_fieldcat              = alv_fieldcat
          i_grid_title             = text-005
              it_events = gt_events
              is_print = gd_prntparams
              i_save = 'X'
      TABLES
            t_outtab                = IT_mseg
     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.
perform build_events.
perform build_print_params.
ENDFORM.                    " display_alv
FORM top_of_page_setup.
  DATA: t_header TYPE slis_t_listheader,
        wa_header TYPE slis_listheader.
  wa_header-typ  = 'H'.
  wa_header-info = 'Test Report '.
  APPEND wa_header TO t_header.
  CLEAR wa_header.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
            it_list_commentary = t_header.
ENDFORM.                    " top_of_page_setup
*& Form BUILD_EVENTS
Build events table
form build_events.
data: ls_event type slis_alv_event.
  call function 'REUSE_ALV_EVENTS_GET'
  exporting
  i_list_type = 0
  importing
  et_events = gt_events[].
  read table gt_events with key name =
  slis_ev_end_of_page
  into ls_event.
  if sy-subrc = 0.
  move 'END_OF_PAGE' to ls_event-form.
  append ls_event to gt_events.
endif.
  read table gt_events with key name =
  slis_ev_end_of_list
  into ls_event.
  if sy-subrc = 0.
  move 'END_OF_LIST' to ls_event-form.
  append ls_event to gt_events.
  endif.
endform. " BUILD_EVENTS
*& Form BUILD_PRINT_ PARAMS
Setup print parameters
form build_print_params.
gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
endform. " BUILD_PRINT_ PARAMS
*& Form END_OF_PAGE
form END_OF_PAGE.
  data: listwidth type i,
  ld_pagepos(10) type c,
  ld_page(10) type c.
  write: sy-uline(50) .
  skip.
  write:/40 'Page:', sy-pagno .
endform.
*& Form END_OF_LIST
form END_OF_LIST.
  data: listwidth type i,
  ld_pagepos(10) type c,
  ld_page(10) type c.
  skip.
  write:/40 'Page:', sy-pagno .
endform.
Regards
Iftikhar Ali
Islamabad

Hi, 
         just populate ur eventcat  like this , may be this can help u
form zf_eventcat  using    p_it_eventcat type slis_t_event.
  data l_eventcat type slis_alv_event.
  clear l_eventcat.
*Get all the events.
  call function 'REUSE_ALV_EVENTS_GET'
    exporting
      i_list_type     = 0
    importing
      et_events       = p_it_eventcat
    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.
TOP-OF-PAGE FORM
  clear l_eventcat.
  read table p_it_eventcat into l_eventcat with key
                          name = slis_ev_top_of_page.
  if sy-subrc = 0.
    move 'ZF_TOP_OF_PAGE' to l_eventcat-form.
    modify p_it_eventcat from l_eventcat index sy-tabix
                                         transporting form.
  endif.
PF_STATUS_SET FORM
  clear l_eventcat.
  read table p_it_eventcat into l_eventcat with key
                          name = slis_ev_pf_status_set.
  if sy-subrc = 0.
    move 'ZF_PF_STATUS_SET' to l_eventcat-form.
    modify p_it_eventcat from l_eventcat index sy-tabix
                                      transporting form.
  endif.
USER_COMMAND FORM
  clear l_eventcat.
  read table p_it_eventcat into  l_eventcat with key
                           name = slis_ev_user_command.
  if sy-subrc = 0.
    move 'ZF_USER_COMMAND' to  l_eventcat-form.
    modify p_it_eventcat from l_eventcat index sy-tabix
                                      transporting form.
  endif.
endform.                    " zf_eventcat
reward if helpful

Similar Messages

  • How to display page no in ALV Footer?

    Hi
    When I take print of long ALV List then footer and header is not repeat on each page. I want to repeat the footer on each page and also display the page no. there. How can I do this? please give me help.
    Thanks
    Iftikhar Ali
    Islamabad.

    Refer the links -
    http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm
    Alv page no 1 of 10 in footer
    Regards,
    Amit

  • How to print page numbers in adobe form

    Hi,
    Can anybody tell me how to print page numbers in adobe form.
    Thanks in advance
    Chaitanya

    Hi,
    Yes the field page n of m is used normally for printing page numbers. But it won't display the current page of total pages by itself. You have to set the run time property to n (current page ) and m (Total number of pages). Carefully select the # (current page ) and ## (Total number of pages). Hope this works for you.
    My requirement is to have the user control on current page. For Example:
    Example for a Invoice with 5 PO items (stands on 2 pages) :
    1st  page is the letter : no page number
    2nd page is the 1st page of the 1st copy of the invoice : we should read u201C1 / 2u201D
    3rd page is the 2nd page of the 1st copy of the invoice : we should read u201C2 / 2u201D
    4th page is the 1st page of the 2nd copy of the invoice : we should read u201C1 / 2u201D
    5th page is the 2nd page of the 2nd copy of the invoice : we should read u201C2 / 2u201D
    Presently i cam getting the current page number for page 4th as 3 / 2 and for 5th page 4 / 2. I could able to control the total number of pages from print program. But when i am printing the second copy (4th and 5th pages), I couldn't able to control the current page number. I need to initialize the Current page count (4th page ) as 1.
    I have used the follwing java scripting:
    this.rawValue = wv_pages - xfa.layout.page(this)
    where wv_pages is total no of pages calculated from print program.
    Please help me in this regard with some formcal or java scripting conditions.
    Thank You,
    Regards,
    Naresh.

  • How to print page no/total pges in report programing?

    how to print page no/total pges in report programing?

    Hi
    This is an example:
    In TOP-OF-PAGE you can write:
    WRITE: SY-PAGNO, '/', '-----'.
    When the program has finished to print all data, run a routine like this:
    Declare a variable
    DATA: L_PAGE_COUNT(5) TYPE C,
          V_LINE TYPE I. "The line where page number is written
    * In my example I suppose the page number is always
    * written in the first row of the page.
    V_LINE = 1.
    *  Copy this code to the end of program
    *  Page count will be printed on each page here
      WRITE sy-pagno TO l_page_count LEFT-JUSTIFIED.
      DO sy-pagno TIMES.
        READ LINE V_LINE OF PAGE sy-index.
        REPLACE '-----' WITH l_page_count INTO sy-lisel.
        MODIFY CURRENT LINE.
        ADD 1 TO sy-index.
      ENDDO.
    Max

  • How to print Column Labels on each print page of an ALV report

    Hi,
    I have an ALV report which is of 10 print pages.
    I need to print Column Labels on each print page.
    How it is possible.
    Plz write the solution
    Narendra

    Hi Narendra
    try this code.
    reward pts if help.
    Deepanker.
    *& Report  ZDEMO_ALVGRID_EDIT                                          *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic ALV grid, Enhanced to display specific fields as          *
    *& editable depending on field value                                   *
    REPORT  ZDEMO_ALVGRID_EDIT                 .
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      field_style  TYPE lvc_t_styl, "FOR DISABLE
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA: it_fieldcat TYPE lvc_t_fcat,     "slis_t_fieldcat_alv WITH HEADER LINE,
          wa_fieldcat TYPE lvc_s_fcat,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE lvc_s_layo,     "slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM set_specific_field_attributes.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      wa_fieldcat-fieldname   = 'EBELN'.
      wa_fieldcat-scrtext_m   = 'Purchase Order'.
      wa_fieldcat-col_pos     = 0.
      wa_fieldcat-outputlen   = 10.
      wa_fieldcat-emphasize   = 'X'.
      wa_fieldcat-key         = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'EBELP'.
      wa_fieldcat-scrtext_m   = 'PO Item'.
      wa_fieldcat-col_pos     = 1.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'STATU'.
      wa_fieldcat-scrtext_m   = 'Status'.
      wa_fieldcat-col_pos     = 2.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'AEDAT'.
      wa_fieldcat-scrtext_m   = 'Item change date'.
      wa_fieldcat-col_pos     = 3.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MATNR'.
      wa_fieldcat-scrtext_m   = 'Material Number'.
      wa_fieldcat-col_pos     = 4.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MENGE'.
      wa_fieldcat-scrtext_m   = 'PO quantity'.
      wa_fieldcat-col_pos     = 5.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MEINS'.
      wa_fieldcat-scrtext_m   = 'Order Unit'.
      wa_fieldcat-col_pos     = 6.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'NETPR'.
      wa_fieldcat-scrtext_m   = 'Net Price'.
      wa_fieldcat-edit        = 'X'. "sets whole column to be editable
      wa_fieldcat-col_pos     = 7.
      wa_fieldcat-outputlen   = 15.
      wa_fieldcat-datatype     = 'CURR'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'PEINH'.
      wa_fieldcat-scrtext_m   = 'Price Unit'.
      wa_fieldcat-col_pos     = 8.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
    Set layout field for field attributes(i.e. input/output)
      gd_layout-stylefname = 'FIELD_STYLE'.
      gd_layout-zebra             = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
    call function 'REUSE_ALV_GRID_DISPLAY'
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
           EXPORTING
                i_callback_program      = gd_repid
               i_callback_user_command = 'USER_COMMAND'
                is_layout_lvc               = gd_layout
                it_fieldcat_lvc             = it_fieldcat
                i_save                  = 'X'
           TABLES
                t_outtab                = it_ekko
           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.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO  CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  set_specific_field_attributes
          populate FIELD_STYLE table with specific field attributes
    form set_specific_field_attributes .
      DATA ls_stylerow TYPE lvc_s_styl .
      DATA lt_styletab TYPE lvc_t_styl .
    Populate style variable (FIELD_STYLE) with style properties
    The NETPR field/column has been set to editable in the fieldcatalog...
    The following code sets it to be disabled(display only) if 'NETPR'
    is gt than 10.
      LOOP AT it_ekko INTO wa_ekko.
        IF wa_ekko-netpr GT 10.
          ls_stylerow-fieldname = 'NETPR' .
          ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
                                                 "set field to disabled
          APPEND ls_stylerow  TO wa_ekko-field_style.
          MODIFY it_ekko FROM wa_ekko.
        ENDIF.
      ENDLOOP.
    endform.                    " set_specific_field_attributes
    pls reward pts is help,

  • How to print page numbers like 'Page 2 of 10' on an ALV report

    Hi,
    I've seen a few threads regarding this, but haven't seen any code that actually works. 
    What I'd like to do is print page x of y (i.e. Page 2 of 10) on an ALV report once the report is printed.
    Is this actually possible?  If so, what are the steps and coding required? 
    I greatly appreciate your help experts!
    Mark

    Hi Mark,
    I think there is no better way than calculate it before doing the output. If you do not have extra-new-page, the total number of pages may be calculated as the number of lines displayed divided by lines on one page - this will depend on the lines used for top-of-page and end-of-page. Also filters and subtotals could not be used.
    An other approach could be to read the current page number in end-of-list event and then scan the whole list using READ LIST and MODIFY LIST in each page top accordingly.
    Because it is decades ago I printed a list last time I will never have the chance to try.
    Regards,
    Clemens

  • How to print page in front and back in scripts

    hi,
    I want to know to know the how to print a page in front and back.

    HI Ragavendra
    set this
    <b>Print mode is D</b>
    With Print mode, you can specify single- or double-sided printing for a page. You can choose from the following values:
    <b>D </b>The page is printed on the first side of a sheet in duplex mode. If another mode was previously active, then the printer is switched to duplex mode with the start of the pageand continues in this mode.
    and other Print mode options are
    <b>Print mode</b>
    With Print mode, you can specify single- or double-sided printing for a page. You can choose from the following values:
    <b>' '</b> Currently active printing mode continues unchanged.
    <b>S </b>The page is printed in simplex mode. That is, the printer should print on only one side of the paper. If another mode was previously active, then the printer is switched to simplex mode with the start of the page.
    <b>D</b> The page is printed on the first side of a sheet in duplex mode. If another mode was previously active, then the printer is switched to duplex mode with the start of the pageand continues in this mode.
    <b>T </b>The page is printed on the first side of a sheet in tumble duplex mode. That is, the printer prints on both sides. The page on the second side is always inverted, so that the footer of the second page is printed opposite the header of the first page.
    If another mode was previously active, then the printer is switched to tumble duplex mode with the start of the page and continues printing in this mode.
    Print modes are currently supported for printers that use the PCL-5 language. These are printers that are defined with the following SAP device types: HPLJ_II, HPLJIIID, HPLJ4, LX4039, SNI20XX8.
    See the spool system (transaction SPAD) to check on how your printers are defined.
    The print controls for these functions are SPMSI (begin simplex printing); SPMDU (begin duplex printing); SPMTU (begin tumble duplex printing); SPMFS (print on first side of sheet in duplex or tumble duplex mode); and SPMBS (print on second side of sheet in duplex or tumble duplex mode).
    Regards Rk

  • How to print some data in alv which is not in table.

    hi all,
    Please can any one tell me how to print some text in the existing alv program to the second line of every record.
    the header is there but it is empty.In the data,
    there are two lines printing for a normal alv.the same text should be  printed in every second line of each record.Please reply soon.its urgent.

    This is not possible in ALV.
    When you say some text I assume the text is not in the same columnar format as the list is.
    ALV supports only a columnar format (except for subtotals).
    You can add the text to the ITAB by parsing the text to the record. It is not going to look good if you do that.

  • How to print long text in ALV

    i want to print a description in text  mode which is 5-6 lines some times it have a blank line also so
    how to print in ALV .i m using READ_TEXT function but sumtime it not works when text exceed 4-5 lines
    what i sud do.

    hi,
    there is another way u can use yours internal table field like long text field. that is.
    parameters: salno type vbak-vbeln.
    data: begin of itab occurs 0,
      vbeln type vbak-vbeln,
      matnr type vbap-matnr,
      longtext type thead occurs 0,
      end of itab.
      data: itabstxl type standard table of stxl with header line.
      select single vbakvbeln vbapmatnr into (itab-vbeln, itab-matnr)
                                     from vbak inner join vbap
                                       on vbakvbeln = vbapvbeln
                                        where vbak~vbeln = salno.
        select single tdobject tdname tdid tdspras from stxl
                                                     into (itabstxl-tdobject,itabstxl-tdname,itabstxl-tdid,itabstxl-tdspras)
                                                           where relid = 'TX'
                                                            and  tdobject = 'VBBK'
                                                            and tdname = salno    "YOUR OWN TDNAME e,g
                                                            and tdid = 'Z003'
                                                            and tdspras = 'EN'.
    call function 'READ_TEXT'
      exporting
      CLIENT                        = SY-MANDT
        id                            = itabstxl-tdid
        language                      = itabstxl-tdspras
        name                          = itabstxl-tdname
        object                        = itabstxl-tdobject
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
      tables
        lines                         = itab-longtext
    EXCEPTIONS
      ID                            = 1
      LANGUAGE                      = 2
      NAME                          = 3
      NOT_FOUND                     = 4
      OBJECT                        = 5
      REFERENCE_CHECK               = 6
      WRONG_ACCESS_TO_ARCHIVE       = 7
      OTHERS                        = 8
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    break abaper.
    I HOPE THIS WILL SOLVE THIS WILL SOLVE THE PROBLEM OF THE OTHERS AS WELL.

  • How to print page numbers on physical pages conditionally?

    Hi,
    my report has a single logical page comprising of 3 reapeating frames , each getting printed on 3 different physical pages. I need to print page number at the bottom of the page in the case of two repeating frames while on the side of the page in the third case. How do I do this?
    TIA
    Ranjit

    i think u only need to say page break before on ur third repeating frame and ur problem is solve.
    repeating frame 1 and 2 on the firstpage getting page 1 and repeating 3 on page 2.
    cheers.

  • How to print page no in standard sap report..

    Hi All,
    I am taking print out of standard reports but page no. is not showing.
    How to set page no. ? Which transaction ?
    Through SPAD we can set page no. ?
    Yusuf

    Hi!
    It depends on the standard program. Maybe it can be set with one of its checkboxes on the selection screen.
    If it cannot be set, then the standard list does not provide the page numbers.
    Youhave to copy into a Z-program if it is really neccessary.
    Regards
    Tamá

  • How to print traffic lights in ALV reports

    hi how to print traffic lights on selection screen in alv reports

    HI,
    check below code
    TYPE-POOLS : icon.
    types:  BEGIN OF ty_display,
            status     TYPE icon-id,
            bukrs      TYPE bseg-bukrs,
            gjahr      TYPE bseg-gjahr,
            monat      TYPE monat,
            work_order TYPE z_work_order,
            glaccount  TYPE saknr,
            message    TYPE string,
          END OF ty_display.
    data : it_display     TYPE TABLE OF ty_display,
             wa_display TYPE ty_display.
    WRITE icon_led_green AS ICON TO wa_display-status.
            wa_display-gjahr = p_year.
            wa_display-bukrs = p_cc.
            wa_display-monat = p_period.
            wa_display-work_order = v_aufnr.
            wa_display-glaccount = wa_bseg-hkont.
        APPEND wa_display TO it_display.
    WRITE icon_led_red AS ICON TO wa_display-status.
              wa_display-gjahr      = p_year.
              wa_display-bukrs      = p_cc.
              wa_display-monat      = p_period.
              wa_display-work_order = v_aufnr.
              wa_display-glaccount  = wa_bseg-hkont.
              wa_display-message    = text-010.
              APPEND wa_display TO it_display.
    change the icon color based on your requirement and append it to the internal table which you have to display in ALV.
    reward points if it is helpful.
    Regards,
    Srilatha

  • How to suppress page header when group footer prints

    I would like to suppress the page header on my report when a group footer prints.  My group footer is going to be a bunch of legal mumbo jumbo and I'm going to have it do a page break before so it prints on it's own page.  I do not want my page header info printing on this page.
    Is there a way to do this?  I am on Crystal XI.  Thank you in advance.

    I haven't tested this, but...
    Formula @InGroupHeader:
    WhilePrintingRecords;
    BooleanVar InGroupFooter;
    InGroupFooter = False;
    Formula @InGroupFooter:
    WhilePrintingRecords;
    BooleanVar InGroupFooter;
    InGroupFooter = True;
    PageHeader.Suppress:
    WhilePrintingRecords;
    BooleanVar InGroupFooter;
    InGroupFooter;
    Edit: I think I like Graham's solution better, actually.
    Edited by: Garrett Fitzgerald on Jun 15, 2009 12:12 PM

  • How to Display Page Numbers in ALV Report HTML End of page Event

    hai Gurus
    Greetings
    Please tell me how to get current page noumber and total number of pages in ALV Report (in HTML End of Page Event)
    i tried with sy-pagno system field but it is not working
    so please guide me
    Thanks
    Ramesh

    check below code....
    *Work area for Layout
         gf_layout       type  slis_layout_alv,
    *Work area for HEADER FOOTER    
         gf_header type slis_listheader,
    *Work area for Field catalogue    
         gf_fieldcat     type  slis_fieldcat_alv.
         it_top_page type slis_t_listheader,
    *Internal table for Field catalogue    
         it_fcat      type slis_t_fieldcat_alv.
    perform:fill_layout,
                  prepare_header,
                  field_catlog,
                  display_report.
         Form  fill_layout
    form fill_layout .
      gf_layout-colwidth_optimize = 'X'.
    endform.                    " fill_layout
         Form  field_catlog
    form field_catlog .
      data : lf_fcat type line of slis_t_fieldcat_alv,
             l_cnt type i.
      clear : lf_fcat, l_cnt.
    Employee Number
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'EMPLID'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 8.
      lf_fcat-seltext_l   = text-003.
      append lf_fcat to it_fcat.
      clear  lf_fcat.
    *Last Name
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'USERNAME'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 20.
      lf_fcat-seltext_l   = text-004.
      append lf_fcat to it_fcat.
    *First Name
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'EMPMAIL'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 40.
      lf_fcat-seltext_l   = text-005.
      append lf_fcat to it_fcat.
    *Known As
      clear  lf_fcat.
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'EMPSTATUS'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 10.
      lf_fcat-seltext_l   = text-006.
      append lf_fcat to it_fcat.
      clear  lf_fcat.
    *System UserID
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'COSTCENTER'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 10.
      lf_fcat-seltext_l   = text-007.
      append lf_fcat to it_fcat.
      clear  lf_fcat.
    *EMail ID
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'DEPTDESC'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 8.
      lf_fcat-seltext_l   = text-008.
      append lf_fcat to it_fcat.
      clear  lf_fcat.
    *Employment Status
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'LOC'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 20.
      lf_fcat-seltext_l   = text-009.
      append lf_fcat to it_fcat.
      clear  lf_fcat.
    *Personnel Area
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'TITLE'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 40.
      lf_fcat-seltext_l   = text-010.
      append lf_fcat to it_fcat.
      clear  lf_fcat.
    *Personnel Area Text
      clear  lf_fcat.
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'HDATE'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 10.
      lf_fcat-seltext_l   = text-011.
      append lf_fcat to it_fcat.
      clear  lf_fcat.
    *Country Grouping text
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'MGRID'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 10.
      lf_fcat-seltext_l   = text-012.
      append lf_fcat to it_fcat.
      clear  lf_fcat.
    *Cost Center
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'MGRNAME'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 20.
      lf_fcat-seltext_l   = text-013.
      append lf_fcat to it_fcat.
      clear  lf_fcat.
    *Employee Group
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'MGMAIL'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 40.
      lf_fcat-seltext_l   = text-014.
      append lf_fcat to it_fcat.
      clear  lf_fcat.
    *Organizational Unit
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'DIV'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 25.
      lf_fcat-seltext_l   = text-015.
      append lf_fcat to it_fcat.
      clear  lf_fcat.
    *Supervisor
      add 1 to l_cnt.
      lf_fcat-fieldname   = 'BUSUNIT'.
      lf_fcat-tabname     = 'IT_EMPLOYEE'.
      lf_fcat-col_pos     = l_cnt.
      lf_fcat-emphasize   = 'X'.
      lf_fcat-outputlen   = 25.
      lf_fcat-seltext_l   = text-016.
      append lf_fcat to it_fcat.
      clear  lf_fcat.
    endform.                    " field_catlog
         Form  display_report
    form display_report .
      data : l_repid type sy-repid.
      clear l_repid.
      l_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program          = l_repid
          is_layout                   = gf_layout
          it_fieldcat                 = it_fcat
          i_callback_top_of_page      = 'TOP-OF-PAGE'
        tables
          t_outtab           = it_employee
        exceptions
          program_error      = 1
          others             = 2.
    endform.                    " display_report
         Form  PREPARE_HEADER
    form prepare_header.
      data:l_header1(20),
           l_header2(60).
      data:l_header3(20),
         l_header4(60).
      l_header1       = 'Met Life Census Data'.
      l_header2+40(8) = 'Run Date'.
      write sy-datum to l_header2+50(10).
    header
      gf_header-typ  = 'S'.
      gf_header-key  = l_header1.
      gf_header-info = l_header2.
      append gf_header to it_top_page.
      clear gf_header.
    endform.                    " PREPARE_HEADER
    form top-of-page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary = it_top_page.
    endform.                    "TOP-OF-PAGE
    *& Form end_of_list_html
    output at the end of the list - not in printed output *
    FORM END_OF_LIST_HTML USING END TYPE REF TO CL_DD_DOCUMENT.
    DATA: LS_TEXT TYPE SDYDO_TEXT_ELEMENT,
    L_GRID TYPE REF TO CL_GUI_ALV_GRID,
    F(14) TYPE C VALUE 'SET_ROW_HEIGHT'.
    LS_TEXT+0(20) = 'Total Employees'.
    LS_TEXT+40(10) = g_count.
    CALL METHOD END->ADD_TEXT
    EXPORTING
    TEXT = LS_TEXT
    SAP_EMPHASIS = 'STRONG'.
    *adds new line (start new line)
    CALL METHOD END->NEW_LINE.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    e_grid = l_grid.
    CALL METHOD l_grid->parent->parent->(f)
    EXPORTING
    id = 3
    height = 10.
    ENDFORM.

  • TextEdit: how to print page numbers w/o Header

    I see the option to check "print footer and header" in the print dialog box. Anyone know how to just be able to print the page numbers in TextEdit (without the Headers on each page)?
    Thanks in advance for any help with this!

    TextEdit is a relatively simple program, with limited options. As such, I doubt the "print headers and footers" options are easily customizable. Other word processors have the ability to manage headers and footers separately. If you've got Pages, or Word, or the free alternatives such as OpenOffice/NeoOffice then you can set up your documents to print just header or footer info with only page numbers.

Maybe you are looking for

  • How do I share Address Book/Contacts with my partner's account?  We already figured out how to share Calendars

    I am in the process of setting up separate icloud accounts for my husband and me (whereas we previously shared one).  We both want read/write access to a single address book across all devices (desktop, laptop, ipad, two iphones), which we've been ab

  • How to insert new service condition in PO using BAPI_PO_CHANGE?

    Hi all, I'm trying to insert a new condition under a service line in a PO. This can be seen in ME23N under the services tab of the PO item. Then click on conditions (the button with the dollar and yen symbol). I tried using the internal table POCOND

  • Clips missing/red

    I've got a problem for which I cannot seem to find an answer.  I have a project, created in iMovie 11, where everything except transitions & titles has suddenly come up missing.  Where each video clip appeared, it is now a black box same size as the

  • T60 dual screens/mo​nitors

    Hi, I have an end user that wants to use his T60 with Dual monitors. I know that he is NOT going to be able to use the laptop screen and two external monitors. the setup is this: T60 setup on a dock. 2 19 inch external monitors, one is setup with VGA

  • Problem in legacy asset upload

    Hi, we are going live in the mid of the year. We have fixed take over date 31/07/2010. depreciation in legacy system executed up to 7 th period. that also maintained in config. Now i am uploading legacy assets purchased in the current year. But in ta