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

verticall scroll bar problem in table control

Former Member
0 Likes
2,439

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

11 REPLIES 11
Read only

Former Member
0 Likes
1,595

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

Read only

0 Likes
1,595

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

Read only

0 Likes
1,595

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

Read only

0 Likes
1,595

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.

Read only

0 Likes
1,595

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

Read only

Former Member
0 Likes
1,595

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

Read only

0 Likes
1,595

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

Read only

0 Likes
1,595

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

Read only

0 Likes
1,595

Lemme come back )).

BR

Dep

Read only

0 Likes
1,595

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.

Read only

0 Likes
1,595

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.