<?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: Function Module working only in debug mode in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771849#M38349</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Emmanuel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When entering debug mode the system performs a commit on database. If you have created the notification just before you want to set the status, the notification does not exist on the database unitl time of commit. You should use the function BAPI_TRANSACTION_COMMIT before calling the function for updating status.&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;&lt;span class="lia-unicode-emoji" title=":monkey_face:"&gt;🐵&lt;/span&gt; Jacob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Oct 2004 14:57:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2004-10-20T14:57:02Z</dc:date>
    <item>
      <title>Function Module working only in debug mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771845#M38345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following Function Module works only in debug mode. The purpose of this FM is to create a notification and to put it in progress status. If I put a breakpoint before "CALL FUNCTION 'BAPI_ALM_NOTIF_PUTINPROGRESS'" it works. If I execute this FM without putting a breakpoint at that place it creates the notification but doesnt put it in progress status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words, the last BAPI call doesnot work if I dont put a breakpoint before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody help me to find out where is the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Younes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION ZFM_CREATE_NOTIF_IN_PROCESS.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(NOTIFTYP) TYPE  CHAR2&lt;/P&gt;&lt;P&gt;*"     VALUE(NOTIFHEADER) TYPE  BAPI2080_NOTHDRI&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(NOTIFNUMBER) TYPE  CHAR12&lt;/P&gt;&lt;P&gt;*"     VALUE(NOTIFCURSTATUS) TYPE  CHAR40&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: gs_bapi2080_nothdre TYPE bapi2080_nothdre,&lt;/P&gt;&lt;P&gt;      gt_return TYPE TABLE OF bapiret2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The notification is created with a temporary number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    notif_type         = NOTIFTYP&lt;/P&gt;&lt;P&gt;    notifheader        = NOTIFHEADER&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    notifheader_export = gs_bapi2080_nothdre&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    return             = gt_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE gt_return TRANSPORTING NO FIELDS WITH KEY type = 'E'.&lt;/P&gt;&lt;P&gt;CHECK sy-subrc IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*The notication will be saved with a number which isnt temporary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    number      = gs_bapi2080_nothdre-notif_no&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    notifheader = gs_bapi2080_nothdre&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    return      = gt_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE gt_return TRANSPORTING NO FIELDS WITH KEY type = 'E'.&lt;/P&gt;&lt;P&gt;CHECK sy-subrc IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The Notif is already created, it will be put in progress status&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;NOTIFNUMBER = gs_bapi2080_nothdre-notif_no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   CALL FUNCTION 'BAPI_ALM_NOTIF_PUTINPROGRESS'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          NUMBER             = NOTIFNUMBER&lt;/P&gt;&lt;P&gt;          LANGU              = SY-LANGU&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;         SYSTEMSTATUS       = NOTIFCURSTATUS&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;         RETURN             = gt_return.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2004 14:31:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771845#M38345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-20T14:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module working only in debug mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771846#M38346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Emmanuel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As BAPIs do not have a commit of their own you should trigger this commit your self. You do so for the first BAPI you call, but not after the second one.&lt;/P&gt;&lt;P&gt;In Debugging mode the commit work is triggered automatically!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2004 14:36:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771846#M38346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-20T14:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module working only in debug mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771847#M38347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried your solution but It does not change anything. Maybe when we put a breakpoint before the call of BAPI_NOTIF_PUTINPROGRESS it gives enough time to the  commit just before to be performed. If it's really the problem how can solve it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Younes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2004 14:51:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771847#M38347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-20T14:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module working only in debug mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771848#M38348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Emmanuel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I get your problem: you want to wait to have the commit finished! The call to BAPI_TRANSACTION_COMMIT has an optional parameter 'WAIT' which is space by default which causes only a commit. When you set this parameter to 'X' it will do a commit work and wait.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should solve your problem!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2004 14:55:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771848#M38348</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-20T14:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module working only in debug mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771849#M38349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Emmanuel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When entering debug mode the system performs a commit on database. If you have created the notification just before you want to set the status, the notification does not exist on the database unitl time of commit. You should use the function BAPI_TRANSACTION_COMMIT before calling the function for updating status.&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;&lt;span class="lia-unicode-emoji" title=":monkey_face:"&gt;🐵&lt;/span&gt; Jacob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2004 14:57:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771849#M38349</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-20T14:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module working only in debug mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771850#M38350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add Statement SET UPDATE LOCAL at the beginning of the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VEnkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Oct 2004 01:57:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771850#M38350</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-21T01:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module working only in debug mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771851#M38351</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;&lt;/P&gt;&lt;P&gt;please tell me in which exit we can use this BAPI , I have to use the same functionality in  &lt;STRONG&gt;IW21&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Dhananjay Mishra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: dhananjay.93 on May 1, 2011 6:07 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 May 2011 16:06:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-working-only-in-debug-mode/m-p/771851#M38351</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-01T16:06:13Z</dc:date>
    </item>
  </channel>
</rss>

