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

Module Pool Table Control Scroll Bar Event ?

Former Member
0 Likes
2,818

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

5 REPLIES 5
Read only

Sandra_Rossi
Active Contributor
0 Likes
2,078

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.

Read only

former_member182371
Active Contributor
0 Likes
2,078

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

Read only

0 Likes
2,078

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

Read only

0 Likes
2,078

Hi,

in order to get the okcode within a subscreen of a main screen have a look at his thread:

okcode and subscreen

and then once ok is correct then activate that routine for scrolling.

Best regards,

Pablo

Read only

0 Likes
2,078

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