<?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: CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-prodordconf-create-tt/m-p/1453455#M214501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is not so simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine we have 3 records with te same material to confirm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In effect that bapi in background triggers Material movement, which locks that materil and may not be finished befroe second trigger of BAPI is done. So i need to check locks before Bapi triggering. But something is now working &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jacek Slowikowski&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jacek Slowikowski&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jacek Slowikowski&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Jul 2006 09:39:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-17T09:39:34Z</dc:date>
    <item>
      <title>CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-prodordconf-create-tt/m-p/1453453#M214499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello i use ffunction module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            post_wrong_entries = lv_post&lt;/P&gt;&lt;P&gt;            testrun            = lv_testrun&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;P&gt;            return             = ls_bapiret1&lt;/P&gt;&lt;P&gt;          TABLES&lt;/P&gt;&lt;P&gt;            timetickets        = lt_bapi_pp_timeticket&lt;/P&gt;&lt;P&gt;            goodsmovements     = lt_bapi2017_gm_item_create&lt;/P&gt;&lt;P&gt;            link_conf_goodsmov = lt_bapi_link_conf_goodsmov&lt;/P&gt;&lt;P&gt;            detail_return      = lt_bapi_coru_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in loop. SOmetimes in diferenet production ordes (MTO MTS) i confim the same material data. ALthough i USE ENQUE DEQUE logic to avoid locks, sometimes after it in COGI i have errors Plant data for material.... blocked by user. What am i missing ??&lt;/P&gt;&lt;P&gt;To avoid locks i use something like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT lt_bapi2017_gm_item_create INTO&lt;/P&gt;&lt;P&gt;ls_bapi2017_gm_item_create.&lt;/P&gt;&lt;P&gt;          GET RUN TIME FIELD t_1.&lt;/P&gt;&lt;P&gt;          d_t = 0.&lt;/P&gt;&lt;P&gt;          sy-subrc = 9.&lt;/P&gt;&lt;P&gt;          WHILE d_t &amp;lt;= 600000000 AND sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            CALL FUNCTION 'ENQUEUE_EMRKPF'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MODE_RKPF            = 'E'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MANDT                = SY-MANDT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          rsnum                = ls_bapi2017_gm_item_create-reserv_no&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       X_RSNUM              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       _SCOPE               = '2'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          _wait                = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       _COLLECT             = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          foreign_lock         = 1&lt;/P&gt;&lt;P&gt;          system_failure       = 2&lt;/P&gt;&lt;P&gt;          OTHERS               = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            GET RUN TIME FIELD t_2.&lt;/P&gt;&lt;P&gt;            d_t = t_2 - t_1.&lt;/P&gt;&lt;P&gt;          ENDWHILE.&lt;/P&gt;&lt;P&gt;          GET RUN TIME FIELD t_1.&lt;/P&gt;&lt;P&gt;          d_t = 0.&lt;/P&gt;&lt;P&gt;          sy-subrc = 9.&lt;/P&gt;&lt;P&gt;          WHILE d_t &amp;lt;= 600000000 AND sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            CALL FUNCTION 'ENQUEUE_EMMARCE'&lt;/P&gt;&lt;P&gt;             EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MODE_MARC            = 'E'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MANDT                = SY-MANDT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             matnr                = ls_bapi2017_gm_item_create-material&lt;/P&gt;&lt;P&gt;               werks                = ls_bapi2017_gm_item_create-plant&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_MATNR              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_WERKS              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  _SCOPE               = '2'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;               &lt;U&gt;wait                = gc&lt;/U&gt;x&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  _COLLECT             = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             EXCEPTIONS&lt;/P&gt;&lt;P&gt;               foreign_lock         = 1&lt;/P&gt;&lt;P&gt;               system_failure       = 2&lt;/P&gt;&lt;P&gt;               OTHERS               = 3&lt;/P&gt;&lt;P&gt;                      .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            GET RUN TIME FIELD t_2.&lt;/P&gt;&lt;P&gt;            d_t = t_2 - t_1.&lt;/P&gt;&lt;P&gt;          ENDWHILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          CALL FUNCTION 'DEQUEUE_EMMARCE'&lt;/P&gt;&lt;P&gt;            EXPORTING&lt;/P&gt;&lt;P&gt;              matnr = ls_bapi2017_gm_item_create-material&lt;/P&gt;&lt;P&gt;              werks = ls_bapi2017_gm_item_create-plant&lt;/P&gt;&lt;P&gt;              _synchron = 'X'.&lt;/P&gt;&lt;P&gt;          COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          CALL FUNCTION 'DEQUEUE_EMRKPF'&lt;/P&gt;&lt;P&gt;            EXPORTING&lt;/P&gt;&lt;P&gt;              rsnum    = ls_bapi2017_gm_item_create-reserv_no&lt;/P&gt;&lt;P&gt;              _synchron = 'X'.&lt;/P&gt;&lt;P&gt;          COMMIT WORK AND WAIT.&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;Any help will be apriciaited. I am stuck with that &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Jacek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jacek Slowikowski&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jacek Slowikowski&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jacek Slowikowski&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 09:26:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-prodordconf-create-tt/m-p/1453453#M214499</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T09:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-prodordconf-create-tt/m-p/1453454#M214500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jacek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no need the take care of the locking mechanism explicitly. Since BAPI will take care of the locking mechanism automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 09:35:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-prodordconf-create-tt/m-p/1453454#M214500</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T09:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-prodordconf-create-tt/m-p/1453455#M214501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is not so simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine we have 3 records with te same material to confirm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In effect that bapi in background triggers Material movement, which locks that materil and may not be finished befroe second trigger of BAPI is done. So i need to check locks before Bapi triggering. But something is now working &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jacek Slowikowski&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jacek Slowikowski&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jacek Slowikowski&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 09:39:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-prodordconf-create-tt/m-p/1453455#M214501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T09:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-prodordconf-create-tt/m-p/1453456#M214502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to check if a particular object is locked use the function ENQUEUE_READ with proper parameters and introduce a WAIT if the object is locked. Sample code below:&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'ENQUEUE_READ'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      gclient               = sy-mandt&lt;/P&gt;&lt;P&gt;      gname                 = p_tablename&lt;/P&gt;&lt;P&gt;      garg                  = p_tablekey&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      number                = p_number&lt;/P&gt;&lt;P&gt;      subrc                 = p_subrc&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      enq                   = pt_enq&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      communication_failure = 1&lt;/P&gt;&lt;P&gt;      system_failure        = 2&lt;/P&gt;&lt;P&gt;      OTHERS                = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    IF p_number GT 0.&lt;/P&gt;&lt;P&gt;      WAIT UP TO 2 SECONDS.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the function 'BAPI_PRODORDCONF_CREATE_TT' call the BAPI "BAPI_TRANSACTION_COMMIT" with wait as X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Kiran&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Kiran Raorane&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 11:11:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-prodordconf-create-tt/m-p/1453456#M214502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T11:11:37Z</dc:date>
    </item>
  </channel>
</rss>

