<?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 Import data from file - parallel processing in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125458#M1618832</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ABAP program, Z_IMPORT, import data from txt files (exported from an external system) in DB SAP via BAPI. I would like to prevent parallelism, ie more than one Z_IMPORT cannot be running simultaneously. It seems to me that this is The Most elegant way to avoid concurrent access of process Z_IMPORT to files on disk,  that contain data to be imported. The program Z_IMPORT launches with SAP scheduler time, but also can be launched by hand. BAPI_TRANSACTION_COMMIT can be with or without "WAIT", according to the user's choice, setting the corresponding parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are traffic lights on the processes in ABAP? How do you solve? &lt;/P&gt;&lt;P&gt;A piece of sample code greatly appreciated would be.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Serena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Sep 2011 08:04:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-09-01T08:04:42Z</dc:date>
    <item>
      <title>Import data from file - parallel processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125458#M1618832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ABAP program, Z_IMPORT, import data from txt files (exported from an external system) in DB SAP via BAPI. I would like to prevent parallelism, ie more than one Z_IMPORT cannot be running simultaneously. It seems to me that this is The Most elegant way to avoid concurrent access of process Z_IMPORT to files on disk,  that contain data to be imported. The program Z_IMPORT launches with SAP scheduler time, but also can be launched by hand. BAPI_TRANSACTION_COMMIT can be with or without "WAIT", according to the user's choice, setting the corresponding parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are traffic lights on the processes in ABAP? How do you solve? &lt;/P&gt;&lt;P&gt;A piece of sample code greatly appreciated would be.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Serena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 08:04:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125458#M1618832</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-01T08:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from file - parallel processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125459#M1618833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Serena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain in detail what is traffic lights here.We can keep traffic lights green,yellow and green lights.If you give more details then easy to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 08:23:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125459#M1618833</guid>
      <dc:creator>madhu_vadlamani</dc:creator>
      <dc:date>2011-09-01T08:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from file - parallel processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125460#M1618834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Serena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess that the best solution is to use lock objects. You could use ES_PROG or a copy of it. At the beginning of your Z_IMPORT you must call that associate lock function module and at the end you must call the unlock function module. If you use ES_PROG they would be ENQUEUE_EPROG and DEQUEUE_EPROG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinf regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 08:26:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125460#M1618834</guid>
      <dc:creator>arseni_gallardo</dc:creator>
      <dc:date>2011-09-01T08:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from file - parallel processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125461#M1618835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, madhurao123!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I wanted to know which ones are synchronization objects and how to use (such as: blocking, semaphors ....) in SAP for that two processes (for example, two programs) Z_INPUT can not access the same object at the same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. How do you solve this situation: Run 1.  Z_INPUT program, after which run  2. Z_INPUT program. This second understands that there is another program Z_INPUT runned and (second) ends immediately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ciao,&lt;/P&gt;&lt;P&gt;Serena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 08:58:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125461#M1618835</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-01T08:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from file - parallel processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125462#M1618836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Arseni wrote, use a lock object. (ref [SAP Lock Concept |http://help.sap.com/saphelp_nw04/helpdata/en/7b/f9813712f7434be10000009b38f8cf/frameset.htm]) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Choice an object to lock and identify the FM that performs the lock, choice an object that is not required by another program in a productive environment.&lt;/P&gt;&lt;P&gt;- program - E_EPROG -&amp;gt; ENQUEUE_EPROG&lt;/P&gt;&lt;P&gt;- database table  - E_TABLEE -&amp;gt; ENQUEUE_TABLEE&lt;/P&gt;&lt;P&gt;At the start of execution of the program try to lock the object, if already locked, an other instance of the report is running, you can exit, or wait in a loop. &lt;/P&gt;&lt;P&gt;At the end of program a DEQUEU&amp;lt;lock_object&amp;gt; or a COMMIT/ROLLBACK can release the lock, but the end of the job will also release it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 12:52:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125462#M1618836</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2011-09-01T12:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from file - parallel processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125463#M1618837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Raymond, thank you. I need loock of the process Z_INPUT.&lt;/P&gt;&lt;P&gt;Could you explain this &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;"choice is not an object That required by another program in a productive environment." &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If I'm wrong in choosing the object can do damage into productive environment?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 13:28:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125463#M1618837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-01T13:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from file - parallel processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125464#M1618838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No damage will occur, as you locked an object, a user that requires the same lock will get a message like "data locked by another user", and will not be able to perform some updates, no damage will occur. (Actually it is what we want, the second job will get this message (sy-subrc ne 0) and leave)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could lock via ENQUEUE_TABLEE a table that does not exist (so nobody will try to lock it) there is no existence-check in lock FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 13:34:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-data-from-file-parallel-processing/m-p/8125464#M1618838</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2011-09-01T13:34:34Z</dc:date>
    </item>
  </channel>
</rss>

