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

Help with adding a push button to call a transaction

Former Member
0 Likes
1,996

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

3 REPLIES 3
Read only

Former Member
0 Likes
1,001

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  INPUT

Edited by: Avinash Kodarapu on Jan 12, 2009 9:59 PM

Read only

Sm1tje
Active Contributor
0 Likes
1,001

Assign a function code to it and in PAI check the function code and call the transaction.

Read only

Former Member
0 Likes
1,001

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.