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: 

Problem in Table Control of Screen

Former Member
0 Kudos
166

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........

6 REPLIES 6

Former Member
0 Kudos
145

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.

0 Kudos
145

Thanks But in which module i have to write

0 Kudos
145

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.

0 Kudos
145

Hi

Thanks

But not working

0 Kudos
145

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).

0 Kudos
145

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