<?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: function modules invoked in wrong sequence  bapi_po_create in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851800#M360709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you should provide at least one line item information to create PO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jan 2007 21:52:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-11T21:52:30Z</dc:date>
    <item>
      <title>function modules invoked in wrong sequence  bapi_po_create</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851795#M360704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;trying to use bapi_po_create in se37&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enter purch org     vendor   doc type    purch group  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when test get the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function modules invoked in wrong sequence&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what does that mean?&lt;/P&gt;&lt;P&gt;how an i create&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 20:22:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851795#M360704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T20:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: function modules invoked in wrong sequence  bapi_po_create</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851796#M360705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure, but  I do think you need more information than that.  Here is an example program calling the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;



report zrich_0001.

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.

parameters: p_matnr type ekpo-matnr.
parameters: p_werks type ekpo-werks.
parameters: p_lgort type ekpo-lgort.
parameters: p_menge type ekpo-menge.
parameters: p_lifnr type ekko-lifnr.
parameters: p_ekorg type ekko-ekorg.
parameters: p_ekgrp type ekko-ekgrp.
parameters: p_bukrs type ekko-bukrs.

* Header Level Data

pohead-comp_code = p_bukrs.
pohead-doc_type   = 'NB'     .
pohead-creat_date = sy-datum   .

pohead-vendor = p_lifnr.
pohead-purch_org = p_ekorg.
pohead-pur_group = p_ekgrp.

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 = p_matnr.
poitem-plant    = p_werks.
poitem-stge_loc = p_lgort.
poitem-quantity = p_menge.
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_menge.
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.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 20:28:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851796#M360705</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-01-11T20:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: function modules invoked in wrong sequence  bapi_po_create</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851797#M360706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Double click on the message to see if there is a long text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 20:29:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851797#M360706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T20:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: function modules invoked in wrong sequence  bapi_po_create</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851798#M360707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you tried to execute the commit first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 20:31:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851798#M360707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T20:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: function modules invoked in wrong sequence  bapi_po_create</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851799#M360708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you sooooooo much&lt;/P&gt;&lt;P&gt;i can now enter the po in transaction se37&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;originally i did not have enough info&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i need to do now is do the same thing in idoc pordcr101 which uses bapi_po_create.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i put in the info in the idoc i get error   partner role cannot be processes by bapi_po_create&lt;/P&gt;&lt;P&gt;enter purchasing org  -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; i am entering purchasing org&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas would be greatly appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 21:18:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851799#M360708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T21:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: function modules invoked in wrong sequence  bapi_po_create</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851800#M360709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you should provide at least one line item information to create PO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 21:52:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules-invoked-in-wrong-sequence-bapi-po-create/m-p/1851800#M360709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T21:52:30Z</dc:date>
    </item>
  </channel>
</rss>

