‎2008 Feb 23 6:45 PM
I am facing the following problem:
when i press 'ADD' in the table control the function code of which is 'TABLE_LINE_INSR' and then press enter then in debugging mode the value of sy-ucomm is 'TABLE_LINE_INSR' instead of enter?!!!
kindly help me with this i am absolutely stuck!!
module display_matnr input.
*SAVE_OK = OK_CODE.
*CLEAR OK_CODE.
IF sy-ucomm <> 'CANCEL' AND sy-ucomm <> 'SAVE' AND sy-ucomm <>
'TABLE_LINE_INSR' AND
sy-ucomm <> 'TABLE_LINE_DELE' AND sy-ucomm <> 'TABLE_LINE_MARK' AND
sy-ucomm <> 'TABLE_LINE_DMRK'.
‎2008 Feb 26 11:12 AM
Hello,
Check whether u have assigned function code for enter..
Hopefully that may be the problem of not getting the function code for enter when in debugging mode.
<REMOVED BY MODERATOR>
Neeraj
Edited by: Alvaro Tejada Galindo on Feb 26, 2008 2:22 PM
‎2008 Feb 27 4:38 AM
Hi Prateek,
It seems that u haven assigned the function code for the particular push button ADD in the screen. U have to Assign function code in the attributes screen of the push button.
Hope this helps u,
Regards,
Arunsri
‎2008 Feb 27 4:50 AM
it seems that u had assign fun code to ADD button which is not getting cleared,
In PAI once the processing for ADD button is done clear ok code and sy-ucomm.
in PAI of user_cmm.
Case ok_code.
When 'ADD'.
your code for add button
clear ok_code.
clear sy-ucomm.
When others.
endcase.
Reward if useful.
‎2008 May 09 3:44 AM
Hi There,
I've faced the same problem.
Maybe you can try to add another case in your case-endcase loop. Try WHEN ' '. Because when I debugged las time the sy-ucomm value for Enter button is ' ' or blank.
‎2008 May 09 5:33 AM
Hi
It's very clear that you have to CLEAR the Sy-ucomm of the ADD function of Table control before processing or after processing the respective logic..
So that When to Press Enter , U will receive the Fcode of that..
Reward Point if Useful...
If possible post the respective code..
‎2012 Dec 15 5:29 AM
This is because Tab control V_scroll is initial.
Try This :-
if OK_CODE eq 'INSR' .
*TAB1 is My table control Name
DESCRIBE TABLE ITAB LINES TAB1-lines .
TAB1-lines = TAB1-lines + 1.
IF TAB1-V_SCROLL IS INITIAL.
insert initial line into itab index TAB1-lines.
TAB1-V_SCROLL = 'X'.
NO = TAB1-lines.
TAB1-TOP_LINE = NO.
SET CURSOR FIELD 'WTAB-J_1IWERKS' LINE TAB1-lines.
ENDIF.
‎2012 Dec 15 7:49 AM
For your information: Enter does not set sy-ucomm value it will only trigger PAI event. So previous value of sy-ucomm will be still there.