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: 

Get the stack of SY-UCOMM or all the values of SY-UCOMM in a flow.

Former Member
0 Kudos

Hi All,

I just wanted to know, whether it is possible to get all the values of SY-UCOMM in a flow

or may be immediate pervious value of SY-UCOMM.

Can some one please post there view.

Thanking You All.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi All,

Marking this thread as assumed answer, with the belief that it is currenlty not possible.

But I do not have any proof, any body else if finds discrete answer, please post.

Thanking You All,

Enjoy SAP.

28 REPLIES 28

Former Member
0 Kudos

You know that the debugger provides that information?  At least the old debugger does.  I imagine it's there, but I have trouble finding it in the new one.  Also, if there is a dump, then the dump does also.

Does that help, or do you need something different?

Neal

0 Kudos

Hi Neal,

Thanks for the reply.

I can only find the program name stack in dump or debugger.

But I am concerned about the SY-UCOMM values stack and not the Program name stack.

Do you have any idea about SY-UCOMM Stack values ?

Thanking You All.

0 Kudos

Alright, I feel dumb now.  I miss understood.

I don't know that one exists.  I feel sure that you could write code that would do so however.

Sorry for the erroneous info!

Neal

0 Kudos

Hi Neal,

Its ok, no problem.

You atleast tried to help me, thanks a lot for that sir.

I do not want to write a program for that, I belive SAP must be keeping them some where.

But do not know where.

Thanking You All.

Former Member
0 Kudos

Hello Ankit

Will creating a watchpoint in your program (using the debugger) help?

Then you will catch everytime the value changes.

Stuart.

0 Kudos

Hi Stuart,

Thanks a lot for the information....!!!!!!

But I want these values i some internal table or some other variable, so that I can use them some where else in exits in the same flow....!!!!!!

Thats why I need them......!!!!!!!!

I cant use the values in a debugger........!!!!!!!

Thanking You All.

0 Kudos

Hello Ankit,

Can you just enhance the code you are interested in to save a flag to a memory ID, which your exit then checks?

Personally I would not trust the values of sy-ucomm to reflect what was actually pressed outside of PAI logic.

You may find another developer will re-use or change these values explcitly (for example if they add a new button to a screen).

Stuart.

venkateswaran_k
Active Contributor
0 Kudos

Hi Ankit

How about using the ABAP traces..  SE30 or ST12?

With the analysis results you can look for the system events or sy-ucomm.

Please let me know if it gives you the one what you are looking for.

Regards,

Venkat

0 Kudos

Hi Venkateswaran,

Thanks a lot for the information....!!!!!!

But I want these values i some internal table or some other variable, so that I can use them some where else in exits in the same flow....!!!!!!

Thats why I need them......!!!!!!!!

I cant use the values in a debugger........!!!!!!!

Thanking You All.

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

I do not know if this is posible in your case.

But Have you consider using assign?

I found this code in a BADI:

CONSTANTS: c_field_name  VALUE '(SAPLMIGO)GODYNPRO'  .
FIELD-SYMBOLS: <st_godynpro> TYPE godynpro .
ASSIGN (c_field_name) TO <st_godynpro>.

c_field_name is made up of the program name and a field or structure that is define as global.

Personaly I do not like using assign with SAP standartd program.

Regards.

0 Kudos

How about an import export pair.  Import stack of your design.  Push an additional member onto the stack.  Export that stack.

Neal

0 Kudos

Hi Neal,

If I understand what you are saying I think that it will work very nice
if you can put your code in every program in the stack.

Recently I played a little with package SHARED_OBJECTS look like a good tool for the job.

Regards.

kesavadas_thekkillath
Active Contributor
0 Kudos

Hi,

Why don't you append it in a global area after the pai is trigerred ?

0 Kudos

Hi Kesava,

Since I am dealing with standard flow of IW42, so it is not possible here.

Thanking You.

0 Kudos

What exactly are you trying to achieve..?

Nabheet

0 Kudos


Hi Nabhneet,

Thanks for the help, I just wanted to perform some operation in my Exit, if the user have pressed any partcular button.

And the relevant exit is found again after a popup, thats the reason I am searching for SY-UCOMM trace or may immediate previous value of SY-UCOMM.

Here, I have some other options, like retriving the value from memory or may be using some other exit to set the value usinh Import and then again to export.

But, I just wanted to know, does SAP provides this feature, STACK OF SY-UCOMM.

I believe, SAP must be,,,,, but do not know,, how to see these values.

Thanking You All.

0 Kudos

Yes...as Nabheet asked...What is the actual requirement ? Why do you need this function codes during runtime ?

May be we could provide some better ideas 🙂

Kesav

0 Kudos

Hi Ankit

The problem which you are facing is something gets triggered more than once and you want to perform stuff only one time. SAP does provide us the call stack but in case you are after ok_code then you will have to analyse more as the standard processing may store original ok code in some variable which you can access via assign statement.

An easy solution will be create a statics:lv_flag type c. Set it to X first time. Next time if it comes again you check if flag is X means work is alredy done and you can skip

Nabheet

0 Kudos

Hi Nabheet,

Thanks a lot for the help.

Thanking You All.

0 Kudos

So, you should put end implicit enhancements in the PAI modules where OK codes are set.  Do the export (/stack calls) there.  Do the import in in your exit to analyze what has happened.

Neal

0 Kudos

Hi Neal,

Thanks a lot.

Sure, I will try with that, but still my real question remains unanswered.

Thanking You All.

0 Kudos

It does not store its stack that is what i believe.. But were you able to accomplish your task?

0 Kudos

Yes, That is my feel for it also.  I can't see any reason for them to want that information in a general sense, so why keep it.  Ankit, You have a special need that SAP wouldn't normally.

Neal

0 Kudos

Hi Nabheet,

Yes, my problem got solved.

Thanks a lot,but my question still remains unanswered.

Thanking You All.

nabheetscn
Active Contributor
0 Kudos

Hi Ankit

Is this a custom program or standard one where you want the history what actually you are trying to achieve.

Nabheet

0 Kudos

Hi Nabheet,

It is standard flow of IW42.

Thanking You All.

Former Member
0 Kudos

Hi All,

Marking this thread as assumed answer, with the belief that it is currenlty not possible.

But I do not have any proof, any body else if finds discrete answer, please post.

Thanking You All,

Enjoy SAP.

matt
Active Contributor
0 Kudos

There is no such stack.

There is no proof that there is no such stack. There is also no proof that there is an advanced chess-playing artificial intelligence hidden in the FICO module, nor that SAP isn't recording every keystroke you make.

Features that don't exist generally aren't documented. It takes up too much room.