Printing Page numbers in ALV grid with oops

Hi ,
I have a ALV grid display with OOPS , there are also fields in top of page and end of page that go along with the print. I want to print the page numbers also . If I give a variable and increment it along with every call to top of page , then if a second print is issued, the variable can not be cleared out. Is there any other way.
Thank you .

Regarding  ALV Grid  Control using OOPs concepts
Please give me reward point if it is useful.
Thanks
Murali Poli

Similar Messages

  • Can we add page numbers to ALV Grid Control.

    Hi All,
    1.My requirement is to display page numbers when we down load the list in to EXCEL.
    Can we do this in ALV Grid Control.
    2.Can we display the page numbers in the SAP Query,when we down load the out put list in to the EXCEL.
    Thanks & Regards,
    Seshadri G

    Hi Seshadri,
    No, it is not possible to print the page number when you download the list to EXCEL. Because in ALV grid the report output is display as table contorl and this data can not be divided into page when you download to EXCEL.
    Regards,
    Satya.

  • Printing page numbers in ALV Hierarchical

    Hi All,
    I have a requirement to display page numbers in the report and also when in printing the page numbers will be displayed like this 'Page xx of yy'. I placed this one in the top_of_page event of the function module REUSE_ALV_HIERSEQ_LIST_DISPLAY. The only display is the Page xx while yy is not. For xx i used the sy-pagno but for the yy as total numbers i try all system fields but still not display. Please help its urgent guys.

    Hi,
      Check thease therds
    https://forums.sdn.sap.com/click.jspa?searchID=12193297&messageID=269935
    https://forums.sdn.sap.com/click.jspa?searchID=12193297&messageID=2461055
    Regards
    Kiran Sure

  • OO ALV grid with a header line is this possible?

    Howdy!
    I have a requirement where I need to produce an ALV grid with the following format:
    <b>Text 1     Text 2  Text 3                  Text 4
                              Text 6
    Col_1 Col_2 Col_3 Col_4 Col_5 Col_6 Col_7 Col_8 Col_9 
    Cell conents -
    Cell conents -
    Cell conents -
    Cell conents -
    Cell conents -
    </b>
    Anyone got any idea on how to get the 'TEXT' fields into the ALV grid? These are dynamic texts that would basically display details of data entered in the selection screen.
    The ALV title line is limited to 70 characters and I can't think of another way of doing this.
    The texts need to appear on the ALV grid becasue the user would like to download them to Excel in addition to the ALV cell contents using the standard ALV functionality.
    Any ideas would be appreciated!
    Message was edited by: Robert

    I'm thinking that this may not work because it is not a full screen grid and the grid container does not care about the container on top of it so, it most likely would not print it.   Implement this example program, you can see how this would work for you if you were using the FM.
    report zrich_0001
           no standard page heading.
    * Global ALV Data Declarations
    type-pools slis.
    data: begin of i_alv occurs 0,
          matnr type mara-matnr,
          end of i_alv.
    * Miscellanous Data Declarations
    data: fieldcat type slis_t_fieldcat_alv,
          events   type slis_t_event,
          list_top_of_page type slis_t_listheader,
          top_of_page  type slis_formname value 'TOP_OF_PAGE'.
    start-of-selection.
      perform initialization.
      perform get_data.
      perform call_alv.
    end-of-selection.
    *  Form  Initialization
    form initialization.
      clear i_alv.       refresh i_alv.
      perform eventtab_build using events[].
    endform.
    *  Form  Get_Data
    form  get_data.
      select matnr into table i_alv
                  from mara up to 100 rows.
    endform.
    *  CALL_ALV
    form call_alv.
      data: variant type  disvariant.
      data: repid type sy-repid.
      repid = sy-repid.
      variant-report = sy-repid.
      variant-username = sy-uname.
      perform build_field_catalog.
      perform comment_build using list_top_of_page[].
    * Call ABAP List Viewer (ALV)
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                it_fieldcat        = fieldcat
                i_callback_program = repid
                is_variant         = variant
                it_events          = events[]
                i_save             = 'U'
           tables
                t_outtab           = i_alv.
    endform.
    * EVENTTAB_BUILD
    form eventtab_build using events type slis_t_event.
    * Registration of events to happen during list display
      data: tmp_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = events.
      read table events with key name = slis_ev_top_of_page
                               into tmp_event.
      if sy-subrc = 0.
        move top_of_page to tmp_event-form.
        append tmp_event to events.
      endif.
    endform.
    * BUILD_FIELD_CATALOG
    form build_field_catalog.
      clear: fieldcat. refresh: fieldcat.
      data: tmp_fc type slis_fieldcat_alv.
      tmp_fc-reptext_ddic = 'Material'.
      tmp_fc-fieldname    = 'MATNR'.
      tmp_fc-tabname      = 'I_ALV'.
      tmp_fc-outputlen    = 18.
      append tmp_fc to fieldcat.
    endform.
    * COMMENT_BUILD
    form comment_build using list_top_of_page type
                                            slis_t_listheader.
      data: tmp_line type slis_listheader.
      clear tmp_line.
      tmp_line-typ  = 'H'.
      tmp_line-info = 'Here is a line of text'.
      append tmp_line to list_top_of_page.
      clear tmp_line.
      tmp_line-typ  = 'S'.
      tmp_line-key  = 'Key1'.
      tmp_line-info = 'Here is a value'.
      append tmp_line to list_top_of_page.
      clear tmp_line.
      tmp_line-typ  = 'S'.
      tmp_line-key  = 'Key2'.
      tmp_line-info = 'Here is another value'.
      append tmp_line to list_top_of_page.
    endform.
    * TOP_OF_PAGE
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                i_logo             = 'ENJOYSAP_LOGO'
                it_list_commentary = list_top_of_page.
    endform.
    Regards,
    Rich Heilman

  • Printing multiple screen objects (ALV+GFW) with only 1 print dialog pop-up?

    All,
    This is related to my previous post at:
    Re: How to print multiple ALV Grids with only one print dialog?
    but there is still one open question...
    My requirement is to create reports that will be called through portals; those reports are a combination of charts and the associated list output describing the data of each chart.
    In my first report (4 charts), I created a screen with 8 custom containers: 4 on the left hand side for the charts and 4 to the right for the list output.
    To create the charts I am using the Graphical Framework (GFW) and for the ALVs the new CL_SALV* classes.
    Everything works fine on the screen, but the users also want to print the report. I got them to the point where they will accept a separate printout (page) for every object (e.g. chart and ALV) of the report.
    I put a print button through the GUI status on the screen and trigger the associated print events in the program; this works fine as well, but the problem is that for every output (in this case 8) a print dialog appears and prompts the user for a printer selection. This the users won't accept and - quite frankly - I wouldn't either ;).
    Now, in my previous post someone pointed me to the use of the REUSE* function modules to append the ALVs and then print them together; this works and reduces the print dialog to only one for the ALVs.
    Even though this is an option, I am still kind of hesitant: why using all the great new OO stuff via the CL_SALV* classes to bring the ALVs on the screen, just to go back to the old approach for the printouts???
    Especially since I still can’t figure out how to combine the GFW objects in one print – or even better – how to suppress the dialog by passing the information behind the scenes either.
    As of now, I have 2 options:
    - 8 print dialogs (OO only)
    - 5 print dialogs (using the REUSE approach for the ALVs and triggering the chart prints individually)
    Does anyone see a way to bring it down to ONE?
    Thanks,
    Guenther
    Message was edited by: Guenther Schober
    Update: I found the solution for the ALVs!
    Even though I am using the
    "new-page print on parameters G_S_PRINT_PARAMETERS no dialog" statement, the dialogs still appeared; reason for this was that I also set:
    "L_O_PRINT->SET_PRINT_ONLY( IF_SALV_C_BOOL_SAP=>TRUE )" before I output the ALV table.
    After removing this, the ALVs are printing without pop-up!!!
    Unfortunately the GFWs still prompt for the printer selection

    Hi,
    Mine is also same requirement and i could not even generate multiple print dialogs.Can i have your code to compare with my code please.
    I am displaying container information on 200 screen PBO. I have added one custom print button to the grid tool bar(remaing container toolbar print buttons i have disabled). Once i click on custom print button a popup is coming and when i click on continue(one container informtion print is coming) and  it is coming to 100 screen(in this, i am calling selection screen as a subscree) and subsequent print dialog is not coming.
    Thanks & Regards
    Ramu

  • 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 give a page break in alv grid display after 65 lines are displayed?

    hi all,
    I need to give a page break in alv grid display after 65 lines are displayed on each page...Please help me with this...

    hai
    give this command beging of the report name... u have to diclar the beging of the report ......
    <b>report</b> ( name of the report)  <b>standard page heading line-size 200 line-count 65.</b>
    ex1.:- report name is  rtpm_trl_show_flows 
    report <b>rtpm_trl_show_flows </b> no standard page heading line-size 200
                                                         line-count 65.
    ex:2
    report  <b>zlpur01</b> no standard page heading line-size 200
                                                         line-count 65.
    type-pools: slis.
    tables: bkpf.
    selection-screen begin of block sel with frame title text-001.
    select-options: s_comp for bkpf-bukrs, " Company
                    s_valut for bkpf-budat. " Invoice Date
                   S_MTART FOR MARA-MTART. " Material Type
    selection-screen end of block sel.
    parameters: p_vari like disvariant-variant. " ALV Variant
    constants: formname_top_of_page type slis_formname value 'TOP_OF_PAGE'.
    data:   i_bseg type bseg  occurs 0 with header line.
    data: vatval type p decimals 2 value '0.15'.
    data: xhkont type string value '154000'.
    data COM type c.
    data: begin of invt occurs 100,
            budat like bkpf-budat, " Inv Dat
            bukrs like bkpf-bukrs, " Material
            STCEG like bsak-STCEG, "name of the companycode
            belnr like bkpf-belnr,
            xblnr like bkpf-xblnr, " Inv Reference
            ebeln like rseg-ebeln, " PO number
            lifnr like bseg-lifnr, " Vendor No
            name1 like lfa1-name1, " Supplier Name
            matnr like bseg-matnr,
            maktx like makt-maktx,
            stcd1 like lfa1-stcd1, " Supplier VAT REG NO
            xamt like bseg-dmbtr, " TAX amt
            yamt like bseg-wrbtr,
            wrbtr like bseg-wrbtr, " Base amount
            mwskz like bseg-mwskz,
            dmbtr like bseg-dmbtr, " TAX amt
            gjahr like bkpf-gjahr,
            hkont like bseg-hkont,
            zamt like bseg-dmbtr, " TAX amt
            wamt like bseg-dmbtr,
            shkzg like bseg-shkzg,
            shkzg1 like bseg-shkzg,
          end of invt.
    regard
    nawa

  • Display error message in ALV grid  using OOPS

    Hi,
    I have a requirement to display report in ALV. I have created ALV grid using OOPS with three editable cells and 1 button on toolbar. When user enter values in Ediatble cell  and click on the Toolbar button, sales order item should be assigned to contract.
    When the user select  the row and click on toolbar button, a salesorder item should be assigned  to contract and i am using BAPI and fine with BAPI. All the error message should be displayed in a popup and the corresponding failed row  should change its color .
    Once the user identified the failed row, he can edit the value in the ediatble cells and should reprocess in the same screen ( without going back to selection screen).
    To display POP Up, I  am using FM BAL_LOG_CREATE, BAL_LOG_MSG_ADD, BAL_DSP_PROFILE_NO_TREE_GET, BAL_CNTL_CREATE.
    by using above 4 FM , i can display POP UP. but i cannot change the color of the failed row. 
    Once I identified the failed row and reprocess from the same screen , I am successful in processing the failed row, but my error log still has the reprocessed row as failed row because,  error log is not refreshing.
    Please suggest me how to clear error log which was created by using the above FM's and change the color of the failed row .
    Thanks in Advance

    Hi
    Please suggest me how to clear error log which was created by using the above FM's....
    U can use BAL_LOG_REFRESH
    ....and change the color of the failed row
    You need to insert a new field for Colour Attributes in your output table and input its name in the layout structure:
    IS_LAYOUT-INFO_FNAME = <field name for colour>
    The field has to be a CHAR 3 and its value can be -
    > Cxy
    C is a constant
    x is the colour number (from 1 to 9)
    y is intensified (0 = off, 1 = on)
    After changing the value of output table you need to run the method REFRESH_TABLE_DISPLAY for refreshing the output
    Max

  • Sub total in ALV GRID using oops concept

    Hi,
    If Plant (VBAP-WERKS) is not the same for all items on a Sales Order (VBAK-VBELN is the same for al items) then create a separate line on the report for each different plant specified in the line items.  Copy all fields from the original order line except for plant and Net Value.  Net Value should be the total of item Net Values for all items with the same plant in the order.
    Example:
    Data:
    Order----                     Item-             Plant-                                     Net Value---
    123----          010-               3467-                      100.00---
    123----          020-               7865-                      50.00---
    123----          030-               3467-                     80.50---
    Report:
    Order-                     Plant-                  Net Value---
    123-          3467-                  180.50---
    123-          7865-                   50.00----
    I need to dispaly the Report format in ALV Grid using oops concept...
    no need of calling any function modules.
    Regards,
    Nithya

    Hi
    Here is example code
    This is the method to be called:
    get_subtotals
    Use
    Returns the current subtotals of the ALV Grid Control. Having created totals for at least one column, users can calculate at most nine subtotals. The list is sorted by the values of one or several columns (called the subtotals column). If a value is changed in the subtotals column, the subtotal is displayed (this is also referred to as control level change).
    Integration
    Before you access the subtotals value, you use the method get_sort_criteria to get the sort table . One row of this table describes properties of a column in the output table.
    • If the field SUBTOT is set for a column in this table, the column is a subtotals column.
    • The field SPOS then indicates at which level (see below) the subtotal has been calculated.
    • The field FIELDNAME contains the name of the subtotals column in the output table.
    Based on this information, you specifically access the values of the tables passed (using reference variables COLLECT01 to COLLECT09).
    Features
    CALL METHOD <ref. var. to CL_GUI_ALV_GRID>->get_subtotals
    IMPORTING
    EP_COLLECT00 = <reference variable of type REF TO DATA>
    EP_COLLECT01 = <reference variable of type REF TO DATA>
    EP_COLLECT02 = <reference variable of type REF TO DATA>
    EP_COLLECT03 = <reference variable of type REF TO DATA>
    EP_COLLECT04 = <reference variable of type REF TO DATA>
    EP_COLLECT05 = <reference variable of type REF TO DATA>
    EP_COLLECT06 = <reference variable of type REF TO DATA>
    EP_COLLECT07 = <reference variable of type REF TO DATA>
    EP_COLLECT08 = <reference variable of type REF TO DATA>
    EP_COLLECT09 = <reference variable of type REF TO DATA>
    ET_GROUPLEVELS = <ínternal table of type LVC_T_GRPL>.
    In order to access the values of EP_COLLECT00 to EP_COLLECT09, you use ASSIGN to dereference the relevant reference variable in a field symbol of your output table type (see below).
    Parameters
    Meaning
    EP_COLLECT00
    Points to the totals line. Since there is only one totals line which, in addition, has a unique totalling area, no further information is available for this table in table ET_GROUPLEVELS.
    get_subtotals
    EP_COLLECT01 to EP_COLLECT09
    Point to the subtotals line. For each subtotals level, there is one reference variable. Each of these variables points to an internal table that has the type of the output table. EP_COLLECT01 points to the subtotal at the hightest level, while EP_COLLECT02 points to the subtotal at the second highest level, and so on. The levels are derived from the sort priority (field SPOS in the sort table ). The column by which the data was sorted first, is the highest subtotals level.
    ET_GROUPLEVELS
    Manages all indexes for the individual control levels. The fields of the table have the following meaning:
    • INDEX_FROM, INDEX_TO: Rows of the output table for which the subtotal was created
    • LEVEL: Subtotals level (see above)
    • COUNTER: Number of rows for which the subtotal was created
    • COMPRESS: For this subtotals line, the user has hidden the associated rows.
    • COLLECT: Indicates the subtotals table (01-09) in which the values are stored
    For an overview, see Methods of Class CL_GUI_ALV_GRID
    Activities

  • Displaying Page No in ALV Grid top of page

    Dear All,
    I have tio display the page number in ALV grid top of page .
    That is 001 of 100
    next page 002 of 100
    this page number should increase / decrease depending upon page up and page down also on scrolling the ALV bar .
    How to achieve this?
    Regards

    Hi Rajendra,
    I guess you need to write your logic to get the page numbers. Check the below link.
    Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
    Thanks
    Satya
    Edited by: Rob Burbank on Aug 24, 2010 5:57 PM

  • TextEdit won't print page numbers.

    I have followed directions of choosing to print "headers and footers" in the print dialogue and the header is indeed printed but no page numbers. This happens with any document I print.
    Is there a solution?
    Thanks,
    Richard

    Since it works in the new account, then there's something corrupted/conflicting in the original one. While logged into the newly created admin account, backup the bad account's folder, delete the bad account, selecting the save data option (which is stored in /Users/Deleted Users/ as a disk image), recreate the bad account using the same username/password combo, log out and back into the recreated original account. If the problem's solved, open the saved data dmg file in /Users/Deleted Users/, open the /Library/Preferences/ folder from the saved data, open the current /Users/restored account/Library/Preferences/ folder, and slowly copy plist files from the saved data folder to the current one that don't exist in it. Log out and back in to ensure there's no conflict and things still work correctly. Resolving conflicts or identifying corrupt plist files is a laborious process. Good luck.
    See http://discussions.apple.com/thread.jspa?messageID=4703015 for more details on this process.

  • Binding ALV GRID with Deep Internal Table

    Hello all,
    I am looking for a way to display ALV Grid with the Deep ITAB.
    My ITAB is not too complex.
    It has One Structure which gets whole DB table + One extra field.
    Therefore my Itab looks as follows.
    TYPES: BEGIN OF TY_TRIP,
            ZPM_UPLOAD LIKE ZDBTABLE, "ZDBTABLE is custom database table.
            TDTIME TYPE STRING,
           END OF TY_TRIP.
    DATA: ITAB TYPE TABLE OF TY_TRIP,
          WA_ITAB LIKE LINE OF ITAB.
    Now i am able to populate data into Deep ITAB.
    If i call ALV Grid with ITAB then i get error. So how to call 'REUSE_ALV_GRID_DISPLAY' with this ITAB?
    Thanks in advance.

    Hello,
    My senior asked me to use the below definition.
    TYPES: BEGIN OF TY_TRIP.
            INCLUDE STRUCTURE ZDBTABLE.
    TYPES:  TDTIME TYPE STRING,
           END OF TY_TRIP.
    DATA: ITAB TYPE TABLE OF TY_TRIP,
          WA_ITAB LIKE LINE OF ITAB.
    If anyone else is looking to print in ALV, they can use this type of ITAB definition though it gives you the flexiblity to create ITAB and also making it FLAT and not DEEP.
    But i am still looking for an answer for my first post.
    Thanks.

  • Page No in ALV GRID Header disply ?

    Hi,
    How to display the page No in ALV GRID Header display.
    Thanks & Regards,
    Amir.

    hai
    I think u can use this funtion... Using this funtion u can find som solution for ur problem
    *&      Form  BUILD_EVENTTAB
          text
         -->P_EVENTS[]  text                                             *
    form build_eventtab using p_events type slis_t_event.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = p_events.
      read table p_events with key name = slis_ev_top_of_page
                               into ls_event.
      if sy-subrc = 0.
        move formname_top_of_page to ls_event-form.
        append ls_event to p_events.
      endif.
    endform.                               " BUILD_EVENTTAB
    *&      Form  BUILD_COMMENT
          text
         -->P_HEADING[]  text                                            *
    form build_comment using p_heading type slis_t_listheader.
      data: hline type slis_listheader,
            text(60) type c,
            test_date TYPE string,
           test_date1 TYPE string,
           sep(20) type c.
      clear: hline, text.
      hline-typ  = 'H'.
      write: text-101 to text+23.
      hline-info = text.
      append hline to p_heading.
      clear text.
      write: 'User: ' to text,
             sy-uname to text+6,
             'Date: ' to text+25,
             sy-datum to text+31,
             'Page: ' to text+50,
             sy-pagno to text+56.
      hline-info = text.
      append hline to p_heading.
    endform.                    " BUILD_COMMENT
          FORM TOP_OF_PAGE                                              *
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = heading.
    endform.
    regard
    nawa

  • Display amount in ALV Grid with different Decimal Places based on Currency

    HI Experts,
    Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2.
    we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
    im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
    AED---22.56
    KWD---225.65
    i need to display values like AED : 22.56

    HI Experts,
    Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2. we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
    im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
    AED---22.56
    KWD---225.65 (converting this value to 22.565 using BAPI_CURRENCY_GETDECIMALS according to currency in my Report)
    i need to display values like AED : 22.56
                                             KWD---22.565 but here field is NETWR with 2 decimal.
    Need to Display amount in ALV Grid with different Decimal Places based on Currency
    Regards,
    Dileep Kumar Reddy

  • ALV Grid with Popup Window

    Hey @all,
    I want to make a ALV Grid with a Popup Window. The idea is that there is a field for notes and when you click on this field a popup window should be opened where you can insert more text or if text already exists only the first column of the text is shown in field until you click on the field.
    Is there any possibility to do it this way? Do I have to make a second Grid for this Popup Window? Do anybody have an example how to solve this problem?
    Thank you in advance for your answers!
    Greetings,
    Alexander

    *& Report  Z_VISHVAS_ALV1
    report  z_vishvas_alv1.
    type-pools: slis.
    data: begin of i_outtab occurs 0.
            include structure sflight.
    data:   w_chk type c.                  "For multiple selection
    data: end of i_outtab.
          I_OUTTAB TYPE SFLIGHT OCCURS 0,
    data: i_private type slis_data_caller_exit,
          i_selfield type slis_selfield,
          w_exit(1) type c.
    parameters: p_title type sy-title.
    start-of-selection.
      select * from sflight into table i_outtab.
      call function 'REUSE_ALV_POPUP_TO_SELECT'
           exporting
                i_title                 = p_title
                i_selection             = 'X'
                i_zebra                 = 'X'
              I_SCREEN_START_COLUMN   = 0
              I_SCREEN_START_LINE     = 0
              I_SCREEN_END_COLUMN     = 0
              I_SCREEN_END_LINE       = 0
                i_checkbox_fieldname    = 'W_CHK'
              I_LINEMARK_FIELDNAME    =
              I_SCROLL_TO_SEL_LINE    = 'X'
                i_tabname               = 'I_OUTTAB'
                i_structure_name        = 'SFLIGHT'
              IT_FIELDCAT             =
              IT_EXCLUDING            =
              I_CALLBACK_PROGRAM      =
              I_CALLBACK_USER_COMMAND =
               IS_PRIVATE             = I_PRIVATE
         importing
                es_selfield             = i_selfield
                e_exit                  = w_exit
           tables
                t_outtab                = i_outtab
           exceptions
                program_error           = 1
                others                  = 2.
      if sy-subrc <> 0.
       MESSAGE i000(0k) WITH sy-subrc.
      endif.
    *****the internal table is modified with a cross sign for marking the
    ***rows selected
      loop at i_outtab where w_chk = 'X'.
        write: /  i_outtab-carrid, i_outtab-price.
      endloop.

Maybe you are looking for