‎2011 Jan 13 1:57 AM
As you know, we can use statement like var1 = '(program)objectname', and assign (var1) to <fs>,
I tried, and succeed in function module, but when I use it in prog2, and in prog1, I submit prog2, it does not work.
can this usage only be available in function module?
‎2011 Jan 13 2:20 AM
Howdy,
By performing the SUBMIT you are creating a new logical unit of work (LUW) and hence the dynamic assignment will fail.
To achieve the same result you can utilise techniques like function module global memory, export/import to memory ids or shared memory access (SHMA).
Cheers
Alex
‎2011 Jan 13 2:20 AM
Howdy,
By performing the SUBMIT you are creating a new logical unit of work (LUW) and hence the dynamic assignment will fail.
To achieve the same result you can utilise techniques like function module global memory, export/import to memory ids or shared memory access (SHMA).
Cheers
Alex
‎2011 Jan 13 5:35 AM
Hi, thanks for your answer.
As the document said, this usage can be access in a same internal session,
and as I know, when use submit/call transaction, both are in a internal session.
so what's 's difference between logical unit of work and internal session?
‎2011 Jan 13 6:00 AM
Hello,
When you SUBMIT a program(PROG2), it will be executed in a separate internal session.
You can access the global variables of the program loaded in the same internal session via the ASSIGN statement. Hence in case of SUBMIT the ASSIGN will fail.
You can make use of the ABAP memory to EXPORT / IMPORT the values between the calling & the called programs.
BR,
Suhas
‎2011 Jan 13 11:22 AM
Hi Saha,
When you SUBMIT a program(PROG2), it will be executed in a separate internal session.
You means the ABAP Runtime Framework will teminate current session(PROG1), and start a new separate internal session?
How about SUBMIT AND RETURN?
It also teminate the session of PROG2 and back to PROG1?
As I understand, a opened internal session(a window) is always in the same internal session,
so it caused me this question.
‎2011 Jan 13 11:32 AM
Hello Yan,
1. If you don't use the RETURN addition the internal session of the calling program(PROG1) is (kind of)overwritten by that of the called program(PROG2).
2. If you use SUBMIT ... AND RETURN, the internal session of the calling program(PROG1) is retained.
In both these cases the called program(PROG2) is executed in a new internal session.
BR,
Suhas
PS: I'll strongly recommend you to read the F1 documentation on SUBMIT. It is very well documented there.
‎2011 Jan 13 11:08 PM
As I understand, a opened internal session(a window) is always in the same internal session,
so it caused me this question.
Hence the problem - an internal session is not the same as a user session (eg a window).
Cheers
Alex
‎2011 Jan 14 7:11 AM
The addition AND RETURN starts the executable program in a new internal session. The session for the calling program is retained. Once program access is completed, program execution for the calling program continues after the SUBMIT statement.
The label in name can also have the form (PROG)DOBJ for internal use only, where PROG is the name of an ABAP program and DOBJ is the name of a global data object of this program. If the program PROG is loaded during execution of the statement ASSIGN in the same internalmode as the current program, the data object (PROG)DOBJ is searched for in this program, and the field symbol points to this data object after the object has been successfully assigned.
Conbine the two part, I can get the answer.
So thanks all your information.
‎2011 Jan 13 6:03 AM
Probably the terminology Internal Session is more accurate - when a SUBMIT is executed a new internal session is created.
Apologies for the confusion.