<?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 for PR? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965321#M947066</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raymond,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx for your quick reply...do u have any sample code for this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sunil kairam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jun 2008 07:27:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-17T07:27:07Z</dc:date>
    <item>
      <title>BAPI for PR?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965318#M947063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one requirement in ME51 i ll give document type and create a new PR as ref to existing PR of differnt document type so all the details are copied to given document type where i can edit purchase group,  company code, document type and quantity...but Plant is in display mode....i am unable to change the plant so is there any bapi to do that? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requiremet is copy PR details of one document type of a paticular plant to differnt document type of a differnt plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e copy PR details of Document type :SEZD Plant: 4000 TO Document type : SEZU Plant: 6000. it will generate the PR no of number range of  document type ZSEU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Any body have idea regarding this.... Is there any BAPI to do this??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its an urgent....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;points will be rewarded for useful answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;sunil kairam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 06:34:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965318#M947063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T06:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for PR?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965319#M947064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may use the following BAPI in sequence to get information of the original PR and then create a new PR using the values just read&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;BAPI_REQUISITION_GETDETAIL  &lt;/P&gt;&lt;P&gt;Adjust the data (change plant, type, etc.) and perform some MOVE-CORRESPONDING&lt;/P&gt;&lt;P&gt;BAPI_REQUISITION_CREATE     &lt;/P&gt;&lt;P&gt;BAPI_TRANSACTION_COMMIT&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 07:04:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965319#M947064</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-06-17T07:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for PR?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965320#M947065</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;BAPI_REQUISITION_CHANGE        Change Purchase Requisition&lt;/P&gt;&lt;P&gt;BAPI_REQUISITION_CREATE        Create Purchase Requisition&lt;/P&gt;&lt;P&gt;BAPI_REQUISITION_DELETE        Delete/Close Purchase Requisition&lt;/P&gt;&lt;P&gt;BAPI_REQUISITION_GETDETAIL     Display Purchase Requisition Details&lt;/P&gt;&lt;P&gt;BAPI_REQUISITION_GETITEMS      Read Purchase Requisition Item&lt;/P&gt;&lt;P&gt;BAPI_REQUISITION_GETITEMSREL   List Purchase Requisitions Awaiting Release&lt;/P&gt;&lt;P&gt;BAPI_REQUISITION_GETRELINFO    Display Detailed Release (Approval) Information on Purchase Requisitio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 07:08:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965320#M947065</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T07:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for PR?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965321#M947066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raymond,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx for your quick reply...do u have any sample code for this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sunil kairam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 07:27:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965321#M947066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T07:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for PR?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965322#M947067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Little sample for BAPI_REQUISITION_CREATE&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report z_req_create.

DATA : T_REQUISITION_ITEMS LIKE BAPIEBANC OCCURS 0 WITH HEADER LINE,

T_RETURN LIKE BAPIRETURN OCCURS 0 WITH HEADER LINE .

DATA : E_NUMBER LIKE BAPIEBANC-PREQ_NO.

T_REQUISITION_ITEMS-DOC_TYPE = 'NB'.
T_REQUISITION_ITEMS-DEL_DATCAT = '1'.
T_REQUISITION_ITEMS-DELIV_DATE = '20020626'.
T_REQUISITION_ITEMS-PLANT = 'P1'.
T_REQUISITION_ITEMS-STORE_LOC = '01'.
T_REQUISITION_ITEMS-PUR_GROUP = 'P01'.
T_REQUISITION_ITEMS-MAT_GRP = '01'.
T_REQUISITION_ITEMS-PREQ_ITEM = 1.
T_REQUISITION_ITEMS-MATERIAL = '1MAT1'.
T_REQUISITION_ITEMS-QUANTITY = 10.
T_REQUISITION_ITEMS-PREQ_NAME = '123456'.
T_REQUISITION_ITEMS-PURCH_ORG = '1000'.
T_REQUISITION_ITEMS-ACCTASSCAT = 'U' .
T_REQUISITION_ITEMS-VEND_MAT = 'G'.
APPEND T_REQUISITION_ITEMS.

CALL FUNCTION 'BAPI_REQUISITION_CREATE'
* EXPORTING
* SKIP_ITEMS_WITH_ERROR =
IMPORTING
NUMBER = E_NUMBER
TABLES
REQUISITION_ITEMS = T_REQUISITION_ITEMS
REQUISITION_ACCOUNT_ASSIGNMENT = T_REQ_ACCOUNT_ASSIGNMENT
* REQUISITION_ITEM_TEXT =
* REQUISITION_LIMITS =
* REQUISITION_CONTRACT_LIMITS =
* REQUISITION_SERVICES =
* REQUISITION_SRV_ACCASS_VALUES =
RETURN = T_RETURN
* REQUISITION_SERVICES_TEXT =
* EXTENSIONIN =
* REQUISITION_ADDRDELIVERY =
.

IF NOT E_NUMBER IS INITIAL .
WRITE:/ 'REQ NO:' , E_NUMBER , 'CREATED'.
ELSE.
LOOP AT T_RETURN.
WRITE T_RETURN-MESSAGE.
ENDLOOP.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;There are [some samples at sdn|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=bapi_requisition_create&amp;amp;cat=sdn_all]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your requirement, you should try to matches the result of GETDETAIL BAPI with the parameter of CREATE BAPI. Some move-corresponding should do the job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 07:30:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965322#M947067</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-06-17T07:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for PR?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965323#M947068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thankx Raymond.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any body have any sample codes plz let me know...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Sunil kairam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 07:40:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-pr/m-p/3965323#M947068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T07:40:06Z</dc:date>
    </item>
  </channel>
</rss>

