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

Transaction Code Error

Former Member
0 Likes
1,815

Hello,

I copied the standard SAP program SAPMM06E to a z program and activated it. Now I also created a transaction code and saved it. When I run that transaction it gives out a error message like 'Transaction Code Not Defined'. How can I resolve this?

Thanks

Vicky

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,080

transacicon Z its not defined in purchases you do not have to do is annex it in the table t160 .

I do not have the detail of this but it must be by configuration. also you can copy the portion of code that verifies this and in where it says .

SELECT SINGLE * FROM t160 WHERE tcode EQ sy-tcode.

replace it by

SELECT SINGLE * FROM t160 WHERE tcode EQ Ztcode.

3 REPLIES 3
Read only

Former Member
0 Likes
1,081

transacicon Z its not defined in purchases you do not have to do is annex it in the table t160 .

I do not have the detail of this but it must be by configuration. also you can copy the portion of code that verifies this and in where it says .

SELECT SINGLE * FROM t160 WHERE tcode EQ sy-tcode.

replace it by

SELECT SINGLE * FROM t160 WHERE tcode EQ Ztcode.

Read only

0 Likes
1,080

Where do i need this portion of the code? and where do i need to addthe zcode to table t168?

Regards

Vicky

Read only

0 Likes
1,080

it watches. your make a copy of program SAPMM06E which is called by several transactions like a

me21

me22

me23 ......

these transactions initiate in different screens (dynpro) from this program SAPMM06E

for example

me21 call the program SAPMM06E and initiate in screens (dynpro) 0100

this screen (dynpro) have some modules but it have the module

MODULE INIT_TRANSAKTION. "Anfangsdaten initialisieren

this modulate initializes and it verifies

that the transaction that this executing is the correct one (SELECT SINGLE * FROM t160 WHERE tcode EQ sy-tcode.

)

you can make two things

include by means of the configuration your new transaction (this not since one becomes )

or to change the validation that is made there

SELECT SINGLE * FROM t160 WHERE tcode EQ sy-tcode.

replace it by

SELECT SINGLE * FROM t160 WHERE tcode EQ Ztcode.

where Ztcode = “ME21”

with this the verification will bi make with me21 and not with zme21 where zme21 not this in the verification table t160

it excuses my terrible English I am of Mexico