<?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_PO_CREATE1 does not actually create PO in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-create1-does-not-actually-create-po/m-p/3545926#M853102</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 this particular FM to create PO' and it works fine, please check this sample program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*   Create Purchase Order.
    CALL FUNCTION 'BAPI_PO_CREATE1'
     EXPORTING
       poheader                     = wa_header
       poheaderx                    = wa_headerx
*   poaddrvendor                 =
*   TESTRUN                      =
*   MEMORY_UNCOMPLETE            =
*   MEMORY_COMPLETE              =
*   POEXPIMPHEADER               =
*   POEXPIMPHEADERX              =
*   VERSIONS                     =
*   NO_MESSAGING                 =
*   NO_MESSAGE_REQ               =
*   NO_AUTHORITY                 =
      no_price_from_po              = 'X'
       IMPORTING
       exppurchaseorder             = ponumber
*   EXPHEADER                    =
*   EXPPOEXPIMPHEADER            =
       TABLES
       return                       = t_return
       poitem                       = t_item
       poitemx                      = t_itemx
*   poaddrdelivery               =
       poschedule                   = t_schedule
       poschedulex                  = t_schedulex
       poaccount                    = t_account
*   POACCOUNTPROFITSEGMENT       =
       poaccountx                   = t_accountx
*   POCONDHEADER                 =
*   POCONDHEADERX                =
       pocond                       = t_pocond              "JJC042107
       pocondx                      = t_pocondx             "JJC042107
       polimits                     = t_limits
*   POCONTRACTLIMITS             =
*   POSERVICES                   =
       posrvaccessvalues            = t_posrvaccessvalues
*   POSERVICESTEXT               =
*   EXTENSIONIN                  =
*   EXTENSIONOUT                 =
*   POEXPIMPITEM                 =
*   POEXPIMPITEMX                =
       potextheader                 =  t_potextheader
       potextitem                = t_potextitem             "dar020107
*   ALLVERSIONS                  =
       popartner                 = t_popartner.

    IF ponumber NE space.
      COMMIT WORK AND WAIT.
    ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Small correction add a Commit work and wait after checking whether PO has been created (BAPI already exports this to our program as you can see from the above program)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also please check whether you have authorisations to create new purchase order in System-&amp;gt;user Profile -&amp;gt; Own Data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Mar 2008 13:39:51 GMT</pubDate>
    <dc:creator>rahulkavuri</dc:creator>
    <dc:date>2008-03-20T13:39:51Z</dc:date>
    <item>
      <title>BAPI_PO_CREATE1 does not actually create PO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-create1-does-not-actually-create-po/m-p/3545924#M853100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using BAPI_PO_CREATE1 to create purchase orders. I know it doesn't actually create the order itself when run from SE37, but is this also the case if called in a program which is run via SE80 or SE38? I even added a t-code to the program, but the documents don't show up in EKKO... the BAPI gives me a few warning mesages, but basically states that a PO has been created with number so-and-so. Do I need a commit work or something in my program?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 13:23:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-create1-does-not-actually-create-po/m-p/3545924#M853100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T13:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_PO_CREATE1 does not actually create PO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-create1-does-not-actually-create-po/m-p/3545925#M853101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does create in SE37.&lt;/P&gt;&lt;P&gt;To do this, please use BAPI_TRANSACTION_COMMIT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goto test&amp;gt;TEST SEQUENCE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run bapi_po_creat, follow by bapi_transaction_commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your program,  put in BAPI_TRANSACTION_COMMIT  after BAPI_PO_CREATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good luck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 13:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-create1-does-not-actually-create-po/m-p/3545925#M853101</guid>
      <dc:creator>kowong</dc:creator>
      <dc:date>2008-03-20T13:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_PO_CREATE1 does not actually create PO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-create1-does-not-actually-create-po/m-p/3545926#M853102</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 this particular FM to create PO' and it works fine, please check this sample program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*   Create Purchase Order.
    CALL FUNCTION 'BAPI_PO_CREATE1'
     EXPORTING
       poheader                     = wa_header
       poheaderx                    = wa_headerx
*   poaddrvendor                 =
*   TESTRUN                      =
*   MEMORY_UNCOMPLETE            =
*   MEMORY_COMPLETE              =
*   POEXPIMPHEADER               =
*   POEXPIMPHEADERX              =
*   VERSIONS                     =
*   NO_MESSAGING                 =
*   NO_MESSAGE_REQ               =
*   NO_AUTHORITY                 =
      no_price_from_po              = 'X'
       IMPORTING
       exppurchaseorder             = ponumber
*   EXPHEADER                    =
*   EXPPOEXPIMPHEADER            =
       TABLES
       return                       = t_return
       poitem                       = t_item
       poitemx                      = t_itemx
*   poaddrdelivery               =
       poschedule                   = t_schedule
       poschedulex                  = t_schedulex
       poaccount                    = t_account
*   POACCOUNTPROFITSEGMENT       =
       poaccountx                   = t_accountx
*   POCONDHEADER                 =
*   POCONDHEADERX                =
       pocond                       = t_pocond              "JJC042107
       pocondx                      = t_pocondx             "JJC042107
       polimits                     = t_limits
*   POCONTRACTLIMITS             =
*   POSERVICES                   =
       posrvaccessvalues            = t_posrvaccessvalues
*   POSERVICESTEXT               =
*   EXTENSIONIN                  =
*   EXTENSIONOUT                 =
*   POEXPIMPITEM                 =
*   POEXPIMPITEMX                =
       potextheader                 =  t_potextheader
       potextitem                = t_potextitem             "dar020107
*   ALLVERSIONS                  =
       popartner                 = t_popartner.

    IF ponumber NE space.
      COMMIT WORK AND WAIT.
    ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Small correction add a Commit work and wait after checking whether PO has been created (BAPI already exports this to our program as you can see from the above program)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also please check whether you have authorisations to create new purchase order in System-&amp;gt;user Profile -&amp;gt; Own Data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 13:39:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-create1-does-not-actually-create-po/m-p/3545926#M853102</guid>
      <dc:creator>rahulkavuri</dc:creator>
      <dc:date>2008-03-20T13:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_PO_CREATE1 does not actually create PO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-create1-does-not-actually-create-po/m-p/3545927#M853103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have the data that you used to populate the variables? I have seen a multitude of different ways to use this data. I am having a problem and can't seem to find why the PO number is not being generated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************************************************************************&lt;/P&gt;&lt;P&gt;*Call BAPI to create STO&lt;/P&gt;&lt;P&gt;*NOTE: gs_po_header, gv_po_num and gt_po_item are declared in the PROTECTED SECTION&lt;/P&gt;&lt;P&gt;*************************************************************************&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_PO_CREATE1'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      poheader         = gs_po_header&lt;/P&gt;&lt;P&gt;      poheaderx        = gs_po_headerx&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      exppurchaseorder = gv_po_num&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      return           = lt_errmsg&lt;/P&gt;&lt;P&gt;      poitem           = gt_po_item&lt;/P&gt;&lt;P&gt;      poitemx          = gt_po_itemx&lt;/P&gt;&lt;P&gt;      poschedule       = gt_po_sch&lt;/P&gt;&lt;P&gt;      poschedulex      = gt_po_schx&lt;/P&gt;&lt;P&gt;    . "END OF BAPI_PO_CREATE1 CALL&lt;/P&gt;&lt;P&gt;*--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="---------" /&gt;Get Messages--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="--------------------" /&gt;&lt;P&gt;  LOOP AT lt_errmsg INTO ls_errmsg.&lt;/P&gt;&lt;P&gt;    lv_err_msg_type = ls_errmsg-type.&lt;/P&gt;&lt;P&gt;    IF lv_err_msg_type = 'E'. "Error message indicating&lt;/P&gt;&lt;P&gt;      MOVE ls_errmsg TO  et_msg_log.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;*--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="---------" /&gt;COMMIT BAPI--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="--------------------" /&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_commit.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 18:54:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-create1-does-not-actually-create-po/m-p/3545927#M853103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-23T18:54:03Z</dc:date>
    </item>
  </channel>
</rss>

