2010 Dec 28 5:18 AM
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
2010 Dec 28 7:21 PM
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.
2010 Dec 28 7:02 PM
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).
2010 Dec 28 7:21 PM
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.
2010 Dec 29 5:23 AM
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
2010 Dec 29 10:06 AM
current_line property of table controlThat'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.
2010 Dec 29 11:11 AM
Hi in the tool bar the green tick mark is for enter button, create a pf status and assign a function code to it.