<?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: Submit and Return program executes Leave to Transaction in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-and-return-program-executes-leave-to-transaction/m-p/11846682#M1957857</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Naimesh.&amp;nbsp; I came to the same conclusion, no way to control this from our Z program without doing an enhancement.&amp;nbsp; What we ended up doing was to create 3 Z programs to do what I was hoping could be done in 1.&amp;nbsp; I didn't want to mess around with enhancement points in RLINV050 as it uses the old GET Logical Database stuff that I'm not very familiar with and the approach below is now working for us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st Z program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; delete all data from custom Z table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Loop through LX26 Variants&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; submit 2nd Z program via Job Open/Job Close for each unique LX26 Variant&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd Z Program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Submit RLINV050 exporting list to memory and return&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (when no results this won't return because of LEAVE TO TRANSACTION,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; but that is OK because it is just for this one variant so nothing to add to Z table anyway)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get List&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Update Z table with consolidated data from LX26&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3rd Program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Report against Z table to show outstanding Cycle Count data across the entire company&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Aug 2016 13:40:59 GMT</pubDate>
    <dc:creator>jdub67</dc:creator>
    <dc:date>2016-08-25T13:40:59Z</dc:date>
    <item>
      <title>Submit and Return program executes Leave to Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-and-return-program-executes-leave-to-transaction/m-p/11846680#M1957855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are trying to submit RLINV050 (transaction LX26) via a custom Z program in a background job via Submit Exporting List to Memory and Return.&amp;nbsp; All works great unless RLINV050 doesn't have any results.&amp;nbsp; In that case rather than displaying an empty ALV report, it outputs a message L4-S136 and performs "LEAVE TO TRANSACTION SY-TCODE" which ends the processing of the calling Z program.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone have an ideas on how to have the Z program keep control of the process.&amp;nbsp; We are calling RLINV050 multiple times in a loop and consolidating the results, but can't do this properly when it hits the LEAVE statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 19:54:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-and-return-program-executes-leave-to-transaction/m-p/11846680#M1957855</guid>
      <dc:creator>jdub67</dc:creator>
      <dc:date>2016-08-23T19:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Submit and Return program executes Leave to Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-and-return-program-executes-leave-to-transaction/m-p/11846681#M1957856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think we have anything on SUBMIT statement to avoid this situation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From help on &lt;SPAN class="qtext" style="font-size: 13.3333px;"&gt;&lt;A href="http://https//help.sap.com/abapdocu_750/en/ABAPLEAVE_TO_TRANSACTION.htm"&gt;LEAVE TO TRANSACTION&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;, :&lt;/SPAN&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt;When using &lt;/SPAN&gt;&lt;SPAN class="qtext" style="font-family: 'Courier New'; font-weight: bold; color: #000000; font-size: 12.8px; background-color: #fefeff;"&gt;LEAVE TO TRANSACTION&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt;, the current &lt;/SPAN&gt;&lt;A class="grey" style="color: #505050; font-family: Arial; font-size: 12.8px; background-color: #fefeff;" title="Glossary Entry"&gt;call sequence&lt;/A&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt; is exited completely. Upon completion of the called transaction, the runtime environment returns to the position where the first program in the call sequence was called. The current &lt;/SPAN&gt;&lt;A class="grey" style="color: #505050; font-family: Arial; font-size: 12.8px; background-color: #fefeff;" title="Glossary Entry"&gt;SAP LUW&lt;/A&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt; is thereby ended.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably you can write an implicit enhancement at the end of subroutine&amp;nbsp; AUSGABE to set the variable FLG_OUT = CON_TRUE when program is called in SUBMIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 21:45:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-and-return-program-executes-leave-to-transaction/m-p/11846681#M1957856</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2016-08-23T21:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Submit and Return program executes Leave to Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-and-return-program-executes-leave-to-transaction/m-p/11846682#M1957857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Naimesh.&amp;nbsp; I came to the same conclusion, no way to control this from our Z program without doing an enhancement.&amp;nbsp; What we ended up doing was to create 3 Z programs to do what I was hoping could be done in 1.&amp;nbsp; I didn't want to mess around with enhancement points in RLINV050 as it uses the old GET Logical Database stuff that I'm not very familiar with and the approach below is now working for us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st Z program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; delete all data from custom Z table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Loop through LX26 Variants&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; submit 2nd Z program via Job Open/Job Close for each unique LX26 Variant&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd Z Program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Submit RLINV050 exporting list to memory and return&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (when no results this won't return because of LEAVE TO TRANSACTION,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; but that is OK because it is just for this one variant so nothing to add to Z table anyway)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get List&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Update Z table with consolidated data from LX26&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3rd Program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Report against Z table to show outstanding Cycle Count data across the entire company&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2016 13:40:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-and-return-program-executes-leave-to-transaction/m-p/11846682#M1957857</guid>
      <dc:creator>jdub67</dc:creator>
      <dc:date>2016-08-25T13:40:59Z</dc:date>
    </item>
  </channel>
</rss>

