<?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: Clear static data? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980542#M71844</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to give more details if I knew them...&lt;/P&gt;&lt;P&gt;Just got on the project a few weeks ago - interfacing a navision system via IDOCs to R/3 46C. &lt;/P&gt;&lt;P&gt;Our IDOCs create sales documents first. From there deliveries, invoices and financial documents are created. Some processes create IDOCs again which are send to other company codes creating vendor invoices.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT: There are many processes, none of them documented sufficiently. And we have an unknown number of active user exits, some or more of them coded not what I might call 'state of the art'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got nervous when I noticed that in processing inbound IDOCs subsequent IDOCs carried errors of previously processed ones and vice versa - triggered by user exits in pricing procedure of sales document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This originated from global data in user exit functions. The (ir-) responsible developer tried to convince me that 'Commit work' would fix the problem as a new LUW would start. He learned that 'Commit work' won't clear any data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I don't know who else did what in which user exit. To make sure everything works as desired I would rather know how to start from scratch with each IDOC. As I don't know all active userexits for all processes and document types, a Form to clear on Commit is a nice idea if I even knew what to clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A simple solution would be to enforce a reload of all programs involved but I don't no how to enforce.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other ideas welcome!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Sep 2005 14:35:35 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2005-09-24T14:35:35Z</dc:date>
    <item>
      <title>Clear static data?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980540#M71842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in some userexits our developers use either global data in a function group or static data in form routines. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK, by now all developers believe that a 'commit work' never clears any variables. But in some situations in mass- or IDOC-processing we would prefer to be sure that everything is cleared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way of clearing just everything or to have everything initial by re-loading the modules - actually I don't know how to enforce a reload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is a possible solution processing in separate task?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any useful hints,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Sep 2005 12:00:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980540#M71842</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2005-09-24T12:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Clear static data?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980541#M71843</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;Perhaps you can create a routine to clear all and call it after commit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM CLEAR_ALL ON COMMIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this way the routine runs only once time after commit is being called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway let us know more details, because a good solution depends on the flow of process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Sep 2005 13:15:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980541#M71843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-24T13:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Clear static data?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980542#M71844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to give more details if I knew them...&lt;/P&gt;&lt;P&gt;Just got on the project a few weeks ago - interfacing a navision system via IDOCs to R/3 46C. &lt;/P&gt;&lt;P&gt;Our IDOCs create sales documents first. From there deliveries, invoices and financial documents are created. Some processes create IDOCs again which are send to other company codes creating vendor invoices.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT: There are many processes, none of them documented sufficiently. And we have an unknown number of active user exits, some or more of them coded not what I might call 'state of the art'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got nervous when I noticed that in processing inbound IDOCs subsequent IDOCs carried errors of previously processed ones and vice versa - triggered by user exits in pricing procedure of sales document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This originated from global data in user exit functions. The (ir-) responsible developer tried to convince me that 'Commit work' would fix the problem as a new LUW would start. He learned that 'Commit work' won't clear any data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I don't know who else did what in which user exit. To make sure everything works as desired I would rather know how to start from scratch with each IDOC. As I don't know all active userexits for all processes and document types, a Form to clear on Commit is a nice idea if I even knew what to clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A simple solution would be to enforce a reload of all programs involved but I don't no how to enforce.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other ideas welcome!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Sep 2005 14:35:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980542#M71844</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2005-09-24T14:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Clear static data?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980543#M71845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Li,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Put all your processes for each IDOC in a RFC Function Module and then call it as follows,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT &amp;lt;Your IDOCS&amp;gt;.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION &amp;lt;Your Function Name&amp;gt; &lt;/P&gt;&lt;P&gt;    STARTING NEW TASK &amp;lt;Task Name&amp;gt;&lt;/P&gt;&lt;P&gt;    DESTINATION 'NONE' ...&lt;/P&gt;&lt;P&gt;    ....&lt;/P&gt;&lt;P&gt;    ....&lt;/P&gt;&lt;P&gt;    ....&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Hope this helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I am adding this explanation for better understanding..&lt;/P&gt;&lt;P&gt;  In the above RFC fm that I have mentioned you can have all your PARSE IDOC logic and then all calls to sales orders, deliveries etc..&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  Alternatively, I think you can have every thing in a report and then use SUBMIT REPORT technique. Even this will start a new LUW each time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Sep 2005 14:44:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980543#M71845</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-24T14:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Clear static data?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980544#M71846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Clemens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your problem seems to me like some kind of a jigsaw puzzle. You've got a few pieces and are trying to figure out which other pieces would fit in where....:-)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think it is reasonably clear that the errors are all arising out of User-Exits. Since you have said that there's some global data which is not getting cleared and which is causing problem subsequently, it is a good point to start off with analyzing what global data is being used at which point. Modularization - splitting the code into subroutines and ensuring that all data is being passed through clearly defined interfaces (use pass by &amp;lt;i&amp;gt;value&amp;lt;/i&amp;gt;) should certainly solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying to restart/reload the whole process would work, but it can only be a makeshift solution. It is certainly not what I would call "state-of-the-art"! &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Think about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Sep 2005 14:53:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980544#M71846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-24T14:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Clear static data?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980545#M71847</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;It's right: COMMIT doesn't clear the global data of a program, but it releases only database updating, database lock and i think log rollback too, but not program data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They are automatically cleared when program is finished: when a program is downloaded from memory. So commit and end of program could not coincide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So these user-exit aren't probably made very well: after a process is finished all global data should be cleared and if the programs aren't downloaded from memory (because they aren't finished), they have to be cleared by programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you run a process in debug, you could see which program (user-exit) are used (are uploaded in memory) and then to deicede where it needs to clear the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Sep 2005 15:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980545#M71847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-24T15:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Clear static data?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980546#M71848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you everybody for the very good hints. Clearly I would prefer to solve it analytically by finding out what user exits are active and what they do with which static data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this will be impossible for me within the scope of this project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Srikanth Pinnamaneni's proposal clearly is a fail-safe-solution. I tried to reassign from very helpful to solved what makes some problems...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The downer remaining is that for every  STARTING NEW TASK all the modules get reloaded - unfortunately people created (among others) one huge function group with roughly 100 functions for database access. So we will have to try around with possible speed issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I'm not quite sure how to get back the table parameters contents (BAPIRETURN). We have to use them for assigning the correct status to the IDOC processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I knew about  CALL FUNCTION &amp;lt;Your Function Name&amp;gt;&lt;/P&gt;&lt;P&gt;STARTING NEW TASK &amp;lt;Task Name&amp;gt;&lt;/P&gt;&lt;P&gt;DESTINATION 'NONE' but I never worked with it - I'll give it a try!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again! - no more input required at this point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Sep 2005 17:47:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-static-data/m-p/980546#M71848</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2005-09-24T17:47:29Z</dc:date>
    </item>
  </channel>
</rss>

