2009 Jan 12 4:25 PM
Hi Gurus,
I am trying to add a push button to a customised infotype I have created. I would like the push button to call a transaction when a user clicks it. I know how to draw the button etc in transaction SE51 but how do I assign a transaction to it and call it when the user clicks on it.
Any Ideas?
Alec
Hi Gurus,
I am trying to add a push button to a customised infotype I have created. I would like the push button to call a transaction when a user clicks it. I know how to draw the button etc in transaction SE51 but how do I assign a transaction to it and call it when the user clicks on it.
Any Ideas?
Alec
2009 Jan 12 4:28 PM
HI,
You need to write the code in PAI event of the screen for the Function code assigned to the Push button.
PROCESS AFTER INPUT.
* Module for processing User command
MODULE user_command_0110.
MODULE user_command_0110 INPUT.
If SY-UCOMM EQ <Pustbutton-Fcode>.
CALL TRANSACTION <TCODE>.
ENDIF.
ENDMODULE. " USER_COMMAND_0110 INPUTEdited by: Avinash Kodarapu on Jan 12, 2009 9:59 PM
2009 Jan 12 4:29 PM
Assign a function code to it and in PAI check the function code and call the transaction.
2009 Jan 12 4:32 PM
Hi Alec,
When you design the button there is a field to assign a Function Code to it... Giv any 4letter name..
This function code is what you capture in sy-ucomm when user hits the button..
In PAI of your program there should be already a CASE/ENDCASE block on sy-ucomm.. where you can check for WHEN 'ABCD' (ur function code.)
CALL TRANSACTION or whatever processing u want.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |