‎2016 Jul 28 9:45 AM
Hi Experts, I have a Table control defined in a module pool program, table control was generated using the Wizard and has standard code for ADD row, DELETE row, SELECT ALL , PAGE UP, PAGE DOWN along with scrollbars active. Now when I click on ADD button row gets added, however if now I try scrolling, after successful scroll movement ADD button event gets invoked automatically causing new line to get added ? ADD BUTTON event handler is clearing of the SY-COMM to be blank after button click , so not sure how scroll bar movement is resulting in ADD event? Is this known issue? Thanks Regards Prashant
‎2016 Jul 28 10:07 AM
I'm surprised that the wizard relies on SY-UCOMM, because it's not recommended by SAP. Instead, you should use a custom global variable (i.e. DATA G_OKCODE TYPE syucomm) which is to be assigned in the dynpro to the "OK Code" element.
‎2016 Jul 28 11:01 AM
Hi,
have a look at this thread:
Table control Dialog program | SCN
and pay attention to routine
PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
L_OK.
Best regards,
Pablo
‎2016 Jul 28 11:50 AM
Thanks Pablo, the routine COMPUTE_SCROLLING is not called at all 😞 when I click ADD button , program raises btn event 'Z9TBC_02_115_INSR' this add's 1 row and clears SY-COMM . when next on screen it try pulling scroll bars down PAI somehow still fill SY-UCOMM with 'Z9TBC_02_115_INSR'. Also note my screen is SUBSCREEN in one of the SCREEN EXITS.. Regards Prashant
‎2016 Jul 28 12:01 PM
Hi,
in order to get the okcode within a subscreen of a main screen have a look at his thread:
and then once ok is correct then activate that routine for scrolling.
Best regards,
Pablo
‎2016 Jul 28 2:58 PM
Hi Pablo, Thanks for answers & Suggestion, problem is not completely solved even after setting (SAPLIQS0)SY-UCOMM to blank. Some how I was playing around with table control properties unchecked VERTICAL RESIZE check box and activated the CMOD project. something did the trick, now I don't get the operation repeating!! fingers crossed Prashant