‎2011 Aug 12 4:32 AM
Hi,
I have a dynpro with a main screen "100", and i call a dynpro "200" as "modal dialgo box", on it i have a table control that displays the data ok. The subscreen has 2 buttons "Ok" and "Cancel" that i catch the click with the OK_CODE correctly.
The table control displays the horizontal and vertical scrollbar, when i click on the horizontal scroll bar to move to the rigth or to the left, it doesn´t launch any OK_CODE, but when i click on the vertical scroll bar up or down, it launches an empty OK_CODE and closes the subscreen.
Why is this behavior so different with the scrollbars and how can i solve it..?
Thanks on advance.
Edited by: David Funez on Aug 11, 2011 9:50 PM
‎2011 Aug 12 6:18 AM
Hi David,
Just implement below check list:
1. table_control-lines are not empty.
2. And in Screen painter table control belwo atrributes are checked(ticked):
a. Configbl
b. Resizing ( both Vertical & Horizontal )
c. Separators ( both Vertical & Horizontal )
BR
Dep
‎2011 Aug 12 3:42 PM
Dep;
Your observations are all checked and still persist the same problem.
1. table_control-lines are not empty.
it has data (for this example displays 3 records)
2. And in Screen painter table control belwo atrributes are checked(ticked):
a. Configbl
Checked
b. Resizing ( both Vertical & Horizontal )
Checked
c. Separators ( both Vertical & Horizontal )
Checked
‎2011 Aug 12 4:48 PM
Hi David,
Try below:
Give as many entries that it exceeds the visible length(height) of the table control then you will come know whether vertical scroll is really working or not.
Or
Select 10 records into table control and reduce the table control visible length(height) to see only 4 records to know whether vertical scroll is really working or not.
BR
Dep
Edited by: DeepakNandikanti on Aug 12, 2011 5:49 PM
‎2011 Aug 12 5:11 PM
Dep;
the same behavior, i've filled the table control with larger data that TC height, but whe i click the vertical scroll bar it triggers an empty OK_CODE and closes the dynpro.
‎2011 Aug 12 8:59 PM
Hi David,
Everything you have described is absolutely normal for a table control.
Usually Enter doesn't leave the screen, and the scroll will be automatically performed.
If you want the Enter to exit the screen, then you should save the TABCTRL-TOP_LINE (this is what directs the default scroll behavior) in the PBO, and compare it with its new value at the PAI. If it's unchanged (*), then it means there's no scroll, so it's a normal Enter.
(*) Be careful, by default, the first time, TABCTRL-TOP_LINE is zero in the PBO, and if you press enter, it will probably be changed to 1, so with the test above you might incorrectly conclude to a scroll, so you'll have to handle this special case.
Sandra
‎2011 Aug 13 10:10 AM
Hi David,
Also check below:
The attributes of Table control:
1. FctCode
2. FctType
Should be EMPTY.
I guess because of above, when ever you are clicking on vertical scroll, function code is called and exits screen.
also check below:
OK_CODE is given in Element list of screen being used with TYPE OK.
capturing of sy-ucomm into OK_CODE;
CLEAR fc_code.
fc_code = ok_code.
CLEAR ok_code.
BR
Dep
‎2011 Aug 13 12:06 PM
Hi Dep,
I've never seen that these 2 attributes could be entered for a table control. How did you manage to obtain that?
Sandra
‎2011 Aug 13 4:26 PM
Hi,
Why dont u debug and find out which line is causing your screen to exit? On vertical scroll click, are you calling leave to screen statement?
Nitesh
‎2011 Aug 13 4:29 PM
‎2011 Aug 15 5:15 PM
Well, i solved the problem of the vertical scroll bar in ATTRIBUTES -> NEXT DYNPRO = 300, this is the number of the current dynpro with the table control.
‎2014 Mar 06 2:54 PM
Hi David,
Even I am facing the same issue where on vertical scroll the subscreen closes.Could you please elaborate on what changes you made to resolve this.