How to create an Accounting Document by calling BAPI

Hai friends ,
please tell me how to call this BAPI and fulfill all the parameters .. Please help me , I dont know the head and tail of it ...
create an Accounting Document by calling BAPI  BAPI_ACC_DOCUMENT_POST
Below is the step to fill the parameters for BAPI:
Enter company code, invoice no, invoice date, document type, header text into DOCUMENTHEADER
Enter customer, item text, company code, payment term into ACCOUNTRECEIVABLE
Enter offset account, company code, document type, item text into ACCOUNTGL
Enter currency type u201800u2019, currency, exchange rate, amount into CURRENCYAMOUNT. Please note there will be two rows in this table, one positive amount and one negative amount
Call the BAPI to create the AR document. If p_check is checked, call the BAPI only without COMMIT and then do the message processing
If p_check is initial, COMMIT the data to the database tables.
Check the RETURN table after each BAPI, if no u2018Eu2019 message type found, output the document no. Otherwise, output the error messge to the screen with the message type u2018Eu2019.
thanks in advance ...

Hi,
Check the link
http://www.sapbrainsonline.com/sapinfo/tutorial.php?artid=617
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi_acc_document_post-error-1973720
http://delaynomore.spaces.live.com/blog/cns!D2BFFB84EDFE4189!528.entry
http://sap4.com/wiki/index.php?title=BAPI_ACC_DOCUMENT_POST
http://www.sapfans.com
Anurodh

Similar Messages

  • How to Create an FI document using a BAPI

    Hi,
    I have a requirement as under(for a report creation):
    I need get all the Account numbers(from table BSIS) depending on the Posting date(BUDAT) and the Price difference accounts(HKONT) for the previous month(say 1/1 to 31/1).
    After I get all the details from BSIS, I will have to get the Material Number(MATNR), Plant(WERKS), Local Currency, Foreign Currency, Material Quantity and etc., from BSEG(by comparing the Accounting Document Number) which is common in both the tables BSIS and BSEG.
    Now, for all these docs, I need to create a single FI document(that has to cover all these documents) by using the Document type,Posting date and Reclassed Account number and some text has to be inserted into the Item text field.
    I came to know that, we have to use a BAPI inorder for this purpose, I could not get the exact one.
    Please help me in this regard by giving your valuable inputs.
    Regards,
    Vishnu.

    Continue..........
      accountgl-itemno_acc = '2'.
          accountgl-gl_account = 'WRITE UR GL NO'.
          accountgl-comp_code = '1000'.
          accountgl-pstng_date = itab-budat.
          accountgl-doc_type = 'SA'.
          accountgl-profit_ctr = itab-prctr.
          accountgl-alloc_nmbr = itab-zuonr.
          accountgl-po_number  = itab-ebeln.
          accountgl-po_item = itab-ebelp.
    *    accountgL-DE_CRE_IND = 'S'.
          APPEND accountgl.
          currencyamount-itemno_acc = '2'.
          currencyamount-currency = 'USD'.
          currencyamount-amt_doccur = itab-grval.
          APPEND currencyamount.
    *    zsched_line = zsched_line + 1.
    ***line itme 2
          accountgl-itemno_acc = '1'.
          accountgl-gl_account = 'YOUR GL NO'.
          accountgl-comp_code = '1000'.
          accountgl-pstng_date = itab-budat.
          accountgl-doc_type = 'SA'.
          accountgl-profit_ctr = itab-prctr.
          accountgl-alloc_nmbr = itab-zuonr.
    *    accountgl-po_number  = itab-ebeln.
          accountgl-po_item = itab-ebelp.
    *    accountgL-DE_CRE_IND = 'H'.
          APPEND accountgl.
          currencyamount-itemno_acc = '1'.
          currencyamount-currency = 'USD'.
          itab-grval = itab-grval * -1.
          currencyamount-amt_doccur = itab-grval.
          APPEND currencyamount.
    ELSE.
          documentheader-username = sy-uname.
          CONCATENATE itab-mblnr itab-mjahr INTO documentheader-header_txt.
          documentheader-comp_code = '1000'.
          documentheader-doc_date = itab-bldat.
          documentheader-pstng_date = itab-budat.
          documentheader-doc_type = 'SA'.
          documentheader-ref_doc_no = itab-xblnr.
    *    documentheader-BUS_ACT = 'F-02'.

  • Cannot create an accounting document  for year-end-closure

    Good morning,
    I am dealing with an urgent issue related to the year-end-closing.
    The accounting document cannot be created because the account 9600700000 does not exist in standard chart of accounts.
    The system wants to pick up an account which is used by the chart of accounts of the country CAGR. This is used for the analytical ledger at the end of the month.
    When I compare it with another example which was posted correctly, I see that the account 9600700000 was used in the Special ledger.
    Do you have any idea how to create the accounting document?
    Thank you very much.
    Kind regards,
    Linda

    Issue solved

  • How to create an account without a credit card

    Does anyone know how to create an account without using a credit card?

    Yes.  Follow the instructions in this Apple support document.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    B-rock

  • How to Create Test Sequence Document in HTML using command line

    How to Create Test Sequence Document  in HTML using command line
    I have lot of sequences and I want to create Test Sequence Documentation in HTML format using Command Line automatically, is there a way to automate this task using .bat file or using   C#  .Net

    If you aren't able to figure out how to call a C++ DLL in .net then there may be another option.  Unfortunately I don't know how to do this off the top of my head and I don't have an example.
    The other option would be to change docgen.seq a little bit to the dialog doesn't display and you just hardcode the options.  Then you can use a command line to call testexec.exe: http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/startup_opt/
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Creating an Accounting Document for Invoice

    We cannot create an accounting document for Invoice.There is no problem in account determination procedure. I've tried to clear in VFX3, but gives me an error message that says  "express document 'update was terminated' received from author.
    After analysis the error being reported is:
    "M2 012: Error determining posting period (info structure S010).Function module is MCV_STATISTICS_UPD_V1_INVOICE     V1 NORMAL     
    Can you suggest how we can post/Release to Accounts?

    Hi Narendra
    Go to T-code MCVV. In this case since the doc is not created it will not work.
    Is there an ST22 dump. if yes put a break point there.
    Check SM13 and you can see the here where the update fails. Apply break point there.
    Go to MC26 and enter S010 and check if any update rules exisit. in one of the formulas you need to put a break point.then go back to VF01 and then before you hit the save enter /h in the command box to go into debug mode.
    Once in debug mode Follow the menu path Setings--->update debug on/off.Debug and see why the update is failing.
    Thanks

  • How to find the accounting document

    Dear all,
    Can somebody tell me how to find the accounting document from the MIGO transaction. I entered a goods delivery into the system. An accounting document should already be created.
    Best Regards
    Jerome

    Hi Jerome
    Go to that that material document (which was created through migo transcation)and click on Doc info header. There you can find FI documents. It will give the accounting documents (if any that has been created).
    Hope this helps.
    regards
    Anand.c

  • How to create a account key for application type M ?

    Hi Guys,
    How to create a account key for application type M ? and link the same with
    Gl account.
    thanks.

    Hi
    Please create the account keys or transaction keys in
    SPRO-> IMG-> MM-> Purchasing-> Conditions-> Define Price Determination Process-> Define Transaction/Event Keys
    Thanks & Regards
    Kishore

  • HT4436 I have a windows PC. When I enter my apple id and password to the icloud, it shows "Apple id is correct but it's not an iCloud account" So how I create iCloud account or how can I fix it?

    I have a windows PC. When I enter my apple id and password to the icloud, it shows "Apple id is correct but it's not an iCloud account" So how I create iCloud account or how can I fix it?

    To enable iCloud on your Windows PC,
    first set up iCloud on your other (Apple) devices,
    then install the iCloud Control Panel for Windows...
    From Here  >  http://www.apple.com/icloud/setup/pc.html

  • How to create an XML document from a String.

    Can anyone help,
         In the Microsoft XML Document DOM there is a load function load(string) which will create an XML document, but now we are switching to Java and I do not know how to create and XML document from a string, this string �xml document� is passed to my program from a webservice and I need to read several xml elements form it in a web server.
    This string is a well formatted XML document:
    <?xml version="1.0" encoding="UTF-8"?>
    <Countries NumberOfRecords="1" LanguageID="en-us">
         <Country>
              <CountryCode>AU</CountryCode>
              <CountryName>AUSTRALIA</CountryName>
         </Country>
    </Countries>

    Thanks PC!
    I made it work using:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    factory.setIgnoringComments(true); // We want to ignore comments
    // Now use the factory to create a DOM parser
    DocumentBuilder parser = factory.newDocumentBuilder();
    //TransformThisStringBuffer is a string buffer wich contain the 'XML document (String)'
    InputStream in = new ByteArrayInputStream(TransformThisStringBuffer.toString().getBytes());
    // Parse the InputStream and build the document
    Document document = parser.parse(in);
    But which one is faster InputSource or InputStream, were would you put the "new InputSource(new StringReader(yourString))" in the above code?

  • How to create the change document functionality for a dependent objects?

    May I please know how to create the change document functionality for a dependent objects?
    I have done it follow the same process as for business process objects. But when i try to test it in BOBT, there is no records under "FIELD_CHANGE_WITH_FILTER". It seems the change hasn't been recorded.
    If the way I did to create change document for dependent object is correct, please also kindly advise the possibilities for why there is no record during testing.
    thanks in advance.

    I also have some doubts about the business object.In this case,one abstract BO hase a subnode wihich is root extended.I added the change document for this node under the category "root_extended" and then tested the function in BOBT.I got some error message "can't find the root key".Shall i redefine the method /BOFU/IF_CDO_CREATION~IS_CDO_CREATION_ACTIVE so as to solve the problem?
    Thx.

  • How to create an account w/o having to specify object owner_names

    Hi,
    Do you know how to create an account, that, when logged in wouldn't need to use the following syntax when referring to objects: select * from <owner_name>.<object_name>.
    When the owner of the account creates an object, then obviously, it's not necessary to specify the owner_name (syntax: select * from <object_name>;), but, I'd like an account with ie: (username: joey) to not have to specify the owner_name for all the objects owned by another owner (ie: bob).
    Is this possible?
    Thanks.
    Todd

    This is one use for SYNONYMs. You can create a private synonym for JOEY:
    create synonym joey.table_a for bob.table_a; or a public synonym:
    create public synonym table_a for bob.table_a;public synonyms mean everybody can seen the table without prefixing it with the owner; but PUBLIC synonyms, like PUBLIC grants, make fine-grained security access harder to achieve.
    In the first case the account creating the synonym must have rights on BOB's tables and (unless the account creating the synonym is JOEY) the CREATE ANY SYNONYM privilege. In the second case they must have rights on Bob's tables and CREATE PUBLIC SYNONYM privilege.
    In both cases the account must either be BOB or have been granted access to BOB's tables: if the creating account is not JOEY they must have been granted the privileges WITH ADMIN option: it's no good having a synonym on BOB's table_a if you don't have the privilege to select from it. This is important because it is possible to create a synonym for an object you don't have rights on or indeed that doesn't exist.
    I hope that's clear.
    rgds, APC
    null

  • How to Create an XML document from XSQL servlet which follows a particular DTD struct

    how to Create an XML document from XSQL servlet which follows a particular DTD structure.Could anyone send me a sample code for this.

    You'll need to associate an XSLT transformation with your XSQL page that transforms the canonical result into your DTD-valid format.
    For example, given an XSQL page like:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="rss.xsl" ?>
    <xsql:query max-rows="3" connection="demo" xmlns:xsql="urn:oracle-xsql">
    select title,id,description,url,to_char(timestamp,'Mon DD') timestamp
    from site_entry
    order by id desc
    </xsql:query>and an "rss.xsl" stylesheet that looks like this:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" indent="yes" doctype-system="rss-0.91.dtd"/>
    <xsl:template match="/">
    <xsl:for-each select="ROWSET/ROW">
    <rss version="0.91">
    <channel>
    <title>Do You XML?</title>
    <link>http://xml.us.oracle.com</link>
    <description>Oracle XML Website Demo</description>
    <language>en-us</language>
    <xsl:for-each select="ITEM">
    <item>
    <title><xsl:value-of select="TITLE"/></title>
    <link><xsl:value-of select="URL"/></link>
    <description><xsl:value-of select="DESCRIPTION"/></description>
    </item>
    </xsl:for-each>
    </channel>
    </rss>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>You produce DTD-valid output against the rss-0.91.dtd DTD that looks like:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!DOCTYPE rss SYSTEM "rss-0.91.dtd">
    <rss version="0.91">
    <channel>
    <title>Do You XML?</title>
    <link>http://xml.us.oracle.com</link>
    <description>Oracle XML Website Demo</description>
    <language>en-us</language>
    </channel>
    </rss>
    <rss version="0.91">
    <channel>
    <title>Do You XML?</title>
    <link>http://xml.us.oracle.com</link>
    <description>Oracle XML Website Demo</description>
    <language>en-us</language>
    </channel>
    </rss>
    <rss version="0.91">
    <channel>
    <title>Do You XML?</title>
    <link>http://xml.us.oracle.com</link>
    <description>Oracle XML Website Demo</description>
    <language>en-us</language>
    </channel>
    </rss>

  • How to create reconciliation account

    hi gurus,
    when iam trying to create a customer,system is asking reconciliation account.But,in the selection list,there are no entries found for reconciliation account..can u please tell me how to create reconciliation account,step by step..this is very urgent...
    Thanks in advance...
    Regards..
    Yogi..

    Hii
    system is giving this error as customer and vendor accounts are needed to update the GL account and the accounts are kind of subledger account,...
    so u need to create the sundry debtors or creditors account in FS00. here under description tab u need to select balance sheet account and under control tab select reconciliation account type as customer or vendor... whatever applicable..
    now give the same GL account number in customer or vendor master data in reconcilliation account number.
    so that through this recon. account is a GL account to which subsidiary ledgers (customer and vendor) are connected and updated..
    hope u got ur answer
    reward points
    sejal

  • Problem in creating an account document using BAPI_ACC_DOCUMENT_POST

    Hi Experts,
    I have a porblem while creating an account document from BAPI_ACC_DOCUMENT_POST.
    The problem is acc document is geeting posted and I am getting an document number for that bapi, but its not getting saved to data base and I am getting the following error message
    "Document 1900004327 3000 does not exist in fiscal year 2005
    Message no. F5A397
    System Response
    The required document either does not exist in the fiscal year or is still being posted.
    When the document is read, archived documents are also considered."
    Please sugggest...
    We are using ECC 6.0
    Thanks,
    Suma.

    Hi,
    this means that the posting is not open...
    try with 2008...
    or else ask ur financial consultatto check, whether the 2005 is open or not.
    u also try posting manually using FB01 with same entries u r using for this BAPI...so that u can track the error.
    Also use BAPI_TRAACTION_COMMIT after bapi post.
    check ur subsystem which u r passing for the BAPI..
    wa_general-assetsubno = '0000'. Is it 3000 or 0000
    Try using 0...
    Edited by: Sumi Vasu on May 14, 2008 8:13 AM

Maybe you are looking for

  • Want to view the created zip file via Bursting in Oracle Apps

    Hello, I' ve created a Bursting control file and invoked the concurrent request (XML Publisher Report Bursting Program, XDOBURSTREP) within the after-report trigger in oracle reports. My Bursting-Control file as follows: <xapi:requestset xmlns:xapi="

  • [svn:fx-4.0.0] 13541: Part 2 of fixing line endings in AS and MXML files so that line numbers are correct while debugging .

    Revision: 13541 Revision: 13541 Author:   [email protected] Date:     2010-01-15 16:47:34 -0800 (Fri, 15 Jan 2010) Log Message: Part 2 of fixing line endings in AS and MXML files so that line numbers are correct while debugging. All AS and MXML files

  • Help Would be cool!!

    Hi, I'm trying to deploy my business components to my middle tier to access data in Oracle 8i. I have to make a JDBC connection from my middle tier to 8i(the IIOP connection to 8i just doesn't work) Can I do this by simple creating a .jar for the bus

  • ThinkPad X1 Carbon scrolling not working

    Hello, I just received my new ThinkPad X1 Carbon (Type 20A7). This is running with Windows 7, 64 bits. Scrolling from the touchpad (with one or two fingers) does not work. I tried installing the latest drivers from Lenovo's website (although you woul

  • Unable to add tunes to library

    I have tried to add a few songs to my library so I can put them on my iPod Nano. It doesn't want to add a few songs and I have no idea why. It'll add some tunes but when I went to add two tunes from one band and three tunes from another, it won't do