2014 Nov 12 11:10 AM
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
2014 Nov 12 4:20 PM
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
2014 Nov 12 11:14 AM
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
2014 Nov 12 11:26 AM
HI Ashish.,
u r right., am utilizing the OK_CODE already in my prog. as u specified., but t problem still the same.
2014 Nov 12 11:36 AM
Are you clearing the ok_code after processing the create code ?
2014 Nov 12 11:54 AM
2014 Nov 12 12:27 PM
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.
2014 Nov 12 4:20 PM
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
2014 Nov 13 6:41 AM
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.