‎2008 Jul 15 4:27 PM
Hi All
I have a problem with a table control and setting cursors and the top line.
I have a table with 10 lines and only 4 are visible at a time.
I scan a material and i set the cursor to the field where the user can enter a quantity.
My problem arises when the material I scan is not in the first four visible items of the table control.
If the material is item 8, I do a scan, i set the top line of the table control to the material index in the pai and then in the pbo
i set the cursor field to line 8.
The top line is set correctly but the cursor field is not set.
I use set cursor <fieldname> line <line No>
Any help would be great
Thanks
‎2008 Jul 15 4:35 PM
Your eight record is now on the first line, so you need to set LINE 1 in the Set Cursor
set cursor <fieldname> line 1.
Regards,
Naimesh Patel
‎2008 Jul 15 4:35 PM
Your eight record is now on the first line, so you need to set LINE 1 in the Set Cursor
set cursor <fieldname> line 1.
Regards,
Naimesh Patel
‎2008 Jul 15 4:57 PM
Hi Nimesh
Thanks for replying
It didn't work for me, the cursor remains in the barcode for the material number.
In the PAI I set the top line to the item index.
In the Pbo is set the cursor field to line 1.
MODULE status_0200.
MODULE tab_output_change_tc_attr.
LOOP AT tbl_items
WITH CONTROL tab_output
CURSOR tab_output-current_line.
module save_index.
MODULE tab_output_get_lines.
module set_line_enabled_status.
ENDLOOP.
MODULE init_0200.
MODULE set_cursor_field. " this is where i set my cursor
**************************************************
MODULE set_cursor_field
IF p_line > 0.
IF p_line > 4.
SET CURSOR FIELD cursorfield LINE 1.
ELSE.
SET CURSOR FIELD cursorfield LINE p_line.
ENDIF.
ELSE.
SET CURSOR FIELD 'P_MATNR'.
ENDIF.
IF p_line > 0.
IF p_line > 4.
SET CURSOR FIELD cursorfield LINE 1.
ELSE.
SET CURSOR FIELD cursorfield LINE p_line.
ENDIF.
ELSE.
SET CURSOR FIELD 'P_MATNR'.
ENDIF.
‎2008 Jul 16 10:21 AM
‎2008 Jul 16 11:46 AM
I believe your coding is not working.
you need to set the record you have selected (scan) always
on the top of the table control than you can set the cursor
fix on line 1
but please do it like this in PBO.
Data: ZEILE(6) TYPE N.
ZEILE = 1.
SET CURSOR FIELD 'ITAB-FELD3' LINE ZEILE.Hope this is working.
‎2008 Jul 16 2:22 PM