<?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 CREATION in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699657#M306776</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;chks a sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/phpBB2/viewtopic.php?p=15525&amp;amp;sid=ea0812d14d0cbffb804e18d34040d521" target="test_blank"&gt;http://www.sapgenie.com/phpBB2/viewtopic.php?p=15525&amp;amp;sid=ea0812d14d0cbffb804e18d34040d521&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/sap.user72/blog/2005/03/22/sample-code-to-create-purchase-order-using-bapi-in-r3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://apolemia.blogspot.com/2005/06/create-purchase-order-with.html" target="test_blank"&gt;http://apolemia.blogspot.com/2005/06/create-purchase-order-with.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;'if hlped pls mark points'&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Nov 2006 06:29:19 GMT</pubDate>
    <dc:creator>anversha_s</dc:creator>
    <dc:date>2006-11-10T06:29:19Z</dc:date>
    <item>
      <title>BAPI -PO CREATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699653#M306772</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;Please suggest me how to create purchase order using BAPI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 06:16:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699653#M306772</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T06:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI -PO CREATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699654#M306773</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;Use BAPI_PO_CREATE1 and pass the respective Import and Table parameters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 06:23:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699654#M306773</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T06:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI -PO CREATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699655#M306774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Please check this link: &lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2685720"&gt;&lt;/A&gt; to check code provided by Rich earlier in the community.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 06:24:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699655#M306774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T06:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI -PO CREATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699656#M306775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Here is a sample FORM routine.


************************************************************************
*      Form  create_purchase_order
************************************************************************
form create_purchase_order.

  constants : c_x value 'X'.

  data: del_date type sy-datum.

  data: pohead  type bapimepoheader.
  data: poheadx type bapimepoheaderx.

  data: exp_head type bapimepoheader.

  data: return  type table of bapiret2 with header line.
  data: poitem  type table of bapimepoitem with header line.
  data: poitemx type table of bapimepoitemx with header line.

  data: posched  type table of bapimeposchedule with header line.
  data: poschedx type table of bapimeposchedulx with header line.

  data: ex_po_number type bapimepoheader-po_number.


* Header Level Data
 pohead-comp_code = '0010'.
  pohead-doc_type   = 'NB'     .
  pohead-creat_date = sy-datum   .

pohead-vendor = p_lifnr.
 pohead-purch_org = '0010'.
  pohead-pur_group = 'EMG'.

  pohead-langu      = sy-langu   .
  pohead-doc_date   = sy-datum.

  poheadx-comp_code  = c_x.
  poheadx-doc_type   = c_x.
  poheadx-creat_date = c_x.
  poheadx-vendor     = c_x.
  poheadx-langu      = c_x.
  poheadx-purch_org  = c_x.
  poheadx-pur_group  = c_x.
  poheadx-doc_date   = c_x.


* Item Level Data
  poitem-po_item  = 1.
  poitem-material = xresb-matnr.
  poitem-plant    = xresb-werks.
  poitem-stge_loc = xresb-lgort.
  poitem-quantity = p_bdmng.
  append poitem.

  poitemx-po_item    = 1.
  poitemx-po_itemx   = c_x.
  poitemx-material   = c_x.
  poitemx-plant      = c_x .
  poitemx-stge_loc   = c_x .
  poitemx-quantity   = c_x .
  poitemx-tax_code   = c_x .
  poitemx-item_cat   = c_x .
  poitemx-acctasscat = c_x .
  append poitemx.


* Schedule Line Level Data
  posched-po_item        = 1.
  posched-sched_line     = 1.
  posched-del_datcat_ext = 'D'.
  del_date = sy-datum + 1.
  write del_date to posched-delivery_date.
  posched-deliv_time     = '000001'.
  posched-quantity       = p_bdmng.
  append posched.

  poschedx-po_item        = 1.
  poschedx-sched_line     = 1.
  poschedx-po_itemx       = c_x.
  poschedx-sched_linex    = c_x.
  poschedx-del_datcat_ext = c_x.
  poschedx-delivery_date  = c_x.
  poschedx-quantity       = c_x.
  append poschedx.

  call function 'BAPI_PO_CREATE1'
       exporting
            poheader         = pohead
            poheaderx        = poheadx
            testrun          = ' '
       importing
            exppurchaseorder = ex_po_number
            expheader        = exp_head
       tables
            return           = return
            poitem           = poitem
            poitemx          = poitemx
            poschedule       = posched
            poschedulex      = poschedx.

  call function 'BAPI_TRANSACTION_COMMIT'
       exporting
            wait = 'X'.

  if not ex_po_number is initial.
    call function 'DEQUEUE_ALL'.
  else.
    call function 'DEQUEUE_ALL'.
    message i036.
  endif.

endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 06:25:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699656#M306775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T06:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI -PO CREATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699657#M306776</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;chks a sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/phpBB2/viewtopic.php?p=15525&amp;amp;sid=ea0812d14d0cbffb804e18d34040d521" target="test_blank"&gt;http://www.sapgenie.com/phpBB2/viewtopic.php?p=15525&amp;amp;sid=ea0812d14d0cbffb804e18d34040d521&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/sap.user72/blog/2005/03/22/sample-code-to-create-purchase-order-using-bapi-in-r3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://apolemia.blogspot.com/2005/06/create-purchase-order-with.html" target="test_blank"&gt;http://apolemia.blogspot.com/2005/06/create-purchase-order-with.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;'if hlped pls mark points'&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 06:29:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699657#M306776</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-11-10T06:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI -PO CREATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699658#M306777</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;Use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_PO_CREATE &lt;/P&gt;&lt;P&gt;    or &lt;/P&gt;&lt;P&gt;BAPI_CREATE_FROMDATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as per your requirement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 08:40:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-creation/m-p/1699658#M306777</guid>
      <dc:creator>shishupalreddy</dc:creator>
      <dc:date>2006-11-10T08:40:35Z</dc:date>
    </item>
  </channel>
</rss>

