2012 Dec 13 7:07 AM
HI EXPERTS…
AM NEW TO SAP, AND HAVE A PROBLEM IN PROGRAM,HAVE SEARCHED FOR THIS BUT COULDN’T GET SOLUTION.
AM HAVING A PUSH BUTTON IN TABLE CONTROL,NOW WHENEVER I CLICK THE PUSH BUTTON,
AM CALLING A TRANSACTION CARRYING PARAMETER ID ,THE FIELD VALUE FOR PARAMETER ID SELECTED FROM THE TABLE CONTROL.
NUMBER | PUSHBUTTON |
1000 | PUSH |
1001 | PUSH |
WHEN I PRESS THE 1ST PUSH BUTTON IT SHOULD GET PARAMETER ID VALUE AS 1000,
WHEN I PRESS THE 2ND PUSH BUTTON IT SHOULD GET PARAMETER ID VALUE AS 1001.
WHEN ‘PUSH’.
SET PARAMETER ID 'ZREQ' FIELD NUMBER. (ZREQ IS PARAMTER ID)
CALL TRANSACTION 'MY TRANSACTION'.
THANKING YOU.
Moderator message: please do not post in all capitals.
Message was edited by: Thomas Zloch
2012 Dec 13 9:11 AM
try getting row number using get cursor and read the table with index row number.
2012 Dec 13 9:11 AM
try getting row number using get cursor and read the table with index row number.
2012 Dec 13 9:48 AM
Thankyou for your reply Aswatha,
Could u please tel me a little more about your reply??
and,in my table control am having w / selcolumn.is there something i can do with it??
thankyou..
2012 Dec 13 10:34 AM
In pbo set the cursor for the field button using SET CURSOR FIELD fieldname.
In pai once you clicked on that button use GET CURSOR FIELD fieldname LINE line.
now read the table with index line.
2012 Dec 13 10:52 AM
2012 Dec 13 12:26 PM
I Checked it out..i checked out the value for line in debugger,
its always '0'.
2012 Dec 13 12:49 PM
How did you define the push button, it should work fine with default settings (check via SE51 that function type is initial)
* In Dynpro PAI
PROCESS AFTER INPUT.
LOOP AT ITAB.
CHAIN.
FIELD XXX... " etc.
ENDCHAIN.
ENDLOOP.
* etc.
ENDCHAIN.
MODULE user_command.
* In main program
MODULE user_command_0100 INPUT.
CASE OK_CODE.
WHEN 'PUSH'.
GET CURSOR LINE line.
* etc.
ENDMODULE.
Regards,
Raymond
2012 Dec 13 1:01 PM
Hey sorry for the late reply and As Raymond already mentioned use GET CURSOR LINE line.
Use this line as index to read the internal table.
2012 Dec 13 4:26 PM
Thanks a lot for your reply Guru's....
i have declared line as type i.
is it ok???
2012 Dec 13 5:53 PM
ya not a problem... in fact it should be type i only as it is a number. cheers...
2012 Dec 13 6:46 PM
No problem, in a get cursor statement field name must be a character type and line an integer (just press F1 on GET statement)
Regards,
Raymond
2012 Dec 14 10:54 AM
thanks a lot for your reply..but,still am getting '0' in line,
could you please help me??
2012 Dec 14 11:22 AM
should i put the GET statement inside loop???
am using internal table for populating data in table control.
2012 Dec 14 11:31 AM
Thanks a lot!!!!
it finally worked...i got values for line...
now trying to read table with index.replying would be really helpful.
thanks a lot..
2012 Dec 14 11:38 AM
Hi Askar,
good to hear u got the result ......please close the thread.
thanks.