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

Form different Tcode to one program

Former Member
0 Likes
509

Hi Gurus ,

One program : ZDemo and

Diffrent T-code are there like Z001, Z002, ... Z00n.

When ever I run Tcode :Z001 one pice of code should be execute in Prog:Zdemo (One function Module or anything).

When ever I run Tcode :Z002 one pice of code should be execute in Prog:Zdemo (One subroutine or anything).

...

...

how to write a code for that .

Regards:

B.Madhu sudhan reddy

INDIA.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
478

Hello,

You may write a dialog program with different screens and attach program/screen combination to each TCODE.

Thanks,

Venu

3 REPLIES 3
Read only

Former Member
0 Likes
478

Hello,

Try with the system varable sy-tcode to check the currently executed tcode for a program and form the conditions.

Vikranth

Read only

Former Member
0 Likes
478

Hello

Logic:


.....
case SY-TCODE.
  when 'Z001'. " do one piece of code
  when 'Z002'. " do other piece of code
...  
  when others. " do ......
endcase.

Read only

Former Member
0 Likes
479

Hello,

You may write a dialog program with different screens and attach program/screen combination to each TCODE.

Thanks,

Venu