Application Development 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: 

Call T Code in Module Pool

Former Member
0 Kudos

dear scn,

how can i call standard T code in screen painter (module pool programing) in ecc 6.0. please take any standard t code like mm01. and please give a sample code.

i am trying this code. please share if any other configuration.

PROGRAM ZMOD.

DATA : OK_CODE TYPE SY-UCOMM.

*&---------------------------------------------------------------------*

*&      Module  USER_COMMAND_1000  INPUT

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

MODULE USER_COMMAND_1000 INPUT.

   CASE sy-ucomm.

     WHEN 'se11'.

       CALL TRANSACTION 'se11'.

     WHEN 'se38'.

   call TRANSACTION 'se38'.

   ENDCASE.

ENDMODULE.                 " USER_COMMAND_1000  INPUT

regards

rahul sinha

1 ACCEPTED SOLUTION

aarif_baig
Active Participant
0 Kudos

Hi Rahul,

               design a simple screen with say a button name se11 and the code should look like this

make sure your sy-ucomm value is the fctcode which you have defined in screen painter if you miss to define that your code will not work, let say you have a button on screen and you want to call transaction based on that, just double click on that button in the screen painter a pop up will come on right side there you will find a highlighted section for fctcode put some value there like SE11 and use the same value in your code.

MODULE USER_COMMAND_0100 INPUT.

   CASE sy-ucomm.

WHEN 'SE11'.

       call TRANSACTION 'SE11'.

   ENDCASE.

ENDMODULE.                 " USER_COMMAND_0100  INPUT

Regards,

2 REPLIES 2

aarif_baig
Active Participant
0 Kudos

Hi Rahul,

               design a simple screen with say a button name se11 and the code should look like this

make sure your sy-ucomm value is the fctcode which you have defined in screen painter if you miss to define that your code will not work, let say you have a button on screen and you want to call transaction based on that, just double click on that button in the screen painter a pop up will come on right side there you will find a highlighted section for fctcode put some value there like SE11 and use the same value in your code.

MODULE USER_COMMAND_0100 INPUT.

   CASE sy-ucomm.

WHEN 'SE11'.

       call TRANSACTION 'SE11'.

   ENDCASE.

ENDMODULE.                 " USER_COMMAND_0100  INPUT

Regards,

s_nnoorie
Active Participant
0 Kudos

Dear Rahul, your code is correct. Instead of When 'Se11' make it as 'when 'SE11'. when you assign function code to any button it take in upper case.