<?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: Update Terminated when executing BAPI_SERVNOT_ADD_DATA in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-terminated-when-executing-bapi-servnot-add-data/m-p/6975994#M1491994</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jayesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer. I tried but ufortunately get the same Update Terminated error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached my code  below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ls_qmur-CAUSE_SORT_NO  = '0001'.
    ls_qmur-CAUSE_KEY = '0001'.
    ls_qmur-ITEM_KEY = '0001'.
    ls_qmur-CAUSETEXT = 'HVACSYS'.
    ls_qmur-CAUSE_CODEGRP  = 'HVACSYS' .
    ls_qmur-CAUSE_CODE = '002'.
    ls_qmur-ITEM_SORT_NO = '0001'.
    APPEND ls_qmur to lt_qmur.


     ls_qmur_x-CAUSE_SORT_NO = 'X'.
     ls_qmur_x-CAUSE_KEY = 'X'.
     ls_qmur-ITEM_KEY = 'X'.
     ls_qmur-ITEM_SORT_NO = 'X'.
     ls_qmur_x-CAUSETEXT = 'X'.
     ls_qmur_x-CAUSE_CODEGRP = 'X'.
     ls_qmur_x-CAUSE_CODE = 'X'.
    APPEND ls_qmur_x to lt_qmur_x.

CALL FUNCTION 'BAPI_SERVNOT_MODIFY_DATA'
  EXPORTING
    number                   = number
*   NOTIFHEADER              =
*   NOTIFHEADER_X            =
* IMPORTING
*   NOTIFHEADER_EXPORT       =
TABLES
*   NOTIFITEM                =
*   NOTIFITEM_X              =
   NOTIFCAUS                = lt_qmur
   NOTIFCAUS_X              = lt_qmur_x
*   NOTIFACTV                =
*   NOTIFACTV_X              =
*   NOTIFTASK                =
*   NOTIFTASK_X              =
*   NOTIFPARTNR              =
*   NOTIFPARTNR_X            =
*   RETURN                   =
          .

  CALL FUNCTION 'BAPI_SERVNOT_ADD_DATA'
    EXPORTING
      number                  = number
*     I_BAPI                  = ' '
*  IMPORTING
*    NOTIFHEADER             = notif_header
*     NOTIFHDTEXT             =
   TABLES
*     NOTFULLTXT              =
*     NOTITEM                 =
     NOTIFCAUS               = lt_qmur
*     NOTIFACTV               =
*     NOTIFTASK               =
*     NOTIFPARTNR             =
*     KEY_RELATIONSHIPS       =
     RETURN                  = et_return
            .

    call function 'BAPI_SERVNOT_SAVE'
         exporting
              number = number
         tables
              return = et_return.

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' "commit and wait for update
     EXPORTING
       wait          = 'X'
* IMPORTING
*   RETURN        =
              .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Narayani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 May 2010 04:33:44 GMT</pubDate>
    <dc:creator>Nkrish</dc:creator>
    <dc:date>2010-05-31T04:33:44Z</dc:date>
    <item>
      <title>Update Terminated when executing BAPI_SERVNOT_ADD_DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-terminated-when-executing-bapi-servnot-add-data/m-p/6975992#M1491992</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;I have used the BAPI_SERVNOT_ADD_DATA to add the cause codes in IW52 transaction. After the BAPI I use the BAPI_SERVNOT_SAVE and Then BAPI_TRANSACTION_COMMIT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont need the partner update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing two problems :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I dont write the sort numbers i.e ITEM_KEY or POSNR it gives me error : Sort number not entered&lt;/P&gt;&lt;P&gt;if I enter some number like 0010 or 0020 then update gets terminated and when I check sm13, ST22 for the reason it gives error :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAPSQL_ARRAY_INSERT_DUPREC in the PM_PARTNER_UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone please help me with this as I am not able to understand why does it need partner when updating causes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This happens with BAPI_SERVNOT_MODIFY_DATA also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using these BAPI immediately after CREATE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Narayani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 05:20:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-terminated-when-executing-bapi-servnot-add-data/m-p/6975992#M1491992</guid>
      <dc:creator>Nkrish</dc:creator>
      <dc:date>2010-05-28T05:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update Terminated when executing BAPI_SERVNOT_ADD_DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-terminated-when-executing-bapi-servnot-add-data/m-p/6975993#M1491993</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;The sort field must be filled in order to create items, causes, task or activities. When creating a cause the sort field for the item must also be filled. The combination of sort field item/cause, item/task or item/activity must be unique within the same notification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the documentation available for BAPI_SERVNOT_CREATE. The same applies for BAPI_SERVNOT_ADD_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Jayesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 08:36:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-terminated-when-executing-bapi-servnot-add-data/m-p/6975993#M1491993</guid>
      <dc:creator>jayesh_gupta</dc:creator>
      <dc:date>2010-05-28T08:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Update Terminated when executing BAPI_SERVNOT_ADD_DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-terminated-when-executing-bapi-servnot-add-data/m-p/6975994#M1491994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jayesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer. I tried but ufortunately get the same Update Terminated error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached my code  below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ls_qmur-CAUSE_SORT_NO  = '0001'.
    ls_qmur-CAUSE_KEY = '0001'.
    ls_qmur-ITEM_KEY = '0001'.
    ls_qmur-CAUSETEXT = 'HVACSYS'.
    ls_qmur-CAUSE_CODEGRP  = 'HVACSYS' .
    ls_qmur-CAUSE_CODE = '002'.
    ls_qmur-ITEM_SORT_NO = '0001'.
    APPEND ls_qmur to lt_qmur.


     ls_qmur_x-CAUSE_SORT_NO = 'X'.
     ls_qmur_x-CAUSE_KEY = 'X'.
     ls_qmur-ITEM_KEY = 'X'.
     ls_qmur-ITEM_SORT_NO = 'X'.
     ls_qmur_x-CAUSETEXT = 'X'.
     ls_qmur_x-CAUSE_CODEGRP = 'X'.
     ls_qmur_x-CAUSE_CODE = 'X'.
    APPEND ls_qmur_x to lt_qmur_x.

CALL FUNCTION 'BAPI_SERVNOT_MODIFY_DATA'
  EXPORTING
    number                   = number
*   NOTIFHEADER              =
*   NOTIFHEADER_X            =
* IMPORTING
*   NOTIFHEADER_EXPORT       =
TABLES
*   NOTIFITEM                =
*   NOTIFITEM_X              =
   NOTIFCAUS                = lt_qmur
   NOTIFCAUS_X              = lt_qmur_x
*   NOTIFACTV                =
*   NOTIFACTV_X              =
*   NOTIFTASK                =
*   NOTIFTASK_X              =
*   NOTIFPARTNR              =
*   NOTIFPARTNR_X            =
*   RETURN                   =
          .

  CALL FUNCTION 'BAPI_SERVNOT_ADD_DATA'
    EXPORTING
      number                  = number
*     I_BAPI                  = ' '
*  IMPORTING
*    NOTIFHEADER             = notif_header
*     NOTIFHDTEXT             =
   TABLES
*     NOTFULLTXT              =
*     NOTITEM                 =
     NOTIFCAUS               = lt_qmur
*     NOTIFACTV               =
*     NOTIFTASK               =
*     NOTIFPARTNR             =
*     KEY_RELATIONSHIPS       =
     RETURN                  = et_return
            .

    call function 'BAPI_SERVNOT_SAVE'
         exporting
              number = number
         tables
              return = et_return.

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' "commit and wait for update
     EXPORTING
       wait          = 'X'
* IMPORTING
*   RETURN        =
              .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Narayani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 May 2010 04:33:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-terminated-when-executing-bapi-servnot-add-data/m-p/6975994#M1491994</guid>
      <dc:creator>Nkrish</dc:creator>
      <dc:date>2010-05-31T04:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Update Terminated when executing BAPI_SERVNOT_ADD_DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-terminated-when-executing-bapi-servnot-add-data/m-p/6975995#M1491995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using BAPI_TRANSACTION_COMMIT with parameter WAIT = space instead of 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Jayesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jun 2010 14:37:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-terminated-when-executing-bapi-servnot-add-data/m-p/6975995#M1491995</guid>
      <dc:creator>jayesh_gupta</dc:creator>
      <dc:date>2010-06-02T14:37:30Z</dc:date>
    </item>
  </channel>
</rss>

