PF Status and At line Selection

Hi All,
I need your help!
I have used PF Status for my first screen display. Now I need to display a 2nd screen, new classical report which a line can  be selected  ( Double-Clicked ) and then a transaction can be displayed.
How should I do this?
Thanks,
Dyan

HI
JUST GO THRO THE FOLLOWING LINES..I HAVE USED AT LINE SELECTION..
DATA: IT_LFA1 TYPE TABLE OF LFA1,
      WA_LFA1 TYPE LFA1,
      IT_EKKO  TYPE TABLE OF EKKO,
      WA_EKKO TYPE EKKO,
      IT_EKPO  TYPE TABLE OF EKPO,
      WA_EKPO TYPE EKPO.
SELECT-OPTIONS ACCNO FOR WA_LFA1-LIFNR.
SELECT  * FROM LFA1 INTO TABLE IT_LFA1 WHERE LIFNR IN ACCNO.
WRITE : /70 'VENDOR Report' COLOR COL_HEADING .
  ULINE.
  WRITE : /10 'ACCOUNT NO  ', 57 'NAME'.
  LOOP AT IT_LFA1 INTO WA_LFA1.
    WRITE: /10 WA_LFA1-LIFNR, WA_LFA1-NAME1, WA_LFA1-ORT01.
    hide WA_LFA1-LIFNR.
  ENDLOOP.
clear WA_LFA1-LIFNR.
AT LINE-SELECTION.
**write / sy-LILLI.
IF SY-LSIND = 1.
     SELECT * FROM EKKO INTO TABLE IT_EKKO WHERE LIFNR = WA_LFA1-LIFNR.
WRITE : / 'PUR DOC NO',20 'COMP CODE',30 'PUR DOC TYPE'.
     LOOP AT IT_EKKO INTO WA_EKKO.
WRITE: /10 WA_EKKO-EBELN, WA_EKKO-BUKRS,WA_EKKO-BSART.
        HIDE WA_EKKO-EBELN.
      ENDLOOP.
ENDIF.
IF SY-LSIND = 2.
SELECT * FROM EKPO INTO TABLE IT_EKPO WHERE EBELN = WA_EKKO-EBELN.
WRITE: / 'MATERIAL NO','PLANT','STORAGE LOCATION'.
  LOOP AT IT_EKPO INTO WA_EKPO.
  WRITE: /10 WA_EKPO-MATNR, WA_EKPO-WERKS, WA_EKPO-LGORT.
  HIDE WA_EKPO-MATNR.
  ENDLOOP.
ENDIF.
IF SY-LSIND = 3.
SET PARAMETER ID 'DFD' FIELD WA_EKPO-MATNR.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
ENDIF.
REWARD IF USEFUL.

Similar Messages

  • Set PF Status and At-Line Selection & At User-Command

    Hi All
    I've used set PF status, at user command and at-line selection in my program. initially when i click on the material number it was not drilling further that is it was not taking to secondary list. i commented the PF status and tried. then it was working fine. Later, after checking on couple of doc i added F.code PICK in my PF status and uncommented the set-PF status in my program it was working fine. Now my question is why this kind of behaviour. When i uncomment the PF status  and run the program without the f.code PICK in my PF status(se41)  it was not working but after inlcuding the F.code in my PF it is working. Any good explanation?
    thks   
    Prabhu

    hi,
    generally fuction code is useful for the system to find on which button or in which area the user has clicked in. based on the function code the system executes the satatements that are in user command.  in your case i think u didnt gave any functionality in user-command. when at-user command is a event in interactive reporting which is triggered based on the button u had clicked.
    at line-selection event uses two system variables
       1. sy-lsind [ current list index number ]
       2. sy-lisel  [ contains the current area in which user ckicked ].
       3. sy-ucomm [ function code of clicked button ].
    using these 3 vars we can drill down to 21 lists [ including 1st list ]
    if helpful reward some points.
    with regards,
    suresh.

  • How to use both At USER-COMMAND and AT LINE-SELECTION in one abap program

    I am trying out a program where I need to use both line selection and user command events in one program. Suggest me how to do it.

    USE the okcode 'PICK'. (I mean add a 'PICK' in the GUI staus or the menu.) When ever u use both the events u have to use PICK to trigger the at line selection.
    U just need to add the PICK in the GUI status and ofcourse write code in the program.
    AT LINE-SELECTION.
    CASE sy-ucomm.
    WHEN 'PICK'.
    write:/ 'HELLO WORLD'.
    ENDCASE.

  • Refresh Report and At Line-Selection and At User-Command

    Hi All
    I have 2 querries
    1) I want to use At Line-selection and At user-command in the same report. But At line-selection is not getting triggered why? When I remove Set pf-status 'xxx' and at user command , then at line selection works . I want to user both at a time.
    2) I am giving user ability to edit the report shown and when he comes back by exiting the editing I want to refresh the report which is shown already to him to give effect of his editing.
    Thanks in anticipation
    pM.

    i just tried, and no problem at all.
    In the <b>Recommended Function Key Settings</b>  for  F2 key add command "PICK"
    Regards
    Raja
    since you are new to the forum, have a look at this weblog.
    /people/mark.finnern/blog/2004/08/10/spread-the-love

  • How to use AT LINE-SELECTION and AT USER-COMMAND in one report????

    Dear all,
    I have a problem in reports I want to use AT USER-COMMAND.and AT LINE-SELECTION.both in the one report.
    But as soon as I use SET PF-STATUS my AT LINE-SELECTION event stop workingand only AT USER-COMMAND is working.
    How can I use both of them in one report for your reference I am giving my test program below.
    REPORT ZTEST111 .
    SET PF-STATUS '100'.
    DO 10 TIMES.
    WRITE:/ SY-INDEX.
    HIDE SY-INDEX.
    ENDDO.
    START-OF-SELECTION.
    AT LINE-SELECTION.
    MESSAGE I002(SY) WITH SY-INDEX.
    AT USER-COMMAND.
    MESSAGE I002(SY) WITH 'USER COMMAND'.
    END-OF-SELECTION.
    Thanks in advance
    Sachin Gautam

    hi
    Syntax
    AT USER-COMMAND.
    Effect
    This statement defines an event block whose event is triggered by the ABAP runtime environment if, during the display of a screen list, a function with a self-defined function code was chosen.
    Note
    Self-defined function codes are all those that include character combinations, except for the following:
    The function codes PICK and PF## ("##" stands for 01 to 24) do not cause the event AT USER-COMMAND, but the events AT LINE-SELECTION and AT PF##.
    All function codes that start with the character "%" are interpreted as system functions and do not cause the event AT USER-COMMAND. The system functions for lists are listed in the following table 1.
    The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.
    Table 1
    Function code Function
    %CTX Call a context menu
    %EX Exit
    %PC Save to file
    %PRI Print
    %SC Search for ...
    %SC+ Find next
    %SL Search in office
    %ST Save to report tree
    Table 2
    Function code Function
    BACK Back
    P- Scroll to previous page
    P-- Scroll to first page
    P+ Scroll to next page
    P++ Scroll to last page
    PFILE name Store list lines in a text file named abap.lst in standard character representation in the standard directory of the application server. If a name is entered using name, this is converted to lowercase letters and used as the file name.
    PL- Scroll to first line of the page
    PL-n Scroll n lines back
    PL+ Scroll to last line of the page
    PL+n Scroll n lines up
    PNOP No effect
    PP- Scroll back one page
    PP-n Scroll n pages back
    PP+ Scroll one page forward
    PP+n Scroll n pages forwad
    PPn Scroll to beginning of page n
    PRI, PRINT Print
    PS-- Scroll to first column
    PS++ Scroll to last column
    PS- Scroll one column to the left
    PS-n Scroll n columns to the left
    PS+ Scroll one column to the right
    PS+n Scroll n columns to the right
    PSn Scroll to column n
    PZn Scroll to line n
    RW Cancel

  • Can not use 'AT LINE-SELECTION' with SET PF-STATUS

    Hi experts,
    my code is like below:
    PARAMATERS: .....
    SET PF-STATUS 'st_nam'.
    Perform Load_data . ' For list display
    START-OF-SELECTION.
    AT LINE-SELECTION.
      Perform list_detail.
    AT USER-COMMAND.
      CALL SCREEN '1001'.
    END-OF-SELECTION.
    When I execute the report , the basic was displayed , but when then i double click on the list to call the next screen '1001'. It did not work , but if i omit the SET PF-STATUS m AT LINE-SELECTION worked week , so in this case what has happened i how can i solve this problem,
    Thaks,
    PS: Reward immediately

    Hi,
    Thank you very much for your helpful answers, I have copied the report downto my system and test it , When i used SET PF-STATUS , i can not use AT LINE-SELECTION to capture events ...May be we can not use these 2 statements in parallel,...:D
    Thanks,

  • In interactive how to use AT LINE-SELECTION WITH SET PF-STATUS

    Hi all,
             I am developing an interactive report in which i am using gui status (pf-status ) for AT USER-COMMAND and AT LINE-SELECTION  event .But when i used at line-selection event is  not working with pf-status even though i use PICK function code .
    plz help me to work with both the event i.e.
    AT USER-COMMAND.
    AT LINE-SELECTION.
    Thanks a lot in Advance .
    Regards,
    Tarak

    hi,
      In PBO of Module Pool, Please Write in this way
    MODULE status_9001 OUTPUT.
    Set the PF-STATUS
      SET PF-STATUS '9001'.
    To Set the Title of Screen
      SET TITLEBAR 'TITLE'.
    ENDMODULE
    Setting PF status to the (SAP) system default
    set pf-status 'BASIC'.
    How to check for pf-status
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'ART'.
    PERFORM STYR_ARTSKONTI.
    WHEN 'PST'.
    PERFORM STYR_POSTER.
    WHEN 'BIL'.
    PERFORM VIS_BILAG.
    ENDCASE..

  • Diff between at line selection and HIDE technique

    hi all,
           wht is the diff between at-line-selection and HIDE technique.
            wht r code instructor
            wht is extended testing
            how can we find selected error records in session                          method ex:-if there r errors in 4th 9th 13th record.
    tthnx in advance

    HIDE
    Syntax
    HIDE dobj.
    Effect
    This statement stores - in the current list level - the content of the variable dobj together with the current list line whose line number is contained in sy-linno. The data type of the variables dobj must be flat and no field symbols can be specified that point to rows of internal tables, and no class attributes can be specified. The stored values can be read as follows:
    For each user action in a displayed screen list that leads to a list result, all the row values stored using HIDE - that is, the row on which the screen cursor is positioned at the time of the event - are assigned to the respective variables.
    If a list row of an arbitrary list level is read or modified using the statements READ LINE or MODIFY LINE, all the values of this row stored using HIDE are assigned to the respective variables.
    Notes
    The HIDE statement works independently of whether the list cursor was set. In particular, variables for empty list rows can be stored - that is, rows in which the list cursor was positioned using statements like SKIP.
    The HIDE statement should be executed immediately at the statement that has set the list cursor in the row.
    Outside of classes, constants and literals that cannot be read in list results and in the statement READ LINE can be specified for dobj outside of classes.
    Example
    Storing square numbers and cubic numbers for a list of numbers. The example shows that arbitrary variables can be stored independently of row content. In the real situation, one would more likely store only the number and execute the calculation, when required, in the the event block for AT LINE-SELECTION.
    REPORT ...
    DATA: square TYPE i,
          cube   TYPE i.
    START-OF-SELECTION.
      FORMAT HOTSPOT.
      DO 10 TIMES.
        square = sy-index ** 2.
        cube   = sy-index ** 3.
        WRITE / sy-index.
        HIDE: square, cube.
      ENDDO.
    AT LINE-SELECTION.
      WRITE: square, cube.
    AT LINE-SELECTION
    Syntax
    AT LINE-SELECTION.
    Effect
    This statement defines an event block whose event is triggered by the ABAP runtime environment during the display of a screen list - provided the scren cursor is on a list line and you select a function using the function code PICK. Through the definition of this event block, the standard list status is automatically enhanced in such a way that the function code F2 and, with it, the double-click mouse function is linked up to the function code PICK.
    Note
    If the function key F2 is linked with a function code different than PICK, each double click will trigger its even, usually AT USER-COMMAND, and not AT LINE-SELECTION.
    Example
    This program works with the standard list status. A line selection with the left mouse key causes the event AT LINE-SELECTION and creates details lists.
    REPORT demo_at_line_selection.
    START-OF-SELECTION.
      WRITE 'Click me!' COLOR = 5 HOTSPOT.
    AT LINE-SELECTION.
      WRITE: / 'You clicked list', sy-listi,
             / 'You are on list',  sy-lsind.
      IF sy-lsind < 20.
        SKIP.
        WRITE: 'More ...' COLOR = 5 HOTSPOT.
      ENDIF.
    Thanks,

  • At line-selection... SET pf 'status'.

    hi abapers !
    i  am working with interactive reports !
    my problem ...i s
    when am using
    SET PF 'STATUS'.
    At line-selection event is not getting triggered..!
    i.e, when am double cllicking on the list ...
    its showing choose a valid function.
    am able to implement my tool bar .. status.
    using
    AT user-command.
    case sy-ucomm.
    endcase.
    but  i want to genrerate secondary list... with out ,using tool bar..
    how can i trigger at line-selection event....!
    pls can any one help me.. with an simple example...!

    If you do not want any button then use GET CURSOR instead of SET PF status.
    Try ir in this way
    TYPES: BEGIN OF x_mara,
      matnr TYPE matnr,
      END OF x_mara.
    DATA : i_mara TYPE STANDARD TABLE OF x_mara INITIAL SIZE 0,
           i_marc TYPE STANDARD TABLE OF marc INITIAL SIZE 0,
           l_value TYPE string,
           l_field TYPE string,
           wa_marc TYPE marc,
           wa_mara TYPE x_mara.
    SELECT matnr FROM mara  INTO TABLE i_mara.
    LOOP at i_mara INTO wa_mara.
      WRITE: / wa_mara-matnr.
      ENDLOOP.
    AT LINE-SELECTION.
      GET CURSOR FIELD l_field VALUE l_value.
      IF l_field = 'WA_MARA-MATNR'.
        SELECT * FROM marc INTO TABLE i_marc WHERE matnr = l_value.
          LOOP AT i_marc INTO wa_marc.
            WRITE: / wa_marc-matnr , wa_marc-werks.
          ENDLOOP.
      ENDIF.

  • At user-command & At Line-selection

    Hi,
    I am using ECC5 ver. of ABAP.
    Can I use AT USER-COMMAND and AT LINE-SELECTION
    in the same report?
    I have used it but only At user command works, not At line selection.
    When I remove Set pf-Status, At line selection works.
    Here is my code.
    REPORT PF&ATLINE.
    AT LINE-SELECTION.
      MESSAGE 'Line Selected' TYPE 'I'.
    AT USER-COMMAND.
      IF sy-ucomm = 'PUSH'.
        MESSAGE 'Button Pushed' type 'I'.
      elseif sy-ucomm = 'EXIT'.
        LEAVE PROGRAM.
      ENDIF.
    START-OF-SELECTION.
      SET PF-STATUS 'ZRND3'.
      DO 10 TIMES.
        WRITE:/01 SY-INDEX HOTSPOT.
      ENDDO.
    END-OF-SELECTION.

    Hi Rajiv,
    Setting the PICK function code to F2 will definitely solve it..
    and it triggers the at user-command and at line-selection event as per user interaction...
    If it is not working properly... then there might me something wrong in your code...
    can you place the code... so that we can know the exact problem
    regards
    padma

  • Problem with at line-selection

    hi mates
    i have written a interactive report program, when i click the hotspot in the basic list the event at line-selection is not getting triggered insead my at user-command is geting executed. is there a sequence that i need to follow?. below is my code. thanks in advance.
    tables: vbak.
    selection-screen begin of block b1 with frame title t1.
      select-options: salesdoc for vbak-vbeln.
    selection-screen end of block b1.
    types: begin of vbak_ty,
           vbeln type vbak-vbeln,
           erdat type vbak-erdat,
           ernam type vbak-ernam,
           end of vbak_ty.
    types: begin of vbap_type,
           vbeln type vbap-vbeln,
           posnr type vbap-posnr,
           matnr type vbap-matnr,
           charg type vbap-charg,
           end of vbap_type.
    types: begin of vbap_ty,
           posnr type vbap-posnr,
           matwa type vbap-matwa,
           arktx type vbap-arktx,
           end of vbap_ty.
    data: vbap_wa type vbap_type,
          vbap_it type table of vbap_type,
          vbak_wa type vbak_ty,
          vbak_it type table of vbak_ty,
          vbap_wa1 type vbap_ty,
          vbap_it1 type table of vbap_type,
          fname(20),fvalue(10).
    initialization.
           t1 = 'enter sales doc header'.
    start-of-selection.
      set pf-status 'VA01'.
      SELECT vbeln
             erdat
             ernam
             from vbak into table vbak_it
             where vbeln in salesdoc.
       if sy-subrc = 0.
       loop at vbak_it into vbak_wa.
         write: /25 vbak_wa-vbeln hotspot,
                 50 vbak_wa-erdat,
                 75 vbak_wa-ernam.
         hide vbak_wa-vbeln.
         clear vbak_wa-vbeln.
         endloop.
         ELSE.
           message e000(01) with 'no records found '.
           endif.
        at line-selection.
          case sy-lsind.
            when '1'.
              perform headerdata.
            when '2'.
              perform itemdata.
           endcase.
      at user-command.
        case sy-ucomm.
          when 'ITEMDATA'.
          get cursor  field fname value fvalue.
          if fvalue = 'vbap_wa-vbeln'.
             perform itemdata.
           else.
             message e000(03) with 'click only on hotspots'.
           endif.
          when 'SALEOR'.
           get cursor field fname value fvalue.
           if fvalue = 'vbak_wa-vbeln'.
            set parameter id 'AUN' field fvalue.
            call transaction 'VA01' and skip first screen.
           else.
             message e000(04) with 'click only on hotspots'.
           endif.
        endcase.
        form headerdata.
        set pf-status 'HEADER'.
        select vbeln
               posnr
               matnr
               charg
               from vbap into table vbap_it
               where vbeln = vbak_wa-vbeln.
          if sy-subrc = 0.
       loop at vbap_it into vbap_wa.
         write: /25 vbap_wa-vbeln hotspot,
                 50 vbap_wa-posnr,
                 75 vbap_wa-matnr,
                 90 vbap_wa-charg.
         hide vbap_wa-vbeln.
         clear vbap_wa-vbeln.
         endloop.
         else.
           message e000(02) with ' no data found'.
           endif.
           endform.
        form itemdata.
             select vbeln
               posnr
               matwa
               arktx
               from vbap into table vbap_it1
               where vbeln = vbap_wa-vbeln.
      if sy-subrc = 0.
       loop at vbap_it1 into vbap_wa1.
         write: /25 vbap_wa1-posnr,
                 75 vbap_wa1-matwa,
                 90 vbap_wa1-arktx.
          endloop.
           else.
           message e000(02) with ' no data found'.
           endif.
           endform.
    REGARDS
    MANO

    AT LINE-SELECTION.
    Effect
    This statement defines an event block whose event is triggered by the ABAP runtime environment during the display of a screen list - provided the scren cursor is on a list line and you select a function using the function code PICK. Through the definition of this event block, the standard list status is automatically enhanced in such a way that the function code F2 and, with it, the double-click mouse function is linked up to the function code PICK.
    Note
    If the function key F2 is linked with a function code different than PICK, each double click will trigger its even, usually AT USER-COMMAND, and not AT LINE-SELECTION.
    Example
    This program works with the standard list status. A line selection with the left mouse key causes the event AT LINE-SELECTION and creates details lists.
    REPORT demo_at_line_selection.
    START-OF-SELECTION.
      WRITE 'Click me!' COLOR = 5 HOTSPOT.
    AT LINE-SELECTION.
      WRITE: / 'You clicked list', sy-listi,
             / 'You are on list',  sy-lsind.
      IF sy-lsind < 20.
        SKIP.
        WRITE: 'More ...' COLOR = 5 HOTSPOT.
      ENDIF.
    The above sample program works with the standard list status Since your program has the PF-status set, i think AT LINE-SELECTION will not work. So do use AT USER-COMMAND to capture the "PICK" event.
    Hope this helps.
    Thanks
    Balaji

  • AT LINE-SELECTION won't be triggered when I use SET PF-STATUS?

    Dear All,
    I have a simple program that shows a list. My program has AT LINE-SELECTION event. I also use a GUI status for my list.
    When I ran my program and double clicked a line, the AT LINE-SELECTION event was never triggered. Later, I deleted the line that registers the GUI status (SET PF-STATUS.... ). When I ran it again and double clicked a line, the AT LINE-SELECTION was triggered.
    Therefore, I conclude that AT LINE-SELECTION won't be triggered when I use SET PF-STATUS. Is it true?
    If so, is there any way to make my list responds to double click event when I also use GUI status?
    Thanks in advance,
    Haris

    Hi Harris,
    Check this link. I think it will answer your question.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba34635c111d1829f0000e829fbfe/content.htm
    Regards,
    Madhu.

  • CL_GUI_ALV_GRID: Line selection and backend table

    Dear community,
    is there a way to propagate line selection of ALV GRID GUI automagically to the backend data table?
    This is my scenario:
    1) A table containing several records with one column 'SELECTED' for selection status
    2) ALV_GRID to display the table with layout info for line selection
    alv_layo-sel_mode   = 'A'.
    alv_layo-box_fname  = 'SELECTED'.
    3) At PBO methods set_table_for_first_display and refresh_table_display are called with the table containing some records marked as 'SELECTED'.
    First problem here: 'SELECTED' entries are not propagated to the ALV grid (the lines in the GUI are not marked). I know I could use set_selected_rows to force the selection, but is this really necessary?
    4) Then, at PAI method check_changed_data is called (and yes, event mc_evt_modified is registered).
    Second problem: Changes in selection are not propagated automagically to the underlying table. I also know I could use get_selected_rows to force this update manually, but again: is this really necessary?
    Can anyone explain the behavior why sorting etc. is propagated automatically to the underlying table, but not the selection of rows? Am I missing something?
    Hint: Removing box_fname = 'SELECTED' and setting the fieldcatalog to display the column 'SELECTED' as editable checkbox works also. But our users are familiar with the rowmark, so this is no option.
    Any suggestions are welcome.
    Thanks,
    Torsten.
    Here an (almost) complete listing of the code:
    PROCESS BEFORE OUTPUT.
      MODULE SET_STATUS_TITLE_0100.
      MODULE INIT_ALV_GRID_0100.
      MODULE DISPLAY_DATA_0100.
      MODULE SET_GRID_SELECTION_0100.
    PROCESS AFTER INPUT.
      MODULE EXIT_COMMAND_0100 AT EXIT-COMMAND.
      MODULE UPDATE_TABLE_DATA_0100.
      MODULE USER_COMMAND_0100.
    MODULE init_alv_grid_0100 OUTPUT.
      IF NOT gr_container IS BOUND.
    *   Container erzeugen
        CREATE OBJECT gr_container ...
    *   ALV Grid erstellen
        CREATE OBJECT gr_alv_grid ...
    *   ALV für die erste Anzeige vorbereiten
        gs_alv_layo-zebra      = on.         " Gestreifte Anzeige
        gs_alv_layo-no_toolbar = on.         " Keine Toolbar
        gs_alv_layo-no_rowmark = off.        " Keine Zeilenmarkierung
        gs_alv_layo-edit       = off.        " Editieren ermöglichen
        gs_alv_layo-sel_mode   = 'A'.        " Selektionsmodus
        gs_alv_layo-cwidth_opt = off.        " Optimierte Spaltenbreite!
        gs_alv_layo-info_fname = 'LCOLOR'.   " ALV-Control: Feldname mit
                                             " einfacher Farbcodierung für
                                             " Zeile
        gs_alv_layo-ctab_fname = 'CCOLOR'.   " ALV-Control: Feldname mit
                                             " komplexer Farbcodierung
                                             " für Zellen
        gs_alv_layo-box_fname  = 'SELECTED'. " Markierte Zeilen
    *   Feldkatalog für die Anzeige vorbereiten
    *    CLEAR gs_fcat.                       " Mehrfachsel. ermöglichen
    *    gs_fcat-fieldname = 'SELECTED'.      " Dazu muss das Feld für die
    *    gs_fcat-edit      = on.              " Selektion editierbar sein.
    *    gs_fcat-checkbox  = on.              " Ausserdem muss die
    **   gs_fcat-outputlen = '3'.             " Zeilenmark. eingeschaltet
    *    APPEND gs_fcat TO gt_fcat.           " und box_fname gesetzt sein.
    *   Ereignisbehandlung
        SET HANDLER
          lcl_event_handler=>on_click
          lcl_event_handler=>on_hotspot
          lcl_event_handler=>on_double_click
          lcl_event_handler=>on_user_command
          lcl_event_handler=>on_data_changed
        FOR gr_alv_grid.
        CALL METHOD gr_alv_grid->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified
          EXCEPTIONS
            error      = 1
            OTHERS     = 2.
      ENDIF.
    ENDMODULE.                 " INIT_ALV_GRID_0100  OUTPUT
    MODULE display_data_0100 OUTPUT.
    * PBO Modul für alle weiteren Anzeigezyklen.
      IF gr_alv_grid IS BOUND.
        CALL METHOD gr_alv_grid->set_table_for_first_display ...
      ENDIF.
    ENDMODULE.                 " DISPLAY_DATA_0100  OUTPUT
    MODULE set_grid_selection_0100 OUTPUT.
      IF gr_alv_grid IS BOUND.
        CALL METHOD gr_alv_grid->refresh_table_display.
      ENDIF.
    * Alterative: Set selected rows manually
    *    CALL METHOD gr_alv_grid->set_selected_rows
    ENDMODULE.                 " SET_GRID_SELECTION_0100 OUTPUT
    MODULE update_table_data_0100 INPUT.
        CALL METHOD gr_alv_grid->check_changed_data.
    * Alternative: Get selected rows and update table manually
    *    CALL METHOD gr_alv_grid->get_selected_rows ...
    ENDMODULE.                 " UPDATE_TABLE_DATA_0100  INPUT

    Hello Torsten
    I may be wrong but I think the field LVC_S_LAYO-BOX_FNAME is a relict from the stone-age SLIS-based ALV programming.
    Using modern OO-based ALV we do not need any kind of "MARK" row but we have the appropriate methods available.
    Regards
      Uwe

  • At line-selection and At-user command

    Hi friends,
    Can we use both those events at a time in report?
    If so can any body provide me sample code?
    Regards

    <b>Example for AT LINE-SELECTION</b>
    REPORT demo_list_at_line_selection.
    START-OF-SELECTION.
      WRITE  'Basic List'.
    AT LINE-SELECTION.
      WRITE: 'Secondary List by Line-Selection',
           / 'SY-UCOMM =', sy-ucomm.
    When you run the program, the basic list appears with the standard list status. The detail list shows that SY-UCOMM has the value PICK.
    <b>Example for AT USER-COMMAND</b>
    REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
    START-OF-SELECTION.
      WRITE: 'Basic List',
           / 'SY-LSIND:', sy-lsind.
    TOP-OF-PAGE.
      WRITE 'Top-of-Page'.
      ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
      CASE sy-pfkey.
        WHEN 'TEST'.
          WRITE 'Self-defined GUI for Function Codes'.
          ULINE.
      ENDCASE.
    AT LINE-SELECTION.
      SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
      PERFORM out.
      sy-lsind = sy-lsind - 1.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'FC1'.
          PERFORM out.
          WRITE / 'Button FUN 1 was pressed'.
        WHEN 'FC2'.
          PERFORM out.
          WRITE / 'Button FUN 2 was pressed'.
        WHEN 'FC3'.
          PERFORM out.
          WRITE / 'Button FUN 3 was pressed'.
        WHEN 'FC4'.
          PERFORM out.
          WRITE / 'Button FUN 4 was pressed'.
        WHEN 'FC5'.
          PERFORM out.
          WRITE / 'Button FUN 5 was pressed'.
      ENDCASE.
      sy-lsind = sy-lsind - 1.
    FORM out.
      WRITE: 'Secondary List',
           / 'SY-LSIND:', sy-lsind,
           / 'SY-PFKEY:', sy-pfkey.
    ENDFORM.
    When you run the program, the system displays the following basic list with a the page header defined in the program:
    You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
    Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
    For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1.
    I hope it helps.
    For more details have a look at below link.
    http://help.sap.com/saphelp_di471/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/content.htm
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • How to iplement together: AT-LINE-SELECTION with GUI STATUS

    If I load SET PF-STATUS '111' then don't see icon from at-line selection and reverse.
    It is possible to implement in one program this two elements?

    Hi,
    When you define pf-status the list processing feature disappers and screen processing works. So only the user action double click can happen on the lists. The default functuion key for double click is F2. So assgn it to a user command and it will work on double click on the list.
    Regards,
    Renjith Michael.

Maybe you are looking for