<?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 Process Order, Statuts and commit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592255#M593507</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got an important problem with process order printing. Let me explain :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to check if my OPR have one special status, I write this code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CONSTANTS : c_ouv  TYPE j_status VALUE 'I0001', " OUV. : ouvert
              c_lanc TYPE j_status VALUE 'I0002'. " LANC : lancé

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  CONCATENATE 'OR' caufvd-aufnr INTO l_objnr.
  CALL FUNCTION 'STATUS_CHECK'
       EXPORTING
            objnr             = l_objnr
            status            = c_lanc
       EXCEPTIONS
            object_not_found  = 1
            status_not_active = 2
            OTHERS            = 3.

  CASE sy-subrc.
*   Statut lancé actif
    WHEN 0.
      w_lance = 'X'.
      PERFORM add_texte_statut USING c_lanc.

*   Statut lancé inactif (=&amp;gt; ouvert)
    WHEN 2.
      w_lance = space.
      PERFORM add_texte_statut USING c_ouv.

*   Erreur
    WHEN OTHERS.
      MESSAGE e202(zpp).
  ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have a problem creating my process order (COR1) and printing it in the same time. When we pass it this peace of code, the object doesn't exist, and I've got my E202(ZPP) message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if I stop in DEBUG before the STATUS_CHECK, I have got the success message &lt;EM&gt;Your process Order XXXXXXX has been created&lt;/EM&gt;, and everything is OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I put my &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK AND WAIT&lt;/P&gt; before my STATUS CHECK, but without any success....&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you got any suggestion for this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2007 09:05:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-02T09:05:11Z</dc:date>
    <item>
      <title>Process Order, Statuts and commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592255#M593507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got an important problem with process order printing. Let me explain :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to check if my OPR have one special status, I write this code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CONSTANTS : c_ouv  TYPE j_status VALUE 'I0001', " OUV. : ouvert
              c_lanc TYPE j_status VALUE 'I0002'. " LANC : lancé

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  CONCATENATE 'OR' caufvd-aufnr INTO l_objnr.
  CALL FUNCTION 'STATUS_CHECK'
       EXPORTING
            objnr             = l_objnr
            status            = c_lanc
       EXCEPTIONS
            object_not_found  = 1
            status_not_active = 2
            OTHERS            = 3.

  CASE sy-subrc.
*   Statut lancé actif
    WHEN 0.
      w_lance = 'X'.
      PERFORM add_texte_statut USING c_lanc.

*   Statut lancé inactif (=&amp;gt; ouvert)
    WHEN 2.
      w_lance = space.
      PERFORM add_texte_statut USING c_ouv.

*   Erreur
    WHEN OTHERS.
      MESSAGE e202(zpp).
  ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have a problem creating my process order (COR1) and printing it in the same time. When we pass it this peace of code, the object doesn't exist, and I've got my E202(ZPP) message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if I stop in DEBUG before the STATUS_CHECK, I have got the success message &lt;EM&gt;Your process Order XXXXXXX has been created&lt;/EM&gt;, and everything is OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I put my &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK AND WAIT&lt;/P&gt; before my STATUS CHECK, but without any success....&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you got any suggestion for this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 09:05:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592255#M593507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-02T09:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Process Order, Statuts and commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592256#M593508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mathieu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is happening due to the time (in microscenods) at the time of update, and it is typical problem happens in SAP. i faced this kind of problem in function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE I00 WITH TEXT-I01. "DATABASE IS GOING TO UPDATE SOMETHING LIKE THIS &lt;/P&gt;&lt;P&gt;(or you can try with success message)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Krishnendu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 09:18:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592256#M593508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-02T09:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Process Order, Statuts and commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592257#M593509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is exactly it ! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3 solutions are working :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WAIT UP TO 1 SECONDS.&lt;/P&gt;&lt;P&gt;MESSAGE I00 .....&lt;/P&gt;&lt;P&gt;MESSAGE S00 .......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my client don't accept any of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will have to get the current data in the buffer... &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 09:33:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592257#M593509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-02T09:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Process Order, Statuts and commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592258#M593510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have push forward my analysis of this problem, without being able to find a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an asynchronous process which update the database with the correct values, and the printing process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a status information, which is not in parameter of the printing code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried :&lt;/P&gt;&lt;P&gt;¤ WAIT 1 second : ok in developpement system, but not in others =&amp;gt; instable solution&lt;/P&gt;&lt;P&gt;¤ TYPE S message : too quick&lt;/P&gt;&lt;P&gt;¤ TYPE I message : it depends of the user's click =&amp;gt; instable&lt;/P&gt;&lt;P&gt;¤ COMMIT WORK AND WAIT, and BYPASSING_BUFFER : don't work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some way of analysis :&lt;/P&gt;&lt;P&gt;¤ The updating asynchronous process end with a success message. It is possible to wait until this message start ? (How to capture this event?)&lt;/P&gt;&lt;P&gt;¤ Is there a flag at the end of this asynchronous process in order to make a WAIT UNTIL .... = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I sincerely hope you will be able to help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mathieu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 12:41:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592258#M593510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T12:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Process Order, Statuts and commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592259#M593511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any idea ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 13:49:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592259#M593511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T13:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Process Order, Statuts and commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592260#M593512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Help ! I need somebody help !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nobody ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 15:11:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-statuts-and-commit/m-p/2592260#M593512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T15:11:51Z</dc:date>
    </item>
  </channel>
</rss>

