Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ME23N, ME22N, SY-TCODE in exit and Overview Button

Hi to all,

I have a little question for all of u.

During the program, i'd like to reconstruct the stack of all programs/methods/functions called until it.(like "Overview" debug button).This because i have this problem (probably someone of u had the same in past).

I'm in a exit of a purchase order enjoy transaction - Status "display purchase order" (ME23N).

If i press "display->modify" button (the little pen), the transaction (field sy-tcode) should changed from ME23N (display) to ME22N (modify), but in the exit if i answer the sy-tcode value ( if sy-tcode = 'ME22N' ) it's always the same (ME23N) also if I in modify mode. I must execute different code if i in modify mode (ME22N) or in display mode (ME23N). But if the value of sy-tcode is always the same, i cannot do it.

So, with the overview button in debug mode i saw that 2 different methods are called : CHANGE_TO_DISPLAY and DISPLAY_TO_CHANGE. If i know during the exit which method was called before reach the exit, i could set the right tcode value. Is it right ?

So, someone of u know how to :

1. Create with instructions (probably methods) the stack of the overview programs/methods/functions called until the program run

2. Solve the problem in different manner

Thx a lot in advice


Not what you were looking for? View more on this topic or Ask a question