<?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 Purchase Requisition create for ASSET in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-purchase-requisition-create-for-asset/m-p/7274025#M1530570</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Sep 2012 12:02:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-09-12T12:02:17Z</dc:date>
    <item>
      <title>BAPI Purchase Requisition create for ASSET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-purchase-requisition-create-for-asset/m-p/7274022#M1530567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi expert ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create Purchase Requisition using BAPI_REQUISITION_CREATE , &lt;/P&gt;&lt;P&gt;this is working fine for single PR create ,but for more than one items, asset numbers not updating correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for eg- if item  no 10 having asset no 106000000187 and&lt;/P&gt;&lt;P&gt;               item  no 20 having asset no 106000000188.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but in my program only last asset i.e.106000000188  is updated for both 10 and 20 item.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;program code is as follow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  FILL_BAPI&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GET_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*TRANSLATE IT_DATA-PR_VLTYP TO UPPER CASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  T_REQUISITION_ITEMS-DOC_TYPE    = IT_DATA-PR_TYPE. &lt;/P&gt;&lt;P&gt;  T_REQUISITION_ITEMS-DELIV_DATE  = IT_DATA-PR_DATE.&lt;/P&gt;&lt;P&gt;  T_REQUISITION_ITEMS-PLANT       = IT_DATA-PR_PLANT.&lt;/P&gt;&lt;P&gt;  T_REQUISITION_ITEMS-PUR_GROUP   = IT_DATA-PR_GROUP.&lt;/P&gt;&lt;P&gt;  T_REQUISITION_ITEMS-ACCTASSCAT  = IT_DATA-KNTTP.&lt;/P&gt;&lt;P&gt;  T_REQUISITION_ITEMS-SHORT_TEXT =  IT_DATA-TXZ01.&lt;/P&gt;&lt;P&gt;  T_REQUISITION_ITEMS-QUANTITY    = IT_DATA-PR_QTY.&lt;/P&gt;&lt;P&gt;  T_REQUISITION_ITEMS-UNIT        = IT_DATA-MEINS. &lt;/P&gt;&lt;P&gt;  T_REQUISITION_ITEMS-C_AMT_BAPI  = IT_DATA-price..&lt;/P&gt;&lt;P&gt;  T_REQUISITION_ITEMS-MAT_GRP    = IT_DATA-matkl. "'1001'.&lt;/P&gt;&lt;P&gt;   APPEND T_REQUISITION_ITEMS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   REQUISITION_ACCOUNT_ASSIGNMENT-SERIAL_NO = IT_DATA-ZEBKN."1.&lt;/P&gt;&lt;P&gt;   REQUISITION_ACCOUNT_ASSIGNMENT-ASSET_NO = IT_DATA-ANLN1. "'106000000187'.&lt;/P&gt;&lt;P&gt;   APPEND REQUISITION_ACCOUNT_ASSIGNMENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BAPI TO CREATE PR&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_REQUISITION_CREATE'&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;SKIP_ITEMS_WITH_ERROR =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;  NUMBER = E_NUMBER&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;  REQUISITION_ITEMS = T_REQUISITION_ITEMS&lt;/P&gt;&lt;P&gt;REQUISITION_ACCOUNT_ASSIGNMENT = REQUISITION_ACCOUNT_ASSIGNMENT"T_REQ_ACCOUNT_ASSIGNMENT&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REQUISITION_ITEM_TEXT =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REQUISITION_LIMITS =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REQUISITION_CONTRACT_LIMITS =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REQUISITION_SERVICES =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REQUISITION_SRV_ACCASS_VALUES =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  RETURN = T_RETURN&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REQUISITION_SERVICES_TEXT =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXTENSIONIN =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REQUISITION_ADDRDELIVERY =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT E_NUMBER IS INITIAL .&lt;/P&gt;&lt;P&gt;    WRITE:/ 'REQ NO:' , E_NUMBER , 'CREATED'.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    LOOP AT T_RETURN.&lt;/P&gt;&lt;P&gt;      WRITE T_RETURN-MESSAGE.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " FILL_BAPI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Sep 2010 04:29:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-purchase-requisition-create-for-asset/m-p/7274022#M1530567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-16T04:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Purchase Requisition create for ASSET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-purchase-requisition-create-for-asset/m-p/7274023#M1530568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jyotsna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you didn't populate the field PREQ_ITEM in both tables. But this is required, see also the BAPI documentation in the transaction "BAPI" for the Object "PurchaseRequisition" and the method "CreateFromData" and the parametername "RequisitionItems".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Dirk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Sep 2010 06:59:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-purchase-requisition-create-for-asset/m-p/7274023#M1530568</guid>
      <dc:creator>DirkAltmann</dc:creator>
      <dc:date>2010-09-16T06:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Purchase Requisition create for ASSET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-purchase-requisition-create-for-asset/m-p/7274024#M1530569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have also created a upload program using 'BAPI_REQUISITION_CREATE' . I have did the following things in my program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I took the BEDNR(Tracking No) field as the unique record for each PR document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)Then,  i took two internal tables with the data from the file. One internal table i considered as header in which only the Number of PR Documents that is no item wise repeatability(Delete all adjacent duplicates in IT_head using BEDNR).  In the Other internal table the data had as per the file that is item wise data also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)I looped the header IT_HEAD and inside that i looped IT_ITEM with a where condition BEDNR = IT_HEAD-BEDNR. So, the number of items will be populated successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_REQUISITION_CREATE'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       AUTOMATIC_SOURCE                     = 'X'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;         number                                           = gv_pr&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        REQUISITION_ITEMS                    = it_item&lt;/P&gt;&lt;P&gt;       REQUISITION_ACCOUNT_ASSIGNMENT       = it_acct&lt;/P&gt;&lt;P&gt;       REQUISITION_ITEM_TEXT                = it_text&lt;/P&gt;&lt;P&gt;       RETURN                               = it_ret&lt;/P&gt;&lt;P&gt;       REQUISITION_ADDRDELIVERY             = it_addr&lt;/P&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;    refresh:it_item,it_acct,it_text,it_addr.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4)for example if your PR is having 4 item like 10 ,20 ,30 &amp;amp; 40,then the internal table &lt;STRONG&gt;it_item&lt;/STRONG&gt; and &lt;STRONG&gt;it_acct&lt;/STRONG&gt; will have four entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Manesh.R&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Sep 2010 09:42:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-purchase-requisition-create-for-asset/m-p/7274024#M1530569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-16T09:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Purchase Requisition create for ASSET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-purchase-requisition-create-for-asset/m-p/7274025#M1530570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 12:02:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-purchase-requisition-create-for-asset/m-p/7274025#M1530570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-09-12T12:02:17Z</dc:date>
    </item>
  </channel>
</rss>

