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

Table control position problem.

Former Member
0 Likes
881

Dear Friends,

I have created a table control to display material group and material number,

Exp: there are total 200 records and visible length in table control is 10 records,

and i have push button called "POSITION" in bottom of table control,

if I press the Position button need to display a subscreen with MATKL and MATNR selection fields and ones I entered the material number or material group then pressed the enter button ..I need to take the position in my table cotrol to the exact position of entered value in subscreen.

How to solve the problem?? pls give me some logic on this.

Thanks,

Sridhar.

6 REPLIES 6
Read only

Former Member
0 Likes
784

Read internal table associated to the table control with the values entered on the subscreen and capture the sy-tabix value set the topline value of the table control with sy-tabix.

Read only

Former Member
0 Likes
784

Hi ,

Check for the logic for transaction VOV8 .

Logic is create screen as modal dialog box with two fields material group or material number as input .

Then on input read the index and set the table control current line as that index .

Please reward if useful.

Read only

Former Member
0 Likes
784

hi

Looping in a Step Loop

CURSOR <scroll-var>

The CURSOR parameter tells which internal table row should be the first in the screen

display. <Scroll-var> is a local program variable that can be set either by your program or

automatically by the system. The value of <scroll-var> is absolute with respect to the

internal table (that is, not relative to the FROM or TO values).

The CURSOR <scroll-var> parameter is required in the PBO event to tell the system where to

start displaying.

If u still have any doubts revert back to me, i will post the full code

Regards,

Prasant

*reward if useful

Read only

0 Likes
784

Hi Prashanth,

Thanks for the inputs...

I am training here..and if possible pls send me the code .

Thanks,

Sridhar

Read only

Former Member
0 Likes
784

hi,

I think it should work

just try it.

LOOP AT itab.

IF itab-matnr = strin OR itab-matkl = strin.

line1 = sy-tabix.

EXIT.

ENDIF.

ENDLOOP.

IF line1 <> 0.

SET CURSOR LINE line1.

tab1-top_line = line1.

ENDIF.

here <b>itab</b> is my internal table.

<b>tab1</b> is table control.

<b>strin</b> is my input string which i want to find.

u can write this code the PBO module in which u fetching data.

just put one codition that u have enter search term or not.

Hope it will helpful.

Read only

Former Member
0 Likes
784

Thanks,...

Its solved my problem...