<?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: Failed to update Batch characteristics using a program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913252#M57545</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laurens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of using the function module CUOB_GET_NUMBER, can you directly read INOB? I think the function module does a simle select, but in this case you may need to do a SELECT FROM INOB BYPASSING BUFFER, because your buffer is not yet updated with the latest values. So if you do the select bypassing the buffer, then you may get that value.&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;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 27 Mar 2005 01:37:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-03-27T01:37:30Z</dc:date>
    <item>
      <title>Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913245#M57538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I've build a program that confirms certain operations of Prd. Ords. During the confirmation, goodmovement is done and a batch is created according to this goodsmovement. The number of the batch is determined in the program itself, nog standard sap logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the bapi BAPI_PRODORDCONF_CREATE_TT. When succesfull, I perform the bapi commit. When this final step is performed (after the bapi commit), I update some of the batch characteristic using the determined batch. This is where the problem starts!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the bapi commit I perform a form for each characteristic I'd like to update. This form calls my own created function. This created function determines certain objectnumbers and other characteristics/class data and calls function CACL_OBJECT_VALIDATION_MAINT to update the characteristic and when succesfull, calls CACL_CLASSIFICATION_SAVE. All exceptions are taking care of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is the following: when I execute the program, NO batch characteristics are updated at all! Sometimes it gives a message that certain objects are locked but when I look at sm12, nothing unusual.&lt;/P&gt;&lt;P&gt;When I &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;debug&lt;/P&gt; the program and the function itself, the batch characteristics ARE updated. When I test the created function myself with se37 &lt;B&gt;&lt;P&gt;with or without&lt;/P&gt;&lt;/B&gt; debugging. the chars ARE updated.&lt;BR /&gt;&lt;BR /&gt;I've tried the following things and all failed to update the characteristics.&lt;BR /&gt;&lt;BR /&gt;- Commit work before I call my own created function&lt;BR /&gt;- Calling my function in new tasks or update tasks.&lt;BR /&gt;- Wait up till x seconds&lt;BR /&gt;- Commit and wait.&lt;BR /&gt;- Commit work after every call of my function&lt;BR /&gt;- Submitting the variables to a completely different program that calls the function.&lt;BR /&gt;- Calling a form in my own program that has the same functionality as the function that I wrote (bypassing the function call in case that was the problem).&lt;BR /&gt;- Leaving to transaction and using shared buffer with an internal table and thén calling a newly created program.&lt;BR /&gt;&lt;BR /&gt;All failed to update the characteristics unless I &lt;B&gt;&lt;P&gt;debug&lt;/P&gt;&lt;/B&gt; the program.&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? I think it is something simple but I just can't get a 'lock' on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers and thanks&lt;/P&gt;&lt;P&gt;Laurens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2005 09:29:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913245#M57538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-24T09:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913246#M57539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laurens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your two working ways are online - all the rest of your tries were background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know, why these 'CACL...' functions might need a GUI, but it's at least a hint for further researches. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2005 06:46:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913246#M57539</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2005-03-25T06:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913247#M57540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Place &amp;lt;b&amp;gt;SET UPDATE TASK LOCAL&amp;lt;/b&amp;gt; statement before BAPI_PRODORDCONF_CREATE_TT call.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2005 09:28:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913247#M57540</guid>
      <dc:creator>sergey_korolev</dc:creator>
      <dc:date>2005-03-25T09:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913248#M57541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm still having problems updating the characteristics despite using the local update, so no luck here. It is still only working when I place a breakpoint in the form that updates the characteristics. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other ideas? Here is a short flow in pseudo code of the calls:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bapi PO confirmation&lt;/P&gt;&lt;P&gt;Bapi trans. commit.&lt;/P&gt;&lt;P&gt;when subrc 0.&lt;/P&gt;&lt;P&gt;_______perform update_batch.&lt;/P&gt;&lt;P&gt;__________call function validation maint.&lt;/P&gt;&lt;P&gt;__________call function class. save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Laurens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2005 13:14:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913248#M57541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-25T13:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913249#M57542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the following (putting it your way):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET UPDATE TASK LOCAL.&lt;/P&gt;&lt;P&gt;Bapi PO confirmation&lt;/P&gt;&lt;P&gt;Bapi trans. commit.&lt;/P&gt;&lt;P&gt;when subrc 0.&lt;/P&gt;&lt;P&gt;SET UPDATE TASK LOCAL.&lt;/P&gt;&lt;P&gt;_______perform update_batch.&lt;/P&gt;&lt;P&gt;Bapi trans. commit.&lt;/P&gt;&lt;P&gt;__________call function validation maint.&lt;/P&gt;&lt;P&gt;__________call function class. save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;Update mode is reset to non local mode after each commit or rollback. So, you should do SET UPDATE TASK LOCAL before any piece of code which finishes with COMMIT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2005 13:24:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913249#M57542</guid>
      <dc:creator>sergey_korolev</dc:creator>
      <dc:date>2005-03-25T13:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913250#M57543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still no result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've narrowed the problem down to the following. In my own routine to update the batch characteristics (BC) I also call function CUOB_GET_NUMBER to obtain the object number. This objectnumber should be read from the inob table. When I get to the point that is has to obtain this number, it isn't present in the inob (or mch1) table at that precise moment. I'm to early I think (or sap is to slow &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; ). One possibility is to keep looping at the mch1 or inob table until there is a hit for the specific matnr batch combination, but that's not a nice solution in my opinion. Any more ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers and thanks&lt;/P&gt;&lt;P&gt;Laurens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2005 21:03:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913250#M57543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-25T21:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913251#M57544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you experience different behavior of the program in debug mode and in online processing (some locks still locked, or some just created objects not found) then it's most likely the problem is in asynchronous updates. Maybe you should post some code fragments?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2005 09:11:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913251#M57544</guid>
      <dc:creator>sergey_korolev</dc:creator>
      <dc:date>2005-03-26T09:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913252#M57545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laurens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of using the function module CUOB_GET_NUMBER, can you directly read INOB? I think the function module does a simle select, but in this case you may need to do a SELECT FROM INOB BYPASSING BUFFER, because your buffer is not yet updated with the latest values. So if you do the select bypassing the buffer, then you may get that value.&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;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Mar 2005 01:37:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913252#M57545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-27T01:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913253#M57546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Srinivas,&lt;/P&gt;&lt;P&gt;   thank you for your reply. Unfortunatly still no positive result with bypassing buffer. The function of get_number does also use a parameter that makes sure it looks at the database first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know it is a problem with the updates. I can use a loop that keeps reading from the db until the record is found or a certain amount of seconds has passed. But not the best solution I think &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are a few code snippets, maybe it 'll help (some parts are left out):&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;            testrun            = ' '&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            return             = it_returnconf&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            timetickets        = it_timetickets&lt;/P&gt;&lt;P&gt;            goodsmovements     = it_goodsmovement&lt;/P&gt;&lt;P&gt;            link_conf_goodsmov = it_link_conf_goodsmov&lt;/P&gt;&lt;P&gt;            detail_return      = it_detail_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT it_detail_return[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    READ TABLE it_detail_return WITH KEY type = 'E'.&lt;/P&gt;&lt;P&gt;    ...&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;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   WAIT          = 'X'&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   RETURN        = return2.&lt;/P&gt;&lt;P&gt;          .&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;When finished, call form to update batch that was created by the goodsmovement of the ...CREATE_TT.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM adjust_batch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(code of adjust batch).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Objectnumber is combination of matnr and charg.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;shift lo_objectnumber right deleting trailing space.&lt;/P&gt;&lt;P&gt;translate lo_objectnumber using ' 0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'CUOB_GET_NUMBER'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;            class_type       = '023'&lt;/P&gt;&lt;P&gt;            object_id        = lo_object&lt;/P&gt;&lt;P&gt;            table            = 'MCH1'&lt;/P&gt;&lt;P&gt;            I_read_db_first  = 'X'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            object_number    = lo_objectnumber&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            lock_problem     = 1&lt;/P&gt;&lt;P&gt;            object_not_found = 2&lt;/P&gt;&lt;P&gt;            OTHERS           = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;     ...&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE * FROM kssk&lt;/P&gt;&lt;P&gt;                WHERE objek  = lo_objectnumber&lt;/P&gt;&lt;P&gt;                AND   klart  = '023'&lt;/P&gt;&lt;P&gt;                AND   mafid  = 'O'.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT SINGLE * FROM klah&lt;/P&gt;&lt;P&gt;                 WHERE clint = kssk-clint.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  etc....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********&lt;/P&gt;&lt;P&gt;So I've tried all the hints and tips and things I could come up with but the fact remains that the inob / mch1 table is not updated during the commit after the create_tt bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any more ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers and happy Eastern!&lt;/P&gt;&lt;P&gt;Laurens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Mar 2005 16:15:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913253#M57546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-27T16:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913254#M57547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laurens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to do the following. Make sure that the program buffer is deleted by changing the roll area.You can accomplish this by logging off and then logging in again for the BAPI process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you have to adhere to the following procedure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The call of the BAPI_PRODORDCONF_CREATE_TT and the subsequent call of BAPI BAPI_TRANSACTION_COMMIT or in case of an error of BAPI BAPI_TRANSACTION_ROLLBACK has to be included in a function module.&lt;/P&gt;&lt;P&gt;2. This function module must be called with command CALL FUNCTION func DESTINATION 'NONE'. As a result, the system opens a new roll area.&lt;/P&gt;&lt;P&gt;3. Then you must call function module RFC_CONNECTION_CLOSE.This function module closes the roll area of the function module.As a result, a new roll area is opened when you call a function module with DESTINATIN 'NONE' for the next time, and thus, for example, no more internal buffer data is available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your situation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION Z_BAPI_PRODORDCONF_CREATE_TT DESTINATION 'NONE'&lt;/P&gt;&lt;P&gt;&amp;lt;the same import/export/exceptions sections of BAPI_PRODORDCONF_CREATE_TT&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION RFC_CONNECTION_CLOSE&lt;/P&gt;&lt;P&gt;EXPORTING destination = 'NONE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_BAPI_PRODORDCONF_CREATE_TT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   IF 'no errors'.&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;   ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&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;Maxim.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2005 02:54:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913254#M57547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-28T02:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913255#M57548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laurens, &lt;/P&gt;&lt;P&gt;Happy Easter to you too &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I know it's a side problem, but to be honest, I don't like at all the way you calculate object number. I think you should better do this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data:
  begin of objnum,
    matnr type mara-matnr,
    charg type mch1-charg,
  end of objnum.
  objnum-matnr = &amp;lt;your material num in internal format&amp;gt;.
  objnum-charg = &amp;lt;your batch num in internal format&amp;gt;.

  lo_object = objnum.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;shift lo_objectnumber right deleting trailing space.
translate lo_objectnumber using ' 0'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is it a typo that you mentioned here &amp;lt;b&amp;gt;lo_objectnumber&amp;lt;/b&amp;gt; instead of &amp;lt;b&amp;gt;lo_object&amp;lt;/b&amp;gt;? (lo_objectnumber must be a result of 'CUOB_GET_NUMBER' call).&lt;/P&gt;&lt;P&gt;Besides this I insist that doing updates in local mode guarantees that after firing COMMIT WORK all the data affected by the update must be in place in the database. And to do this SET UPDATE TASK LOCAL should be placed before CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT. Also the same should be done in the FORM adjust_batch.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2005 08:10:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913255#M57548</guid>
      <dc:creator>sergey_korolev</dc:creator>
      <dc:date>2005-03-28T08:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913256#M57549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sergei,&lt;/P&gt;&lt;P&gt;    thanks for the reply. Never thought about the objnum statement that you used. I just copied code that was already used in another program. But those are small details &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;, uhm, btw: isn't there a conflict type when calling the function using the objnum definition like you used? It needs a character type. But again, small details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About the update task local: I tried this statement in different locations (before the bapi and the call in the update_batch itself), but the result was none.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll try the method of calling the bapi for the create_tt in a separate function module and see what happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your time and effort!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers (from 2th eastern day in the Netherlands &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;Laurens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2005 09:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913256#M57549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-28T09:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913257#M57550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Weird enough..&lt;/P&gt;&lt;P&gt;Concerning type conflict, certainly you cannot pass objnum structure as a parameter into the function module, you have to use intermediate variable lo_object. Or else you may do something like this:&lt;/P&gt;&lt;P&gt;lo_object(18) = matnr.&lt;/P&gt;&lt;P&gt;lo_object+18(10) = charg.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2005 10:13:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913257#M57550</guid>
      <dc:creator>sergey_korolev</dc:creator>
      <dc:date>2005-03-28T10:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to update Batch characteristics using a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913258#M57551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOL! To be honest, the lo_objnum+18 stuff is one of the parts that I left out &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Concatenate doesn't work all the time because of the char&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;that can be in a material.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  lo_object        = p_p_gl_matnr.&lt;/P&gt;&lt;P&gt;  lo_object+18(10) = p_p_gl_batch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The part that I did post (about the translating) was only used when I did a direct selection on the mch1 table and shouldn't be there in combination with the cuob_getnumber function. That's the disadvantage of trying different methods and only commenting them out instead of deleting them. To much code &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good that you mentioned it btw &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;Laurens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2005 10:20:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failed-to-update-batch-characteristics-using-a-program/m-p/913258#M57551</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-28T10:20:00Z</dc:date>
    </item>
  </channel>
</rss>

