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

Global Variable in Inbound IDoc Function Module

Former Member
0 Likes
648

Hello Gurus,

Based on my understand, global variable can be shared / changed by function modules that shares the same function pool. So if function modules is being invoked simultaneously, the change on one global variable will impact the value of the same variable on the other instance of function module. Is my understanding right so that the developers shall never use a global variable in a Idoc inbound processing function module?

YN Mao

1 ACCEPTED SOLUTION
Read only

ThomasZloch
Active Contributor
0 Likes
430

The global function group memory is shared within the same internal session. In parallel IDoc processing, you will have separate internal (likely even external) sessions, so there should not be a conflict.

See also http://help.sap.com/abapdocu_731/en/ABENMEMORY_ORGANIZATION.htm

However as a programming guideline, using global variables should be reduced as much as possible anyway.

Thomas

1 REPLY 1
Read only

ThomasZloch
Active Contributor
0 Likes
431

The global function group memory is shared within the same internal session. In parallel IDoc processing, you will have separate internal (likely even external) sessions, so there should not be a conflict.

See also http://help.sap.com/abapdocu_731/en/ABENMEMORY_ORGANIZATION.htm

However as a programming guideline, using global variables should be reduced as much as possible anyway.

Thomas