Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Key board enter key functionality

Former Member
0 Likes
2,825

Hi,

    in my editable alv grid i put some conditions for validation.

if user enter values on editable field and press enter means it checks the condition and throw error.

here whi;e pressing enter through key board means not working and click green icon means it works.

'i want to work on this by using keyboard..Anyone give suggestion???/

16 REPLIES 16
Read only

Former Member
0 Likes
2,648

Hi

Then assign the ENTER key word to that GREEN button from your custom GUI status.

regards

laxman

Read only

0 Likes
2,648

am assigned &ENTER

IT  is working for green tick icon only,not keyboard enter functionality in oops alv

Read only

0 Likes
2,648

you should give ' ENTER ' and you need to mention that enter at the condition.

Read only

Former Member
0 Likes
2,648

hi christina,

your validation has to be handled it in PAI

Read only

0 Likes
2,648

its in pai only.but while pressing enter from keyboard it is not working.It works only
on green tick mark.

Read only

0 Likes
2,648

when you press ENTER check what is the SY-UCOMM, and write logic for that sy-ucom.

Read only

0 Likes
2,648

its oops alv screen am using call screen 100.and am getting sy-ucomm as space,

Read only

0 Likes
2,648

can you share source so that it can be checked and try to point out the problem

Read only

0 Likes
2,648

If you get sy-ucomm is SPACE then write the validation logic for SY-UCOMM = SPACE.

Read only

0 Likes
2,648


MODULE PAI.

WHEN ' '.

CALL METHOD grid1->register_edit_event

       EXPORTING

         i_event_id = cl_gui_alv_grid=>mc_evt_enter.

     CALL METHOD grid1->register_edit_event

       EXPORTING

         i_event_id = cl_gui_alv_grid=>mc_evt_modified.

     IF  GRID1 IS INITIAL.

*

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

  IMPORTING

    E_GRID  = GV_REF_GRID.

    ENDIF.

    IF GRID1 IS NOT INITIAL.

      GRID1->CHECK_CHANGED_DATA(

        IMPORTING

          E_VALID   = V_VALID ).

ENDIF.

LOOP AT GT_OUTTAB .

   IF GT_OUTTAB-EDIT < SY-DATUM AND GT_OUTTAB-EDIT <> '00000000'.

     MESSAGE 'ENTER GREATER THAN CURENT DATE' TYPE 'E'.

     ENDIF.

     ENDLOOP.


STILL ENTER BUTTON IS NOT WORKING THROUGH KEY BOARD

Read only

0 Likes
2,648

use SPACE between '   '.

WHEN '  '.

     ------

     ------<LOGIC>

it should work.

check in debugging whether it is going into that logic when you pres enter.

Read only

0 Likes
2,648

hi,

   when '   '.space only i gave.Its working on debuggging .normally press enter means it is not working

Read only

0 Likes
2,648

i saying that press enter then goto debugging check whether the cursor is going into that block.

Read only

0 Likes
2,648

its going to that block...while debugging mode.

without give /h and press enter means it is not working

Read only

0 Likes
2,648

....after execution of tcode of your module pool screen just give '/H' and press ENTER so it will go to the debugg and check sy-ucomm,

if sy-ucomm is space then it should go to that validation logic because that validation logic is under that condition only(i.e,  sy-ucomm = ' '), that means it is working for ENTER.

is that clear..?

Read only

0 Likes
2,648

Hi Christina,

Handle event DATA_CHANGED of class CL_GUI_ALV_GRID in your program.

Define event handler method. Check for SY-UCOMM value and write appropriate logic as per your requirement.

Regards,

Santosh