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

Function module TABLE_GET_KEY_TO_SET_CUR_ROW

Former Member
0 Likes
713

plz tell me hoe to use this FM as i want to enter my key field of table control through it and want to have cursor position in table control for that field value.

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Feb 11, 2008 11:00 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
487

hi,

The fun module TABLE_GET_KEY_TO_SET_CUR_ROW is called for the Function position to find the correct Row .

Means suppose in you table control you have lot of records .To find particular and select that this Fm is useful..

EX:

1) add a button say search box .

2) when user clicks on this button show

dialog box with enter key field No:

3) when user enter box no search table control

intternal table and if found

set tc1-current_line = sy-tabix of record found.

DATA : ata: h_table_key(20) type c.

'V_TQ85 is internal table.

call function 'TABLE_GET_KEY_TO_SET_CUR_ROW'

EXPORTING

table = 'V_TQ85'

IMPORTING

table_key = h_table_key

EXCEPTIONS

cancelled_by_user = 1

table_not_found = 2

others = 3.

call function 'TABLE_GET_KEY_TO_SET_CUR_ROW'

exporting

table = 'ITAB'

importing

table_key = key_value

exceptions

cancelled_by_user = 1

table_not_found = 2.

<REMOVED BY MODERATOR>

GAURAV J.

Edited by: Alvaro Tejada Galindo on Aug 15, 2008 3:36 PM

2 REPLIES 2
Read only

Former Member
0 Likes
488

hi,

The fun module TABLE_GET_KEY_TO_SET_CUR_ROW is called for the Function position to find the correct Row .

Means suppose in you table control you have lot of records .To find particular and select that this Fm is useful..

EX:

1) add a button say search box .

2) when user clicks on this button show

dialog box with enter key field No:

3) when user enter box no search table control

intternal table and if found

set tc1-current_line = sy-tabix of record found.

DATA : ata: h_table_key(20) type c.

'V_TQ85 is internal table.

call function 'TABLE_GET_KEY_TO_SET_CUR_ROW'

EXPORTING

table = 'V_TQ85'

IMPORTING

table_key = h_table_key

EXCEPTIONS

cancelled_by_user = 1

table_not_found = 2

others = 3.

call function 'TABLE_GET_KEY_TO_SET_CUR_ROW'

exporting

table = 'ITAB'

importing

table_key = key_value

exceptions

cancelled_by_user = 1

table_not_found = 2.

<REMOVED BY MODERATOR>

GAURAV J.

Edited by: Alvaro Tejada Galindo on Aug 15, 2008 3:36 PM

Read only

0 Likes
487

Dash! I was hopeing to say something like "You are all going to be investigated!!!!"...

Lets see what the next one is...