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

2 table controls

Former Member
0 Likes
703

hi ,

i have put two table controls on a screen. and i am trying to populate (items) one table control based on selection of a row from one(header). i have put the push button in header table but i am not able to trigger the event correctly.

Please suggest me on how to proceed on this.

Any sample code would be appreciated.

thanks,

Das.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
673

Hi Das,

use get cursor to hold the value what ever u selected in the first table control and in the next PAI event retrieve the data from the database with the use of that get cursor value

Regards,

GNK

5 REPLIES 5
Read only

Former Member
0 Likes
674

Hi Das,

use get cursor to hold the value what ever u selected in the first table control and in the next PAI event retrieve the data from the database with the use of that get cursor value

Regards,

GNK

Read only

0 Likes
673

Hi Naveen,

Thank you.

Could you please paste some sample code.

Thanks,

Das.

Read only

0 Likes
673

IN THE PAI LOOP OF YOUR SUPERIOR TABLE CONTROL INCLUDE THIS:

MODULE GET_CURSOR.

..........

after the loop but still in pai have another module to process the button:

module user_command.

The module code is something like:

&----


*& Module GET_CURSOR INPUT

&----


module GET_CURSOR input.

  • ON THE FIRST ITERATION OF THE LOOP....

IF SY-STEPL = 1.

  • GET THE ABSOLUTE TC LINE SELECTED...

GET CURSOR LINE W_CURRENT_LINE.

  • ADJUST IT TO GET THE TABLE ENTRY index

W_CURRENT_LINE = W_CURRENT_LINE + TCEKKO-top_line - 1.

ENDIF.

endmodule. " GET_CURSOR INPUT

module user_command input.

  • if the button has been hit

IF sy-ucomm = 'PICK'.

  • position on the high level table

READ TABLE TEKKO INDEX WLINE.

  • read all subordinate entries into table used by second TC

SELECT * FROM EKPO INTO TABLE TEKPO UP TO 10 ROWS

WHERE EBELN = TEKKO-EBELN.

ENDIF.

endmodule.

Read only

0 Likes
673

Thank you.

I'll try and let know.

Das.

Read only

Former Member
0 Likes
673

Thank you all for your help