<?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_NETWORK_COMP_ADD in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-network-comp-add/m-p/2010879#M410409</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkata,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this test piece of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zvsaddnetwcomp                          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: sit LIKE bapi_network_list-network,     "network number&lt;/P&gt;&lt;P&gt;            operace LIKE bapi_network_comp_add-activity, "activity&lt;/P&gt;&lt;P&gt;            matnr LIKE mara-matnr,                       "material number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            test(1) type c.                              "test indicator&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF mattab OCCURS 10.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE bapi_network_comp_add.&lt;/P&gt;&lt;P&gt;DATA: END OF mattab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF messtab OCCURS 10.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE bapi_meth_message.&lt;/P&gt;&lt;P&gt;DATA: END OF messtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ret1 LIKE bapiret2.&lt;/P&gt;&lt;P&gt;data: messno type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE matnr TO mattab-material.       "material number&lt;/P&gt;&lt;P&gt;  MOVE 1 TO mattab-entry_quantity.     "quantity&lt;/P&gt;&lt;P&gt;  MOVE '8' TO mattab-type_of_pur_resv. "procurement type (8 = WBS assignment)&lt;/P&gt;&lt;P&gt;  MOVE 'L' TO mattab-item_cat.         "item category&lt;/P&gt;&lt;P&gt;  MOVE operace TO mattab-activity.     "activity number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE '2' TO mattab-manual_requirements_date. "2-allign to end date of activity&lt;/P&gt;&lt;P&gt;  APPEND mattab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_NETWORK_COMP_ADD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      number           = sit&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      return           = ret1&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      i_components_add = mattab&lt;/P&gt;&lt;P&gt;      e_message_table  = messtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table messtab lines messno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if messno = 0.&lt;/P&gt;&lt;P&gt;  write: 'Test finished, all components Ok!'.&lt;/P&gt;&lt;P&gt;  if test is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;    IMPORTANT:without commit, component is not created!!!!!!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;   CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     WAIT          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     RETURN        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             .&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;Be sure that network is not blocked by other user at the time program is running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgrds,&lt;/P&gt;&lt;P&gt;V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Aug 2007 06:54:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-09T06:54:59Z</dc:date>
    <item>
      <title>BAPI_NETWORK_COMP_ADD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-network-comp-add/m-p/2010878#M410408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;on execution of BAPI_NETWORK_COMP_ADD no error is reported. to commit the work  BAPI_TRANSACTION_COMMIT is also executed. Even though no errors are reported the components are not getting add to net work. some one may please give the reason and solution for solving the problem.&lt;/P&gt;&lt;P&gt;                                                        Regards,&lt;/P&gt;&lt;P&gt;                                                       Venkata Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2007 08:40:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-network-comp-add/m-p/2010878#M410408</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-09T08:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_NETWORK_COMP_ADD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-network-comp-add/m-p/2010879#M410409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkata,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this test piece of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zvsaddnetwcomp                          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: sit LIKE bapi_network_list-network,     "network number&lt;/P&gt;&lt;P&gt;            operace LIKE bapi_network_comp_add-activity, "activity&lt;/P&gt;&lt;P&gt;            matnr LIKE mara-matnr,                       "material number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            test(1) type c.                              "test indicator&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF mattab OCCURS 10.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE bapi_network_comp_add.&lt;/P&gt;&lt;P&gt;DATA: END OF mattab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF messtab OCCURS 10.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE bapi_meth_message.&lt;/P&gt;&lt;P&gt;DATA: END OF messtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ret1 LIKE bapiret2.&lt;/P&gt;&lt;P&gt;data: messno type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE matnr TO mattab-material.       "material number&lt;/P&gt;&lt;P&gt;  MOVE 1 TO mattab-entry_quantity.     "quantity&lt;/P&gt;&lt;P&gt;  MOVE '8' TO mattab-type_of_pur_resv. "procurement type (8 = WBS assignment)&lt;/P&gt;&lt;P&gt;  MOVE 'L' TO mattab-item_cat.         "item category&lt;/P&gt;&lt;P&gt;  MOVE operace TO mattab-activity.     "activity number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE '2' TO mattab-manual_requirements_date. "2-allign to end date of activity&lt;/P&gt;&lt;P&gt;  APPEND mattab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_NETWORK_COMP_ADD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      number           = sit&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      return           = ret1&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      i_components_add = mattab&lt;/P&gt;&lt;P&gt;      e_message_table  = messtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table messtab lines messno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if messno = 0.&lt;/P&gt;&lt;P&gt;  write: 'Test finished, all components Ok!'.&lt;/P&gt;&lt;P&gt;  if test is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;    IMPORTANT:without commit, component is not created!!!!!!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;   CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     WAIT          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     RETURN        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             .&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;Be sure that network is not blocked by other user at the time program is running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgrds,&lt;/P&gt;&lt;P&gt;V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 06:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-network-comp-add/m-p/2010879#M410409</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-09T06:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_NETWORK_COMP_ADD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-network-comp-add/m-p/2010880#M410410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had the same problem. This BAPI is very shaky. SAP transactions CJ20N and CN2* doesn't use this BAPI. &lt;/P&gt;&lt;P&gt;There could be 2 solutions.&lt;/P&gt;&lt;P&gt;1. did you check for Warning or Informational messages from BAPI?&lt;/P&gt;&lt;P&gt;I get a Informational message and then it won't post anything. &lt;/P&gt;&lt;P&gt;Even though no error is found. &lt;/P&gt;&lt;P&gt;2. Use Commit and Wait instead of just Commit. &lt;/P&gt;&lt;P&gt;Also, from what I have found. If i have 2 or more components under same activity, I have to post components together. If I post one component at a time, it doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 03:09:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-network-comp-add/m-p/2010880#M410410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-23T03:09:20Z</dc:date>
    </item>
  </channel>
</rss>

