<?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_ALM_ORDER_MAINTAIN erroring when creating multiple components. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848160#M1133863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the documentation about this bapi is in contrary to many bapis very extesnsive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that you have &lt;/P&gt;&lt;P&gt;IT_METHODS-METHOD = 'CREATE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of &lt;/P&gt;&lt;P&gt;IT_METHODS-METHOD = 'CHANGE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since you're code it totally unreadable thanks to sdn policy I can't understand it is to hard to read and to see clearly if that's the mistake&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;arthur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Mar 2010 14:42:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-18T14:42:57Z</dc:date>
    <item>
      <title>BAPI_ALM_ORDER_MAINTAIN erroring when creating multiple components.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848158#M1133861</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 am trying to update multiple components for a work order using BAPI_ALM_ORDER_MAINTAIN.&lt;/P&gt;&lt;P&gt;BAPI returns success message but later I am getting the update termination error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when checked from SM13 transaction, the error is due to "SAPSQL_ARRAY_INSERT_DUPREC". This is happening because whenever a component is added the reservation item table RESB will also be updated. To the RESB table duplicate entries are going with the same reservation number and item number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am passing the reservation data (Reservation number and item) in IT_COMPONENT but could not find the field in the update table (IT_COMPONENT_UP). Just guessing that this would be the cause of the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help in solving this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am pasting my code below for reference. Please let me know if am doing anything wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks In Advance,&lt;/P&gt;&lt;P&gt;Vinutha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************************************************************************************************************&lt;/P&gt;&lt;P&gt;PARAMETER: ODR_NO LIKE BAPI_ALM_ORDER_HEADERS_I-ORDERID. " Order Number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt; V_RSPOS TYPE RESB-RSPOS VALUE '0001',&lt;/P&gt;&lt;P&gt; v_item_num type RESB-RSPOS value '0010',&lt;/P&gt;&lt;P&gt; v_item_char(4) type c,&lt;/P&gt;&lt;P&gt; lv_line type i,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*Get details for Order&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_ALM_ORDER_GET_DETAIL'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    NUMBER               = ODR_NO&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    ES_HEADER        = ES_HEADER&lt;/P&gt;&lt;P&gt;    ES_SRVDATA      = ES_SRVDATA&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    ET_PARTNER          = ET_PARTNER&lt;/P&gt;&lt;P&gt;    ET_OPERATIONS    = ET_OPERATIONS&lt;/P&gt;&lt;P&gt;    ET_COMPONENTS  = ET_COMP&lt;/P&gt;&lt;P&gt;    ET_RELATIONS       = ET_RELATIONS&lt;/P&gt;&lt;P&gt;    ET_TEXTS               = ET_TEXTS&lt;/P&gt;&lt;P&gt;    ET_TEXT_LINES      = ET_TEXT_LINES&lt;/P&gt;&lt;P&gt;    ET_PRTS                = ET_PRTS&lt;/P&gt;&lt;P&gt;    ET_COSTS_SUM    = ET_COSTS_SUM&lt;/P&gt;&lt;P&gt;    ET_COSTS_DETAILS = ET_COST_DET&lt;/P&gt;&lt;P&gt;    RETURN                    = RETURN1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ table ET_OPERATIONS index 1.&lt;/P&gt;&lt;P&gt;If sy-subrc = 0.&lt;/P&gt;&lt;P&gt; concatenate ODR_NO ET_OPERATIONS-ACTIVITY ET_OPERATIONS-SUB_ACTIVITY into IT_METHODS-OBJECTKEY.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT GT_EXT_OPERATIONS INTO GW_OPERATIONS.                                 &lt;/P&gt;&lt;P&gt;       v_item_char = v_item_num.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-RESERV_NO = ES_HEADER-RESERV_NO.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-RES_ITEM  = V_RSPOS.                    &lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-MATERIAL = V_MATNR.           &lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-PLANT    = GW_OPERATIONS-PLANT.     &lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-ITEM_CAT = 'N'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-ITEM_NUMBER = v_item_char.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-ITEM_TEXT1 = 'TEST'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-ACTIVITY = GW_OPERATIONS-ACTIVITY.                    &lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-PUR_GROUP = GW_OPERATIONS-PUR_GROUP.                  &lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-MATL_GROUP = GW_OPERATIONS-MATL_GROUP.               &lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-VENDOR_NO = GW_OPERATIONS-VENDOR_NO.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-TRACKINGNO = 'Maint_bill'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-PURCH_ORG = GW_OPERATIONS-PURCH_ORG.                  &lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-REQUIREMENT_QUANTITY = GW_OPERATIONS-WORK_ACTIVITY.    &lt;/P&gt;&lt;P&gt;      IT_COMPONENTS-REQUIREMENT_QUANTITY_UNIT = V_meins.                &lt;/P&gt;&lt;P&gt;      APPEND IT_COMPONENTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      V_RSPOS = V_RSPOS + 1.&lt;/P&gt;&lt;P&gt;      v_item_num = v_item_num + 10.&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;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table IT_COMPONENTS[] lines lv_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do lv_line times.&lt;/P&gt;&lt;P&gt;  IT_METHODS-METHOD = 'CREATE'.&lt;/P&gt;&lt;P&gt;  IT_METHODS-REFNUMBER = '000001'.&lt;/P&gt;&lt;P&gt;  IT_METHODS-OBJECTTYPE = 'COMPONENT'.&lt;/P&gt;&lt;P&gt;  APPEND IT_METHODS.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CLEAR: IT_METHODS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IT_METHODS-METHOD = 'SAVE'.&lt;/P&gt;&lt;P&gt;  APPEND IT_METHODS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do lv_line times.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-MATERIAL = 'X'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-PLANT    = 'X'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-ITEM_CAT = 'X'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-ITEM_NUMBER = 'X'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-ITEM_TEXT1 = 'X'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-ACTIVITY = 'X'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-PUR_GROUP = 'X'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-MATL_GROUP = 'X'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-VENDOR_NO = 'X'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-TRACKINGNO = 'X'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-PURCH_ORG = 'X'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-REQUIREMENT_QUANTITY = 'X'.&lt;/P&gt;&lt;P&gt;      IT_COMPONENTS_UP-REQUIREMENT_QUANTITY_UNIT = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND IT_COMPONENTS_UP.&lt;/P&gt;&lt;P&gt; enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      IT_METHODS       = IT_METHODS&lt;/P&gt;&lt;P&gt;      IT_HEADER        = IT_HEADER&lt;/P&gt;&lt;P&gt;      IT_HEADER_UP     = IT_HEADER_UP&lt;/P&gt;&lt;P&gt;      IT_PARTNER       = IT_PARTNERS&lt;/P&gt;&lt;P&gt;      IT_PARTNER_UP    = IT_PARTNERS_UP&lt;/P&gt;&lt;P&gt;      IT_OPERATION     = IT_OPERATION&lt;/P&gt;&lt;P&gt;      IT_OPERATION_UP  = IT_OPERATION_UP&lt;/P&gt;&lt;P&gt;      IT_COMPONENT     = IT_COMPONENTS&lt;/P&gt;&lt;P&gt;      IT_COMPONENT_UP  = IT_COMPONENTS_UP&lt;/P&gt;&lt;P&gt;      IT_HEADER_SRV    = IT_HEADER_SRV&lt;/P&gt;&lt;P&gt;      IT_HEADER_SRV_UP = IT_HEADER_SRV_UP&lt;/P&gt;&lt;P&gt;      RETURN           = RETURN.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 11:15:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848158#M1133861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T11:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ALM_ORDER_MAINTAIN erroring when creating multiple components.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848159#M1133862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinutha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i m facing the same issue now (Creating changing, multiple, deleting components).&lt;/P&gt;&lt;P&gt;can you please tell me,&lt;/P&gt;&lt;P&gt;how you ended with this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srikanth Pappu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 08:23:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848159#M1133862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T08:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ALM_ORDER_MAINTAIN erroring when creating multiple components.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848160#M1133863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the documentation about this bapi is in contrary to many bapis very extesnsive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that you have &lt;/P&gt;&lt;P&gt;IT_METHODS-METHOD = 'CREATE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of &lt;/P&gt;&lt;P&gt;IT_METHODS-METHOD = 'CHANGE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since you're code it totally unreadable thanks to sdn policy I can't understand it is to hard to read and to see clearly if that's the mistake&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;arthur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 14:42:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848160#M1133863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T14:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ALM_ORDER_MAINTAIN erroring when creating multiple components.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848161#M1133864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arthur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have not posted my code, &lt;/P&gt;&lt;P&gt;i could understand the methods, i have suceeded in using those methods for different object type individually&lt;/P&gt;&lt;P&gt;now my issue is &lt;/P&gt;&lt;P&gt;when i m trying to use the same method for 2 object type&lt;/P&gt;&lt;P&gt;Example - when i m trying to create to 2 components for an order, i m failing&lt;/P&gt;&lt;P&gt;only the first components is getting created,&lt;/P&gt;&lt;P&gt;prior to this i have appened the method "Create" for object type "Component" twice,&lt;/P&gt;&lt;P&gt;still the first compnent in the internal table is getting created twice, (but my requiremnt is to create, change, delete mutiple components at once)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srikanth Pappu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 06:39:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848161#M1133864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-19T06:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ALM_ORDER_MAINTAIN erroring when creating multiple components.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848162#M1133865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please post this as a new question otherwise it's getting confusing if new questions are raised under existing ones&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;arthur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Mar 2010 09:31:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848162#M1133865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-22T09:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ALM_ORDER_MAINTAIN erroring when creating multiple components.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848163#M1133866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have spent a lot of time (toooo much!) to get this running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to fill method-refnumber with the table index of the component entry!!!!&lt;/P&gt;&lt;P&gt;The object key consists of order number and operation only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using this beast to process networks (with a trick) to create/change operations or create components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The trick:&lt;/P&gt;&lt;P&gt;- Enhancement to transfer field not included within bapi parameter structure&lt;/P&gt;&lt;P&gt;- global assign to avoid access to T350.&lt;/P&gt;&lt;P&gt;Now it works like a charm.&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;Andreas Groß&lt;/P&gt;&lt;P&gt;alogis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jun 2010 16:28:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-alm-order-maintain-erroring-when-creating-multiple-components/m-p/4848163#M1133866</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-09T16:28:26Z</dc:date>
    </item>
  </channel>
</rss>

