Application Development 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: 

Functional Code for Scroll bar.,

Former Member
0 Kudos

Hi all.,

Is there any standard functional code for Scroll bar ??

in my program  ( module pool ) i have a table control with CREATE EDIT DISPLAY SAVE buttons.

consider a scenario where i used CREATE button to populate table control. in this case the code corresponding to CREATE button get executed  and table get populated., no problem here.

in the next step, if i scroll down or scroll up., the code corresponding to previous SY-UCOMM ( I.E. CREATE) get triggered.

where am i getting it wrong. ??

Regards.,

Madhu

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

In the module written or auto populated for table control actions like scroll, add, the variable name ok_code is used directly. Instead of that declare a local variable l_ok_code and replace ok_code with this only inside this module. Hope this works for you.

Thanks

7 REPLIES 7

former_member289261
Active Contributor
0 Kudos

Hi,

This is the reason sy-ucomm is not recommended to be used directly in module pool programs.

Use a variable say ok_code for function code.

Add it to the screen as well as the program.

Use ok_code instead of sy-ucomm to run the code for CREATE and clear it after the code.

Regards,

Ashish

0 Kudos

HI Ashish.,

u r right., am utilizing the OK_CODE already in my prog. as u specified., but t problem still the same.

0 Kudos

Are you clearing the ok_code after processing the create code ?

0 Kudos

yes.,

0 Kudos

Hi,

Can you please share the part of code where the CREATE button functionality has been implemented. The part where you have checked the function code and did the processing accordingly.

Former Member
0 Kudos

Hi,

In the module written or auto populated for table control actions like scroll, add, the variable name ok_code is used directly. Instead of that declare a local variable l_ok_code and replace ok_code with this only inside this module. Hope this works for you.

Thanks

0 Kudos

Hi Deepak.,

U were right.,  OK_CODE is being used in auto generated code for table control. thanks for ur help.

Thanks and regards.,

Madhu.