2007 Sep 24 11:11 AM
dear Friends,
In my table control I have displayed 3 columns with one pushbutton in the same row, like that I am having the 3 rows ( say 3 records) and If i have pressed the pushbutton for the records I am calling the separate screen but I want to know from which line the button is pressed?
Ex; i am displaying :
MATNR MATKL BUTTON
1 1 Button
2 1 Button
3 1 Button
suppose If I pressed the second row button ( we can click any button) then I am calling the another screen and I want to know the MATNR of the second row based on this I am going to display some more data in my call screen.
Pls help me on this..
Thanks in advance,
Sridhar.
dear Friends,
In my table control I have displayed 3 columns with one pushbutton in the same row, like that I am having the 3 rows ( say 3 records) and If i have pressed the pushbutton for the records I am calling the separate screen but I want to know from which line the button is pressed?
Ex; i am displaying :
MATNR MATKL BUTTON
1 1 Button
2 1 Button
3 1 Button
suppose If I pressed the second row button ( we can click any button) then I am calling the another screen and I want to know the MATNR of the second row based on this I am going to display some more data in my call screen.
Pls help me on this..
Thanks in advance,
Sridhar.
2007 Sep 24 11:15 AM
Hi,
If you have the Pushbutton for every screen, then give the different names to the Pushbuttons, then you can easily come to know which one is pressed,
but you can do it another way, just place a Checkbox in the first charecter for every record, and place a single pushbutton, then user can select a checkbox then click the Pushbutton, then you can read the line which the checkbox is X
Regards
Sudheer
2007 Sep 24 11:20 AM
Sudheer Thanks for the replay,
yes I am having the checkbox but its for deffrent purpose. here client wants the button to display the long text for the particulat material they don't want to select the ckeckbox...just they want to click on row button then they will c the long text for the record.
Thanks,
Sridhar
2007 Sep 24 11:26 AM
HI,
for yopur case you can give different ok codes to different buttons and perform the task
or you can give same ok code and read the current line and do the calculation on that basis.
TABLE_CONTROL-CURRENT LINE stores the current line of the table control from this variable you will get the line no and then perform your action on the basis of thet.
write the if else or case statement on the button.and check the value of current line
<b><REMOVED BY MODERATOR></b>
Thanks
vivekanand
Message was edited by:
Alvaro Tejada Galindo
2007 Sep 24 11:34 AM
You must be having a LOOP statement on Table control in PAI...
PROCESS AFTER INPUT.
LOOP AT internal_table .
MODULE perform_task.
ENDLOOP.Just check the FCODE in the module <i><b>perform_task</b></i> and do respective stuff..
2007 Sep 24 11:18 AM
name of the table control say...TAB_T
so u can check the line by
a = TAB_T-current_line.
read table ITAB into WA index a.
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo