<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unusual behaviour on multiple function modules using the same include in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114959#M1904329</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jul 2016 09:44:20 GMT</pubDate>
    <dc:creator>sakshi_sawhney</dc:creator>
    <dc:date>2016-07-21T09:44:20Z</dc:date>
    <item>
      <title>Unusual behaviour on multiple function modules using the same include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114955#M1904325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a more general question, but I'm first going to explain what motivates it, you can skip it since it's related to how I found the bug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been testing two standard function modules:&lt;STRONG&gt; WS_DELIVERY_UPDATE&lt;/STRONG&gt; and &lt;STRONG&gt;WS_REVERSE_GOODS_ISSUE. &lt;/STRONG&gt;These FM's are used to post a goods issue related to a delivery and reverse it respectively. They are really simple FM's, I think I am using 2 or 3 parameters on them.&lt;/P&gt;&lt;P&gt;The problem is when they are executed in succession.&lt;/P&gt;&lt;P&gt;If in the same session, a user POSTS a good issue and then tries to reverse it, the system gives me the error that the used delivery doesn't exist, if I re-start the session, ws_reverse_goods_issue works normally. If we search on SDN, there's several topics on these two FM's and this exact problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, why does this happen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 3 programs involved:&lt;/P&gt;&lt;P&gt;-The first FM, &lt;STRONG&gt;WS_DELIVERY_UPDATE&lt;/STRONG&gt;, is on the Function Group &lt;STRONG&gt;V50L&lt;/STRONG&gt;, this FG utilizes the &lt;STRONG&gt;include vblkdata.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;-The second FM, &lt;STRONG&gt;WS_REVERSE_GOODS_ISSUE&lt;/STRONG&gt;, is on FG&lt;STRONG&gt; V51W&lt;/STRONG&gt;, this FG also utilizes the &lt;STRONG&gt;include vblkdata.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;-both FM's, utilize forms of the module pool &lt;STRONG&gt;SAPMV50A&lt;/STRONG&gt;, this guy also utilizes the &lt;STRONG&gt;include vblkdata.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The include has a variable, &lt;STRONG&gt;LIKP&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the sake of writing less stuff, i'm gonna call FM &lt;STRONG&gt;WS_DELIVERY_UPDATE = A, &lt;/STRONG&gt;and&lt;STRONG&gt; WS_REVERSE_GOODS_ISSUE = B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If I call FM B, somewhere in the main code it updates the variable (B)LIKP-VBELN, this also changes the variable (SAPMV50A)LIKP-VBELN and the program works normally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I call FM A, and then B, then what happens is, when the variable (B)LIKP-VBELN is changed, (SAPMV50A)LIKP-VBELN doesn't change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somehow, it seems that &lt;STRONG&gt;the first function module&lt;/STRONG&gt; that uses a perform of &lt;STRONG&gt;SAPMV50A &lt;/STRONG&gt;will also share a memory area with it.&lt;/P&gt;&lt;P&gt;Also, the FM B was DESIGNED to use such a feature, it doesn't work if it doesn't get hold of such "shared memory area".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My question is:&lt;/STRONG&gt; Is this an intended design by SAP? what is happening here? I'm trying to understand what's the logic of this, what are the expected behaviours, etc etc&lt;/P&gt;&lt;P&gt;I'm not trying to solve the problem here, I know a few ways to do so. I want to understand what is really happening&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TL;DR:&lt;/STRONG&gt; 3 programs(A,B,C) use the same include, programs A and B use C. if I B changes a variable declared in the include, it also changes the value on C. If I call program A then B,&amp;nbsp; B stops changing values on C.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 13:52:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114955#M1904325</guid>
      <dc:creator>adrianos_campanhola</dc:creator>
      <dc:date>2015-05-28T13:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unusual behaviour on multiple function modules using the same include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114956#M1904326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the include &lt;SPAN style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;vblkdata&lt;/STRONG&gt;&lt;/SPAN&gt; there is the statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;begin &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;of &lt;/SPAN&gt;common part likpcom&lt;/STRONG&gt;&lt;SPAN class="L0S55"&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement begins a block of memory call &lt;STRONG&gt;likpcom&lt;/STRONG&gt; which is shared between all programs that have a common part with the same name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore this is an intended design by SAP. What you're experiencing could either be an unintended side-effect or (and this is what SAP will tell you) a consequence of using an unreleased function module.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 13:57:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114956#M1904326</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2015-05-28T13:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Unusual behaviour on multiple function modules using the same include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114957#M1904327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matthew, thanks for the fast response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That could be the case, but the variable in question is LIKP-VBELN, that's not part of the 'common part'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I've been able to reproduce this locally, using just a include with the declaration: &lt;STRONG&gt;TABLES: LIKP.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Mauricio Cruz sent me the following link: &lt;A href="http://help.sap.com/abapdocu_70/en/ABENPROGRAM_GROUP_GLOSRY.htm"&gt;http://help.sap.com/abapdocu_70/en/ABENPROGRAM_GROUP_GLOSRY.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This agrees with the problem in question, but might raise another one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, as per de documentation, when i call function A, a program group is created and SAPMV50A is added to it. the FG of the FM A shares some data with SAPMV50A( the TABLES addition is included ).&lt;/P&gt;&lt;P&gt;when I call FM B, another program group is created, and SAPMV50A has been taken, so any changes of B won't affect the varibles in SAPMV50A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 14:07:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114957#M1904327</guid>
      <dc:creator>adrianos_campanhola</dc:creator>
      <dc:date>2015-05-28T14:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unusual behaviour on multiple function modules using the same include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114958#M1904328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah right - TABLES works in the same way as COMMON PART. I think I remember knowing that... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 14:30:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114958#M1904328</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2015-05-28T14:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unusual behaviour on multiple function modules using the same include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114959#M1904329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 09:44:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114959#M1904329</guid>
      <dc:creator>sakshi_sawhney</dc:creator>
      <dc:date>2016-07-21T09:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unusual behaviour on multiple function modules using the same include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114960#M1904330</link>
      <description>&lt;P&gt;Simple solution: use DESTINATION "NONE" command for first function module with parameter COMMIT = abap_false and separate call of "BAPI_TRANSACTION_COMMIT (also with DESTINATION "NONE").&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 10:05:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unusual-behaviour-on-multiple-function-modules-using-the-same-include/m-p/11114960#M1904330</guid>
      <dc:creator>former_member149072</dc:creator>
      <dc:date>2020-04-27T10:05:20Z</dc:date>
    </item>
  </channel>
</rss>

