Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3212

How to trigger PAI on pressing enter on set_table_for_first_display table ?

$
0
0

I am not able to trigger the PAI event on pressing enter if i click on table cells and area of this table but when i click outside this table it is trigerring the user command of screen 0116. I have used one method egister_edit_event so it will trigger if we click outside the table block.

 

I have one main screen 0100 and subscreen as 0101, this 0101 is a custom container --

 

PBO--------.

 

1> Created Object for container--

 

CREATE OBJECT o_cont_sob

       EXPORTING

         container_name              = 'SOB_ALV'  

       EXCEPTIONS

         cntl_error                  = 1

         cntl_system_error           = 2

         create_error                = 3

         lifetime_error              = 4

         lifetime_dynpro_dynpro_link = 5

         OTHERS                      = 6.


2> Created object for GRID--


CREATE OBJECT o_grid_sob

         EXPORTING

           i_parent          = o_cont_sob

         EXCEPTIONS

           error_cntl_create = 1

           error_cntl_init   = 2

           error_cntl_link   = 3

           error_dp_create   = 4

           OTHERS            = 5.


CALL METHOD o_grid_sob->set_table_for_first_display

       EXPORTING

         it_toolbar_excluding          = pt_exclude

         is_layout                     = wa_layout

       CHANGING

         it_outtab                     = gt_sob_1

         it_fieldcatalog               = gt_fieldcat_new

       EXCEPTIONS

         invalid_parameter_combination = 1

         program_error                 = 2

         too_many_lines                = 3

         OTHERS                        = 4.


*  Registering the EDIT Event

 

     CALL METHOD o_grid_sob->register_edit_event

       EXPORTING

         i_event_id = cl_gui_alv_grid=>mc_evt_enter

       EXCEPTIONS

         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.                                 " IF SY-SUBRC NE 0


PAI-----


MODULE user_command_0116 INPUT.

 

   CALL METHOD o_grid_sob->register_edit_event

     EXPORTING

       i_event_id = cl_gui_alv_grid=>mc_evt_enter "trigger event after ENTER is pressed

     EXCEPTIONS

       error      = 1

       OTHERS     = 2.



Please suggest how to trigger it.



Viewing all articles
Browse latest Browse all 3212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>