<?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: FB01 uploading problem with posting keys in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703818#M1452760</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>Tue, 23 Feb 2010 15:58:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-23T15:58:21Z</dc:date>
    <item>
      <title>FB01 uploading problem with posting keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703817#M1452759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created this program to upload the FB01 transaction froma  csv file using 'BAPI_ACC_DOCUMENT_CHECK'.&lt;/P&gt;&lt;P&gt;Everything seems to be working fine except for the fact that even when my csv file has the posting key of 31 for the  vendor and 40 for the gl it picks up 21 and 50 from somewhere and posts that which is wrong. I am not sure why this is happening and where its picking up the posting keys from inspite of the file indicating 31 and 40 respectively.&lt;/P&gt;&lt;P&gt;My file is as follows:&lt;/P&gt;&lt;P&gt;02232010;KR;2000;02222010;;CAD;154085;009571;&lt;STRONG&gt;31&lt;/STRONG&gt;;925049;20706.84;V005;02222010;C;213728;&lt;STRONG&gt;40&lt;/STRONG&gt;;3998;20706.84;1;EA;002;730019;730019 and as you see the 31 and 40 are mentioned in the file but after i run teh program and see the FB03 for the postings it shows me as follows.&lt;/P&gt;&lt;P&gt;2000	1	000001	21	2000	Trade Accts Payable				6,935.41	CAD			730019			&lt;/P&gt;&lt;P&gt;2000	2	000002	50	3998	Trade AR Conversion				6,935.41-	CAD		730019	730019	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone please tell me why is it picking up other posting key istead of mine being provided in the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 15:44:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703817#M1452759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-23T15:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: FB01 uploading problem with posting keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703818#M1452760</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>Tue, 23 Feb 2010 15:58:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703818#M1452760</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-23T15:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: FB01 uploading problem with posting keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703819#M1452761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the BAPI to upload FB01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 16:14:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703819#M1452761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-23T16:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: FB01 uploading problem with posting keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703820#M1452762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you use BAPI_ACC_DOCUMENT_CHECK to post a document?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 16:29:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703820#M1452762</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-23T16:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: FB01 uploading problem with posting keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703821#M1452763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I followed this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
***Vendor account check***
    CLEAR wa_ap.
    wa_ap-itemno_acc         = 1.                           "Item No
    wa_ap-vendor_no         = tw_upload-newko.              "Vendor account no
    wa_ap-item_text         = tw_upload-sgtxt.
    APPEND wa_ap TO ta_ap.

***General Ledger account check***
    CLEAR wa_gl.
    wa_gl-itemno_acc         = 2.                           "Item No
    wa_gl-gl_account         = tw_upload-newko_2.           "General ledger account
    wa_gl-item_text          = tw_upload-sgtxt_2.
*    wa_gl-fis_period         = tw_upload-monat.
    wa_gl-pstng_date         = wa_header-pstng_date.
    wa_gl-costcenter         = tw_upload-kostl.             "Cost center
    wa_gl-profit_ctr         = tw_upload-prctr.             "Profit center
    APPEND wa_gl TO ta_gl.

***Currency check***

    CLEAR wa_curr.
    wa_curr-itemno_acc       = 1.
    wa_curr-currency         = tw_upload-waers.
    wa_curr-amt_doccur       = tw_upload-wrbtr .
    APPEND wa_curr TO ta_curr.
    CLEAR wa_curr.
    wa_curr-itemno_acc       = 2.
    wa_curr-currency         = tw_upload-waers.
    wa_curr-amt_doccur       = tw_upload-wrbtr_2 * -1 .
    APPEND wa_curr TO ta_curr.

**Bapi check for the record to post
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
      EXPORTING
        documentheader = wa_header
      TABLES
        accountgl      = ta_gl
        currencyamount = ta_curr
        return         = ta_return
        accountpayable = ta_ap. " If return contains no errors then post documents&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 17:11:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703821#M1452763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-23T17:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: FB01 uploading problem with posting keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703822#M1452764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The posting keys are derived internally inside the BAPI (based on debit/credit amount and account type), you cannot set them yourself.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 17:15:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703822#M1452764</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-02-23T17:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: FB01 uploading problem with posting keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703823#M1452765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; I followed this:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;CODE&gt;
         accountpayable = ta_ap. " If return contains no errors then post documents&lt;/CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;But doesn't this just check the document? How do you post it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 17:18:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703823#M1452765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-23T17:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: FB01 uploading problem with posting keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703824#M1452766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For posting I follow the CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' after it has checked teh document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the posting key why dosent it take the value from the csv when it takes all other values , why not the posting key , instead of assigning it on its own. Is there a way I can directly pull even this value of posting key from the file isntead if the Bapi assigninsg it on its own?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 17:23:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703824#M1452766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-23T17:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: FB01 uploading problem with posting keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703825#M1452767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course before that I used the &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        documentheader = wa_header&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        accountgl      = ta_gl&lt;/P&gt;&lt;P&gt;        currencyamount = ta_curr&lt;/P&gt;&lt;P&gt;        return         = ta_return&lt;/P&gt;&lt;P&gt;        accountpayable = ta_ap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 17:29:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703825#M1452767</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-23T17:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: FB01 uploading problem with posting keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703826#M1452768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where are you mapping the posting key from the csv file to the BAPI target structures? Well, you can't because there is no target field for posting key. This way SAP makes sure that the posting keys are consistent with the rest of the data you are posting.&lt;/P&gt;&lt;P&gt;Check out include LACC9F20, subroutine fill_acct_key.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 17:36:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703826#M1452768</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-02-23T17:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: FB01 uploading problem with posting keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703827#M1452769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You see, that's the problem. In the subject line of the question, you mention FB01. That's a transaction that can be used in batch input to post transactions, but you aren't using it here, so why mention it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the question itself, you talk about BAPI_ACC_DOCUMENT_CHECK. But it turns out this is not relevant either, because you actually use 'BAPI_ACC_DOCUMENT_POST' to post the document. You don't mention that until way down the list of replies. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want an answer to your questions, you have to give complete and accurate information at the beginning rather than expecting people to figure out what is really going on in your program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm going to lock this and you can either re-submit it after thinking a bit more clearly about the problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you can just read Thomas's answer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 17:37:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fb01-uploading-problem-with-posting-keys/m-p/6703827#M1452769</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-23T17:37:41Z</dc:date>
    </item>
  </channel>
</rss>

