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

Functional Code for Scroll bar.,

Former Member
0 Likes
1,742

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
Read only

Former Member
0 Likes
1,218

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
Read only

Former Member
0 Likes
1,218

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

Read only

0 Likes
1,218

HI Ashish.,

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

Read only

0 Likes
1,218

Are you clearing the ok_code after processing the create code ?

Read only

0 Likes
1,218

yes.,

Read only

0 Likes
1,218

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.

Read only

Former Member
0 Likes
1,219

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

Read only

0 Likes
1,218

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.