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

Automatic page down in table control

Former Member
0 Likes
794

Hi,

We have a customised module pool program with a table control

where the data input is done using a barcode scanner. The table control have

twelve rows.The requirement is after the last line is entered the table control

it should have an automatic page down.

(No Sy-ucomm is captured after last line is entered)

Is it possible to trigger a automatic page down in the PBO.How this can be achieved?

Regards,

Charumathi

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
694

You always hit a enter after each line is entered. So that the event can be captured. So when the sy-ucomm is captured in PAI you can check if the line is 12 then code a page down.

The enter key must be recorded while creating the barcode( must be placed as the last action in the barcode design). I have done it this way

I hope Maen meant the current_line property of table control. Still without the control entering the PAI nothing can be done. To get the control in PAI the user command has to be triggered.

Example:

v_jump = 11.

in PAI

when 'ENTE'.

GET CURSOR LINE lv_line.

lv_line = lv_line - tbcl-top_line.

if lv_line = v_jump.

tbcl-top_line = lv_line + 1.

endif.

5 REPLIES 5
Read only

Former Member
0 Likes
694

You'll need to manipulate the parameter that points to the itab record that should show up as the first line.

Sorry i don't have SAP here at the moment... so i can´t tell you the name of that parameter (i believe it's part of the table control).

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
695

You always hit a enter after each line is entered. So that the event can be captured. So when the sy-ucomm is captured in PAI you can check if the line is 12 then code a page down.

The enter key must be recorded while creating the barcode( must be placed as the last action in the barcode design). I have done it this way

I hope Maen meant the current_line property of table control. Still without the control entering the PAI nothing can be done. To get the control in PAI the user command has to be triggered.

Example:

v_jump = 11.

in PAI

when 'ENTE'.

GET CURSOR LINE lv_line.

lv_line = lv_line - tbcl-top_line.

if lv_line = v_jump.

tbcl-top_line = lv_line + 1.

endif.

Read only

0 Likes
694

Hi Keshav,

The sy-ucomm is ' ' when the user enters the data using the barcode scanner,

Do i have to write any code to change the Ok_code?

or will it work if i write in the PAI like this( if the ok_code is null),Please let me know

case ok_code.

when ' '.

<code to set the top line>

endcase .

In PBO

Set cursor

Regards,

Charumathi

Read only

0 Likes
694
current_line property of table control

That's the one. Thanks

Barcode readers can be programmed to send an ENTER when scanning, thus you will always go to the PAI of the screen.

Read only

0 Likes
694

Hi in the tool bar the green tick mark is for enter button, create a pf status and assign a function code to it.