<?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 BAPI_PR_CREATE Error : Enter G/L Account... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-pr-create-error-enter-g-l-account/m-p/4813405#M1126541</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yup, I passed the item number already and populated the praccountx. But it's still not populating the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Nov 2008 05:31:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-20T05:31:36Z</dc:date>
    <item>
      <title>BAPI BAPI_PR_CREATE Error : Enter G/L Account...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-pr-create-error-enter-g-l-account/m-p/4813403#M1126539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hieee...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the BAPI function on BAPI_PR_CREATE to do PR conversion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have assigned the values to praccount and praccountx. However, I got return errors like :&lt;/P&gt;&lt;P&gt;Enter G/L Account.&lt;/P&gt;&lt;P&gt;Enter Cost Center.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I debugged in the  BAPI_PR_CREATE, the statement failed at this line:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lr_bapi-&amp;gt;set_account( im_account = praccount[] im_accountx   = praccountx[] ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, I further debugged into this line of code, in the method set_account:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  METHOD set_account.
    my_bapi_account = im_account.
    my_bapi_accountx = im_accountx.
    SORT: my_bapi_account BY preq_item serial_no,
          my_bapi_accountx BY preq_item serial_no.
    CHECK me-&amp;gt;my_actyp EQ if_bapi_mereq~ver.
    LOOP AT me-&amp;gt;my_bapi_account ASSIGNING &amp;lt;new&amp;gt;.
      AT NEW preq_item.
        CALL METHOD me-&amp;gt;check_bnfpo( &amp;lt;new&amp;gt; ).
      ENDAT.
    ENDLOOP.
  ENDMETHOD.  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found out that this line of code is always failed and thus exiting the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; CHECK me-&amp;gt;my_actyp EQ if_bapi_mereq~ver. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 'if_bapi_mereq~ver'  is always having the value 'V', while the 'me-&amp;gt;my_actyp' is always having the value 'H' (when it first called in the standard function in BAPI function BAPI_PR_CREATE).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CREATE OBJECT lr_bapi EXPORTING im_preq_no = prheader-preq_no
                                  im_actyp   = if_bapi_mereq=&amp;gt;hin
                                  im_testrun = testrun.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if this part is the part which went wrong. But, apparently, the account assignment values are passing properly, it is just until this part and then going back to the &lt;/P&gt;&lt;P&gt;BAPI function BAPI_PR_CREATE, the 'MY_BAPI_ACCOUNT' is not having any value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone experienced this kind of error before? Please share how you solve the problem if you have faced before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 02:23:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-pr-create-error-enter-g-l-account/m-p/4813403#M1126539</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T02:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI BAPI_PR_CREATE Error : Enter G/L Account...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-pr-create-error-enter-g-l-account/m-p/4813404#M1126540</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 hope you are passing item number to &lt;/P&gt;&lt;P&gt;PREQ_ITEM in both PRACCOUNT and PRACCOUNTX&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Madhan D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 05:25:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-pr-create-error-enter-g-l-account/m-p/4813404#M1126540</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T05:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI BAPI_PR_CREATE Error : Enter G/L Account...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-pr-create-error-enter-g-l-account/m-p/4813405#M1126541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yup, I passed the item number already and populated the praccountx. But it's still not populating the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 05:31:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-pr-create-error-enter-g-l-account/m-p/4813405#M1126541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T05:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI BAPI_PR_CREATE Error : Enter G/L Account...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-pr-create-error-enter-g-l-account/m-p/4813406#M1126542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;What is the version of SAP you are using&lt;/P&gt;&lt;P&gt;If your R/3 release is lower than ERP 2005, SAP is recommending not to use BAPI_PR_CREATE.&lt;/P&gt;&lt;P&gt;Refer to OSS note - Note 565099 - New BAPIs for the purchase requisition object (BUS2105)&lt;/P&gt;&lt;P&gt;Try to use BAPI_REQUISITION_CREATE&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Madhan D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 08:19:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-pr-create-error-enter-g-l-account/m-p/4813406#M1126542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T08:19:00Z</dc:date>
    </item>
  </channel>
</rss>

