2014 Nov 18 6:23 AM
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???/
2014 Nov 18 6:25 AM
Hi
Then assign the ENTER key word to that GREEN button from your custom GUI status.
regards
laxman
2014 Nov 18 6:32 AM
am assigned &ENTER
IT is working for green tick icon only,not keyboard enter functionality in oops alv
2014 Nov 18 6:43 AM
you should give ' ENTER ' and you need to mention that enter at the condition.
2014 Nov 18 9:20 AM
2014 Nov 18 11:12 AM
its in pai only.but while pressing enter from keyboard it is not working.It works only
on green tick mark.
2014 Nov 18 11:42 AM
when you press ENTER check what is the SY-UCOMM, and write logic for that sy-ucom.
2014 Nov 18 12:19 PM
its oops alv screen am using call screen 100.and am getting sy-ucomm as space,
2014 Nov 18 1:20 PM
can you share source so that it can be checked and try to point out the problem
2014 Nov 19 4:17 AM
If you get sy-ucomm is SPACE then write the validation logic for SY-UCOMM = SPACE.
2014 Nov 19 4:24 AM
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
2014 Nov 19 4:44 AM
use SPACE between ' '.
WHEN ' '.
------
------<LOGIC>
it should work.
check in debugging whether it is going into that logic when you pres enter.
2014 Nov 19 5:27 AM
hi,
when ' '.space only i gave.Its working on debuggging .normally press enter means it is not working
2014 Nov 19 5:56 AM
i saying that press enter then goto debugging check whether the cursor is going into that block.
2014 Nov 19 5:58 AM
its going to that block...while debugging mode.
without give /h and press enter means it is not working
2014 Nov 19 6:18 AM
....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..?
2014 Nov 18 8:41 PM
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