Skip to Content
author's profile photo Former Member
Former Member

Access variables of caller (program)

Hi there,

following situation:

A program calls a standard function module. This function module calls many subsequent function modules.

One of those subsequent function modules is a self created user-exit.

In there I want to access variables (the input parameters) from the caller. What's the best possibility to achieve that?

Z_INPUT

-> FM1

-> FM2

-> Z_FM3

Access variables from Z_INPUT

Should i save the required information in a shared object?

Or would it be better to directly access the variables on the stack: (Z_INPUT)variable?

Any other solutions?

Thanks in advance!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Aug 30, 2013 at 10:55 AM

    Hello Andreas,

    I would not use the ABAP stack to access the variable -

    • Directly accessing the ABAP stack via ASSIGN (prog_name)variable is not released for customers. I tend to use it only in cases where there's no other way to access a global variables (of standard programs).
    • If the variable in question is a local variable, then you cannot access it via ABAP stack.

    So i would save the variable in the (relevant)memory & access it later in the exit FM 😊

    BR,

    Suhas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.