<?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: How to Update Mutiple WBS elements in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720630#M1455355</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ITAB is your internal table where you have your data. Now create internal table IT_WBS and &lt;/P&gt;&lt;P&gt;work area WA_WBS of type BAPI_BUS2054_CHG. And internal table IT_WBS_UPD and WA_WBS_UPD of&lt;/P&gt;&lt;P&gt;type BAPI_BUS2054_UPD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB into WA.&lt;/P&gt;&lt;P&gt; WA_WBS-WBS_ELEMENT = WA-WBS_ELEMENT.&lt;/P&gt;&lt;P&gt; WA_WBS-PROFIT_CTR  = WA-PROFIT_CTR.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; WA_WBS_UPD-WBS_ELEMENT = WA-WBS_ELEMENT.&lt;/P&gt;&lt;P&gt; WA_WBS_UPD-PROFIT_CTR  = 'X'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; APPEND WA_WBS     TO IT_WBS.&lt;/P&gt;&lt;P&gt; APPEND WA_WBS_UPD TO IT_WBS_UPD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now Call the FMs in the order &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_PS_INITIALIZATION&lt;/P&gt;&lt;P&gt;BAPI_BUS2054_CHANGE_MULTI&lt;/P&gt;&lt;P&gt;BAPI_PS_PRECOMMIT&lt;/P&gt;&lt;P&gt;BAPI_TRANSACTION_COMMIT  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;passing the above filled up table in the FM BAPI_BUS2054_CHANGE_MULTI .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sarbajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Mar 2010 13:12:44 GMT</pubDate>
    <dc:creator>sarbajitm</dc:creator>
    <dc:date>2010-03-16T13:12:44Z</dc:date>
    <item>
      <title>How to Update Mutiple WBS elements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720627#M1455352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to update multiple WBS elements with profit center (PRCTR) field. I created an ABAP program for this requirement which makes use of the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_PS_INITIALIZATION&lt;/P&gt;&lt;P&gt;BAPI_BUS2054_CHANGE_MULTI&lt;/P&gt;&lt;P&gt;BAPI_PS_PRECOMMIT&lt;/P&gt;&lt;P&gt;BAPI_TRANSACTION_COMMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BAPIs are called inside the loop. The program works for the 1st record but it will cause a dump for the succeeding records because of an error 'Error in individual BAPIs or precommit: posting not possible' after calling BAPI_PS_PRECOMMIT the second time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can BAPI_BUS2054_CHANGE_MULTI be used to update multiple WBS elements? I would appreciate it if you could show me sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your feedback is very much appreciated.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 12:29:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720627#M1455352</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-16T12:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Update Mutiple WBS elements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720628#M1455353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Keep only BAPI_BUS2054_CHANGE_MULTI inside the loop.&lt;/P&gt;&lt;P&gt;I hope in this way you may solve the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sarbajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 12:40:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720628#M1455353</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2010-03-16T12:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Update Mutiple WBS elements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720629#M1455354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See FM  BAPI_BUS2054_CHANGE_MULTI have IT_WBS_ELEMENT and IT_UPDATE_WBS_ELEMENT parameter in the tables statement.The WBS Elements that you want to update under a Project Definition for that first of all you have to create 2 internal table of structure BAPI_BUS2054_CHG and BAPI_BUS2054_UPD. Now in the 1st internal table you have to fill up the necessary data and in the 2nd internal Table you have to put an 'X' for the corresponding fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like in 1st Internal table you have filled up data like the following one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A                     B                 C              D               E &lt;/P&gt;&lt;P&gt;11                                       13                            15&lt;/P&gt;&lt;P&gt;21                  22                                24&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the 2nd Internal Table you have to put X like the following one:&lt;/P&gt;&lt;P&gt;A                     B                 C             D               E &lt;/P&gt;&lt;P&gt;11                                       X                              X&lt;/P&gt;&lt;P&gt;21                   X                                X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here 11 and 21 are suppose 2 WBS element.(For 11  13 under C and 15 under E,For 21  22 under B 24 under D.Similarly for 11 Xs are under C and E and for 21 Xs are under B and D)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I'm able to help you a little bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sarbajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 12:51:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720629#M1455354</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2010-03-16T12:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to Update Mutiple WBS elements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720630#M1455355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ITAB is your internal table where you have your data. Now create internal table IT_WBS and &lt;/P&gt;&lt;P&gt;work area WA_WBS of type BAPI_BUS2054_CHG. And internal table IT_WBS_UPD and WA_WBS_UPD of&lt;/P&gt;&lt;P&gt;type BAPI_BUS2054_UPD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB into WA.&lt;/P&gt;&lt;P&gt; WA_WBS-WBS_ELEMENT = WA-WBS_ELEMENT.&lt;/P&gt;&lt;P&gt; WA_WBS-PROFIT_CTR  = WA-PROFIT_CTR.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; WA_WBS_UPD-WBS_ELEMENT = WA-WBS_ELEMENT.&lt;/P&gt;&lt;P&gt; WA_WBS_UPD-PROFIT_CTR  = 'X'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; APPEND WA_WBS     TO IT_WBS.&lt;/P&gt;&lt;P&gt; APPEND WA_WBS_UPD TO IT_WBS_UPD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now Call the FMs in the order &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_PS_INITIALIZATION&lt;/P&gt;&lt;P&gt;BAPI_BUS2054_CHANGE_MULTI&lt;/P&gt;&lt;P&gt;BAPI_PS_PRECOMMIT&lt;/P&gt;&lt;P&gt;BAPI_TRANSACTION_COMMIT  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;passing the above filled up table in the FM BAPI_BUS2054_CHANGE_MULTI .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sarbajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 13:12:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720630#M1455355</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2010-03-16T13:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to Update Mutiple WBS elements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720631#M1455356</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 like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take two files as input as it_wbsheader, it_wbsdetail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it_wbsheader&lt;/STRONG&gt; internal table will contain - project defination,wbs element.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it_wbsdetail&lt;/STRONG&gt; internal table will contain - wbs element and profit center.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define  one more internal table .Name it as &lt;STRONG&gt;it_updateddata&lt;/STRONG&gt; as &lt;/P&gt;&lt;P&gt;it_updateddata LIKE STANDARD TABLE OF bapi_bus2054_chg WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now after that,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_wbsheader.&lt;/P&gt;&lt;P&gt;CLEAR:ibapi_bus2001_new,ibapi_bus2054_detail,ibapi_wbs_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ibapi_bus2054_detail-project_definition = it_wbsheader-projdef.&lt;/P&gt;&lt;P&gt;    APPEND ibapi_bus2054_detail.&lt;/P&gt;&lt;P&gt;    CLEAR ibapi_bus2054_detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ibapi_wbs_list-wbs_element = it_wbsheader-wbsno.&lt;/P&gt;&lt;P&gt;    APPEND ibapi_wbs_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR: it_wbselement, it_wbselement[].&lt;/P&gt;&lt;P&gt;    it_wbselement-wbsno = it_wbsheader-wbsno.&lt;/P&gt;&lt;P&gt;    APPEND it_wbselement.&lt;/P&gt;&lt;P&gt;    CLEAR it_wbselement.&lt;/P&gt;&lt;P&gt;    CLEAR: it_getdetail,it_getdetail[].&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_PS_INITIALIZATION'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_BUS2054_GETDATA'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       i_project_definition       = it_wbsheader-projdef&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      I_LANGUAGE                 =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      I_MAX_ROWS                 =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;       it_wbs_element             = it_wbselement&lt;/P&gt;&lt;P&gt;       et_wbs_element             = &lt;STRONG&gt;it_getdetail&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;       et_return                  = return&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      EXTENSIONIN                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      EXTENSIONOUT               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;it_getdetail&lt;/STRONG&gt; will contain the related info of that particular wbs element. Now update the internal table &lt;STRONG&gt;it_updateddata&lt;/STRONG&gt; which was defined earlier with contents returned by this BAPI(Pass every thing). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE it_getdetail WITH KEY wbs_element = it_wbsheader-wbsno.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;it_updateddata-wbs_element = it_getdetail-wbs_element.&lt;/P&gt;&lt;P&gt;it_updateddata-profit_center= it_getdetail-profit_center.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.other fields&lt;/P&gt;&lt;P&gt; APPEND it_updateddata.&lt;/P&gt;&lt;P&gt;      CLEAR it_updateddata.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now  &lt;STRONG&gt;it_updateddata&lt;/STRONG&gt; should be updated with data from second input file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &lt;STRONG&gt;it_updateddata&lt;/STRONG&gt; WHERE wbs_element = it_wbsheader-wbsno.&lt;/P&gt;&lt;P&gt; READ TABLE &lt;STRONG&gt;it_wbsdetail&lt;/STRONG&gt; WITH KEY wbsno =&lt;/P&gt;&lt;P&gt;                              it_updateddata-wbs_element.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        it_updateddata-wbs_element = it_wbsdetail-wbsno.&lt;/P&gt;&lt;P&gt;       it_updateddata-profit_center= it_wbsdetail-profit_center.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Other fields &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MODIFY it_updateddata.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;****&lt;STRONG&gt;pass the updated data&lt;/STRONG&gt;**********&lt;/P&gt;&lt;P&gt;   CALL FUNCTION 'BAPI_BUS2054_CHANGE_MULTI'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_project_definition   = it_wbsheader-projdef&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;        it_wbs_element           =  it_updateddata&lt;/P&gt;&lt;P&gt;     it_update_wbs_element       = ibapi_bus2054_upd&lt;/P&gt;&lt;P&gt;     et_return                   = return&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXTENSIONIN                 =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT return.&lt;/P&gt;&lt;P&gt;      IF return-type = 'E'.&lt;/P&gt;&lt;P&gt;        DATA msgtext(150).&lt;/P&gt;&lt;P&gt;        msgtext = ''.&lt;/P&gt;&lt;P&gt;        msgtext = return-message.&lt;/P&gt;&lt;P&gt;        WRITE:/ msgtext.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        DATA msgtext1(150).&lt;/P&gt;&lt;P&gt;        msgtext1 = ''.&lt;/P&gt;&lt;P&gt;        msgtext1 = return-message.&lt;/P&gt;&lt;P&gt;        WRITE:/ msgtext1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'BAPI_PS_PRECOMMIT'&lt;/P&gt;&lt;P&gt;          TABLES&lt;/P&gt;&lt;P&gt;            et_return = return_precommit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        WAIT UP TO 5 SECONDS.&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;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXTENSIONOUT &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;After that update - &lt;STRONG&gt;ibapi_bus2054_upd&lt;/STRONG&gt; - what ever the fields u passed earlier should be checked here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_BUS2054_CHANGE_MULTI'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_project_definition   = it_wbsheader-projdef&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;        it_wbs_element           =  it_updateddata&lt;/P&gt;&lt;P&gt;     it_update_wbs_element       = ibapi_bus2054_upd&lt;/P&gt;&lt;P&gt;     et_return                   = return&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXTENSIONIN                 =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXTENSIONOUT                =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'BAPI_PS_PRECOMMIT'&lt;/P&gt;&lt;P&gt;          TABLES&lt;/P&gt;&lt;P&gt;            et_return = return_precommit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       COMMIT WORK AND WAIT.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        WAIT UP TO 5 SECONDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            wait up to 10 seconds.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&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;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it is useful for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Himayat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 13:26:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720631#M1455356</guid>
      <dc:creator>Himayatullah</dc:creator>
      <dc:date>2010-03-16T13:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to Update Mutiple WBS elements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720632#M1455357</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;Thanks for all your replies. I was able to update multiple WBS elements belonging to the same project definition. I grouped the WBS elements by their project definition. WBS elements belonging to the 1st project definition were successfully updated. When the BAPI is called for the second time (this is for the second project definition in the loop), it will cause a dump because in the FORM CHK_PRECOMMIT chk_precommit_ok would now have the value 'N', meaning there's an error in the precommit. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to update WBS elements for different project definitions (like what I did) or is BAPI_BUS2054_CHANGE_MULTI designed only for a single project definition?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 08:27:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720632#M1455357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-17T08:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Update Mutiple WBS elements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720633#M1455358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Can you share your code?Also the error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sarbajit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 08:38:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720633#M1455358</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2010-03-17T08:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Update Mutiple WBS elements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720634#M1455359</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;Please see code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LOOP at i_projdef INTO wa_projdef.&lt;/P&gt;&lt;P&gt;    refresh: i_wbs_element,&lt;/P&gt;&lt;P&gt;                  i_UPDATE_WBS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at i_wbselem INTO wa_wbselem WHERE pspid = wa_projdef-pspid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  populate i_wbs_element table with WBS elements belonging to the project&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; populate i_update_wbs with WBS elements belonging to project and pass 'X' to the field to be updated&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_PS_INITIALIZATION'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_BUS2054_CHANGE_MULTI'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        I_PROJECT_DEFINITION  = wa_wbselem-pspid&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        IT_WBS_ELEMENT        = i_wbs_element&lt;/P&gt;&lt;P&gt;        IT_UPDATE_WBS_ELEMENT = i_UPDATE_WBS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_PS_PRECOMMIT'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        ET_RETURN = i_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;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        RETURN = wa_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error message returned after BAPI_PS_PRECOMMIT on the 2nd entry of i_projdef :  Error in individual BAPIs or precommit: posting not possible&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 09:20:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720634#M1455359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-17T09:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to Update Mutiple WBS elements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720635#M1455360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;1&amp;gt;Do you sort the itabs (i_projdef,i_wbselem ) based on pspid.If not do then kindly sort the tables.&lt;/P&gt;&lt;P&gt;2&amp;gt;Just before the 'BAPI_PS_PRECOMMIT' put a WAIT FOR 1 SEC statement.Though its not a recommended practice but do it for the time being.May be this  sort out the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sarbajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 09:35:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720635#M1455360</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2010-03-17T09:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Update Mutiple WBS elements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720636#M1455361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Are you still getting that dump? If not then kindly spend some time describing how do you solve that?&lt;/P&gt;&lt;P&gt;Waiting for the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Sarbajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 11:25:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720636#M1455361</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2010-03-19T11:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Update Mutiple WBS elements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720637#M1455362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi lourd bia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings of the Day!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the same issue with update multiple wbs element and user fields can you please share the code it will be very helpful to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance:):)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;bhavya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 05:37:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-mutiple-wbs-elements/m-p/6720637#M1455362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-02-24T05:37:50Z</dc:date>
    </item>
  </channel>
</rss>

