<?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: BAPI_COMMIT not working in background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291091#M499862</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Naren,&lt;/P&gt;&lt;P&gt;I am checking in the Bapi return table for messages with type 'E'. I am not sure of abort. Anyways the contracts that are skipped do not appear in the bapi_ret table either successfully or with errors. They just dissappear of the spool. I am not sure why this is happening. I appreciate your prompt responses. Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2007 17:08:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-15T17:08:09Z</dc:date>
    <item>
      <title>BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291084#M499855</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;I am using BAPI_SALESORDER_CHANGE in my program to update field VBKD-EMPST and additional custom status (VBKD-KDKG5) in Contracts and then calling BAPI_COMMIT. I have a job scheduled in the background for this Program. &lt;/P&gt;&lt;P&gt;After the program has finished running we found that some of the contracts are not updated. This occurs randomly. The same program works fine and all contracts are updated correctly if running in the fore ground. There's nothing peculiar about the contracts that are skipped. When we run the same program in the foreground for the skipped contracts, they are updated correctly. Please provide your valuable suggestions as this is an Urgent Issue and has been buggibg us for a very long time.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 15:19:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291084#M499855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T15:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291085#M499856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you confirmed that no users have the failed contracts opened in Change Mode - a record lock would cause this problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 15:39:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291085#M499856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T15:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291086#M499857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or even another background process that has some orders opened up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 15:40:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291086#M499857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T15:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291087#M499858</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;Do one thing..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the bapi call BAPI_SALESORDER_CHANGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the return internal table..And check for errors..And write it...So when run in background you will know what exactly is the error by checking the spool..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    .......
    TABLES
        RETURN = T_RETURN.

LOOP AT T_RETURN WHERE TYPE = 'E' OR TYPE = 'A'.
  WRITE: / T_RETURN-MESSAGE.
ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 15:43:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291087#M499858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T15:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291088#M499859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Raj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This BAPI also has a Return Table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;*"      RETURN STRUCTURE  BAPIRET2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your custom prog, add code to write out this int table if an error (type E) is encountered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 15:46:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291088#M499859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T15:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291089#M499860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Naren,&lt;/P&gt;&lt;P&gt;Thanks for the reply. I am checking for the errors in the Internal table after passing it to the BAPI, but the problem is the contracts that are getting skipped are not erroring out or listed in the spool. They do not even appear on the spool list of the succesfully updated Contracts. They are just getting skipped and when the same contracts are run through the program in foreground they get updated correctly. &lt;/P&gt;&lt;P&gt;Any suggestions??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 16:06:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291089#M499860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T16:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291090#M499861</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;Ok..You are displaying successfully updated contracts...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also display the messages in the internal table T_RETURN if there are any messages of type error or abort..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That way you will get the exact description of why the contract didn't get updated..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 16:10:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291090#M499861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T16:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291091#M499862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Naren,&lt;/P&gt;&lt;P&gt;I am checking in the Bapi return table for messages with type 'E'. I am not sure of abort. Anyways the contracts that are skipped do not appear in the bapi_ret table either successfully or with errors. They just dissappear of the spool. I am not sure why this is happening. I appreciate your prompt responses. Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 17:08:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291091#M499862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T17:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291092#M499863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"Anyways the contracts that are skipped do not appear in the bapi_ret table either successfully or with errors."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you KNOW that these contracts are being selected for processing?  Are you assuming that they are OR do you create a processing log as you go along?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 17:11:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291092#M499863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T17:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291093#M499864</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;Yes..John is correct.Are you sure the contracts are getting selected??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 17:16:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291093#M499864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T17:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291094#M499865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John &lt;/P&gt;&lt;P&gt;That is the issue here. I am not sure whether they are getting selected or not in the background. But when I run the program in the foreground with the same contracts they are selected and updated. I see no reason why these contracts would be selected in foreground and not in back ground if thats the issue. &lt;/P&gt;&lt;P&gt;One more thing - If I run the program in the background seperately for each contract then it does get updated. Its only when a range of Contracts are selected some random contracts out of them are skipped. Also before I pass the data from the internal table to the BAPI, I create a report with whatever data I have in the ITAB but the contract that are bskipped do not appear on this report also when running in the background. As far as my knowledge goes, if something is wrong with the selection criteria it should not work in the foreground and in the background. I am not sure why this is behaving differently.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 19:32:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291094#M499865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T19:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291095#M499866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Raj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They would absolutely not be selected in b/g IF they had not been commited to the DB first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If they were committed after the b/g job finished, and then the f/g activity was executed... this would scenario would occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you POSITIVE (without question) that the contracts have been fully saved/commited before executing the b/g task?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 19:51:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291095#M499866</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T19:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291096#M499867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Raj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They would absolutely not be selected in b/g IF they had not been commited to the DB first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If they were committed after the b/g job finished, and then the f/g activity was executed... this would scenario would occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you POSITIVE (without question) that the contracts have been fully saved/commited before executing the b/g task? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;I do appreciate your prompt reponses but I dont understand what you mean here.&lt;/P&gt;&lt;P&gt;'They would absolutely not be selected in b/g IF they had not been commited to the DB first.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Are you POSITIVE (without question) that the contracts have been fully saved/commited before executing the b/g task? ' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The purpose of the program is to select contracts from database, perform some validations, see if they have status closed or open. If they are open, we need to update those contracts with the quantity and the custom status field and commit it to the DB. Why would they have to be committed to the DB first??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 19:59:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291096#M499867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T19:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291097#M499868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are gathering these contracts using a SELECT statement, they MUST be saved fully first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How are you gathering these Contracts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 20:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291097#M499868</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T20:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291098#M499869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am gathering the contracts from the db tables using Select statement into an ITAB . Hence this Select will return only those contracts that are in the DB tables, in other words committed Contracts. I loop at this ITAB, perform validations to ignore invalid and rejected contracts and pass the valid contracts record by record to the bapi and commit it to the db.&lt;/P&gt;&lt;P&gt;Now from these valid contracts in the ITAB that are passed to the BAPI some of them are getting skipped in b/g.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 20:18:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291098#M499869</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T20:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_COMMIT not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291099#M499870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please provide the SQL and what you believe it's business intention to be.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 20:25:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit-not-working-in-background/m-p/2291099#M499870</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T20:25:28Z</dc:date>
    </item>
  </channel>
</rss>

