Skip to Content
avatar image
Former Member

Enter event in table control

I want that if I press enter from key board cursor from current row in table control shud move to next row how can i do it

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Apr 12, 2010 at 04:37 AM

    Hi,

    I am just curious to know why do you want this kind of functionality. If you have to try something like this, you have keep modifying your internal table (like, whenever you press an Enter, delete the current row from the internal table and move it to the next row)

    If your requirement is add multiple rows to the table control, then you can have a button called 'ADD' that is specific and functions on the table control. You can increment the attribute called 'LINES' and keep adding rows to the table control.

    Also, 'Enter' does not have a function code assigned to it. What you can do is, go to the GUI Status of the screen and in the Function Keys, assign a F-code to Enter to the Standard Toolbar key (the first one with a tick mark).

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 12, 2010 at 04:50 AM

    This is the required functionality thats y I want that

    so wen i add fcode 'ENTER' in the first 'Tick' icon in standard toolbar under function keys nothing happens wen i press enter from keyboard i mean ok_code is blank and has no values ...?

    also i have one more doubt

    wen i use scroll the table control from the vertical scrol bar values entered in table dissapears as some event is fired and i hav refreshed the table in PAI before looping in the table control

    PROCESS AFTER INPUT.

    • Initialize check list

    MODULE init_bid_list. -


    > Table is cleared here and values removed in case on scrooling

    LOOP AT gi_pmpb_bchid .

    How to handle it

    Add comment
    10|10000 characters needed characters exceeded

    • *also i have one more doubt

      wen i use scroll the table control from the vertical scrol bar values entered in table dissapears as some event is fired and i hav refreshed the table in PAI before looping in the table control*

      Hi,

      For the above query, The answer lies in ur question itself.

      When you press the scroll bar, the control goes throught he code taht refreshes ur internal table and hence, no values are displayed.

  • avatar image
    Former Member
    Apr 12, 2010 at 05:18 AM

    Recommended function keys is nt showing ENetr as key as f1 f2 etc

    how can i add it

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 12, 2010 at 05:19 AM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 12, 2010 at 05:36 AM

    I cannot change internal table nw as it will require muh time but right nw my main issue is gettin ENETR keys in pf status

    it is not showing Enter in pf-status as recommended keys or Freely Assigned Function Keys so it does not catch the event even if i enter it pf-status at any f5 f6 etc as it shud be after enter only

    secondly i know that bcoz if refresh values are gettin removed on scroll but i cannot remove refresh stament plz tell some alternative that on scroll table is not refreshed

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 12, 2010 at 05:48 AM

    Please help guys

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Karan,

      Follow these steps . Add the following code in Flowlogic of the screen and program .

      PROCESS BEFORE OUTPUT.
          LOOP AT IT_CUST_ID WITH CONTROL TBC_ID.
          MODULE FILL_TBC_ID.
          ENDLOOP.
          MODULE SET_CURSOR.
      PROCESS AFTER INPUT.
      
        MODULE EXIT AT EXIT-COMMAND.
        MODULE GET_CURSOR.

      In the program , add the following code .

      data : W_CURSOR(50) ,

      W_CUR_ID TYPE I VALUE 1 .

      *&----


      *

      *& Module GET_CURSOR INPUT

      *&----


      *

      • text*

      *----


      *

      MODULE GET_CURSOR INPUT.

      *GET CURSOR FIELD W_CURSOR.*

      ENDMODULE. " GET_CURSOR INPUT

      &----


      *& Module SET_CURSOR OUTPUT

      &----


      • text

      ----


      MODULE SET_CURSOR OUTPUT.

      CHECK W_CURSOR IS NOT INITIAL.

      CASE W_CURSOR.

      WHEN 'ZV030_CUST_MAS-EMAIL'.

      W_CUR_ID = 1 .

      SET CURSOR FIELD 'ZV030_CUST_ID-COMPT' LINE W_CUR_ID.

      WHEN 'ZV030_CUST_ID-MDNUM'.

      SET CURSOR FIELD 'ZV030_CUST_ID-SLNUM' LINE W_CUR_ID.

      WHEN 'ZV030_CUST_ID-COMPT'.

      SET CURSOR FIELD 'ZV030_CUST_ID-MDNUM' LINE W_CUR_ID.

      WHEN 'ZV030_CUST_ID-SLNUM'.

      SET CURSOR FIELD 'ZV030_CUST_ID-VITYP' LINE W_CUR_ID.

      WHEN 'ZV030_CUST_ID-VITYP'.

      SET CURSOR FIELD 'ZV030_CUST_ID-DTCOM' LINE W_CUR_ID.

      WHEN 'ZV030_CUST_ID-DTCOM'.

      SET CURSOR FIELD 'ZV030_CUST_ID-DIVSN' LINE W_CUR_ID.

      WHEN 'ZV030_CUST_ID-DIVSN'.

      SET CURSOR FIELD 'ZV030_CUST_ID-VBELN_S' LINE W_CUR_ID.

      WHEN 'ZV030_CUST_ID-VBELN_S'.

      SET CURSOR FIELD 'ZV030_CUST_ID-VBELN_B' LINE W_CUR_ID.

      WHEN 'ZV030_CUST_ID-VBELN_B'.

      SET CURSOR FIELD 'ZV030_CUST_ID-AVORM' LINE W_CUR_ID.

      WHEN 'ZV030_CUST_ID-AVORM'.

      SET CURSOR FIELD 'ZV030_CUST_ID-HRREM' LINE W_CUR_ID.

      WHEN 'ZV030_CUST_ID-HRREM'.

      W_CUR_ID = W_CUR_ID + 1.

      SET CURSOR FIELD 'ZV030_CUST_ID-COMPT' LINE W_CUR_ID.

      ENDCASE.

      ENDMODULE. " SET_CURSOR OUTPUT

      Thanks and Regards,

      S.Sivakumar

      Edited by: sivakumar subramaniam on Apr 12, 2010 2:23 PM

      Edited by: sivakumar subramaniam on Apr 12, 2010 2:25 PM