2007 Mar 20 10:55 AM
hi,
I have a table control in which Plant Material No and Its Description is Displayed.
I have provided a Find option for finding Mat.No.
When in serching process the material is found i am seting it on the Top line of the Table control by
[Table Control Name]-top_line = line_index(index of found material)
But now problem is :
I can't scroll the table Control to any other line.
What do i do?
Can anybody help me?
thaks in advance........
2007 Mar 21 8:03 AM
Hi,
In PBO module, write the following code,
Here it_final is the internal tbale that is displayed in table control&
tc_entry is the table control name.
DESCRIBE TABLE IT_FINAL LINES W_FILL.
TC_ENTRY-LINES = W_FILL.
2007 Mar 21 11:49 AM
2007 Mar 21 12:17 PM
Dhwani,
Goto t-code SE51. enter the program name and the screen number in question.
Select the radio button labeled "Flow Logic" and press the Change Button.
You will be taken into the flow logic for the selected screen.
In this code window, you will see some code similar to this:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
loop at Tc1 with control TableControl1 cursor TableControl1-top_line.
endloop.
*
PROCESS AFTER INPUT.
loop at Tc1.
module MoveChosen.
endloop.
MODULE USER_COMMAND_0100.
Find (or create) a module like MODULE STATUS_0100. Double-click that MODULE name and add like code this (just change the names to match your objects):
describe table Tc1 lines TableControl1-lines.
2007 Mar 22 4:16 AM
2007 Mar 22 12:17 PM
Then you have problem with misnamed objects or something of the sort.
Please provide your flow logic and underlying MODULES referenced there... and the name of the Table Control itself (as named in the Screen Painter).
2007 Mar 23 4:19 AM
PROCESS BEFORE OUTPUT.
MODULE status_1000.
MODULE itab_fetch.
MODULE itab_change.
LOOP AT itab WITH CONTROL tab1 CURSOR tab1-current_line.
ENDLOOP.
MODULE itab1_change.
LOOP AT itab1 WITH CONTROL tab2 CURSOR tab2-current_line.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT itab.
MODULE itab_control_modify.
ENDLOOP.
LOOP AT itab1.
ENDLOOP.
MODULE user_command_1000.
this is my screen flow logic.
In itab_fetch, i am fetching data in internal table.
In itab_change, i have written the code u have provided.
But i have provided logic for find in itab_fetch , in which i am setting my table control-top line to the line of table control at which my finded term matched.
Means
tab1-top_line = line1.
where line1 is the index of internal table where my search string matches.
and because of that line i cant move my cursor.
but i have written this because i want to move my cursor to search line.
Thanks