‎2006 Dec 20 10:09 PM
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.
‎2006 Dec 20 10:21 PM
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
‎2006 Dec 20 10:21 PM
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
‎2006 Dec 20 10:37 PM
Hi Naveen,
Thank you.
Could you please paste some sample code.
Thanks,
Das.
‎2006 Dec 21 5:13 AM
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.
‎2006 Dec 21 8:15 PM
‎2007 Jan 05 12:54 AM