Posting a particular Ledger using BAPI_ACC_DOCUMENT_POST

Is it possible to post to a specific ledger using the BAPI_ACC_DOCUMENT_POST.
Currently we use a BDC on FB01L and would like to convert this into a BAPI, Can this be done ?

Hi,
You can try with Posting Interface, please try with the following posting interface.
POSTING_INTERFACE_CLEARING     Post with clearing (FB05) using internal posting interface
POSTING_INTERFACE_DOCUMENT     Post document using the internal posting interface
POSTING_INTERFACE_END
POSTING_INTERFACE_RESET_CLEAR  Reset clearing via posting interface
POSTING_INTERFACE_REVERSE_DOC  Cancel document via posting interface
POSTING_INTERFACE_START        Initial information for internal accounting interface
Regards
Pugazhenthi.P

Similar Messages

  • Error in posting to a ledger using sapfgubt

    Hi experts,
    May I ask your help regarding the dump error I get when posting to a ledger using the sap standard program sapfgubt. Below is my code.
    loop at itab.
    move correspoding fields of itab to sidata.
    perform e10_ext_table(sapfgubt) using ' ' ' ' 'X' sidata.
    endloop.
    perform f80_set_end_docnr(sapfgubt).
    perform f40_update(sapfgubt) using 'X' ' '.
    commit work.
    The error happens inside the "commit work" statement. It calls another sap standard program SAPLGLIU. The error specifically happens under the include program "LGLIUF11" when it inserts the entries into the ledger.
    The error says runtime errors: "SAPSQL_ARRAY_INSERT_DUPREC" and Except.: "CX_SY_OPEN_SQL_DB".
    It is saying that the record already exists with the same key even if it doesn't exist in the ledger yet.
    I was able to find a partial solution by adding a number per document line. Now it posts to the ledger successfully but there are times also that it fails to post and the program still dumps.
    Is there an OSS for this? do I need to add something.
    Any suggestion would be much appreciated.
    Thanks a lot!
    Edited by: bgmis pma on Dec 9, 2008 6:57 AM

    check
    V_T52EL
    V_T52EK
    t code OBYE  OBYG  once
    check especially for The TDS  wage type
    if possible send me the screen shot of pay roll accounting simulation
    check my bcard for my info
    Edited by: Sikindar on Oct 16, 2008 3:59 PM

  • How to post Asset acquisition by using BAPI_ACC_DOCUMENT_POST

    Hello All,
    Can we use the bapi BAPI_ACC_DOCUMENT_POST to post ASSET ACQUISITION?
    I have posted ASSET ACQUISITION by using the transaction code F-90 successfully and the values are updated in asset aswell. but, I could not generate the same result by using the bapi BAPI_ACC_DOCUMENT_POST.
    Can anybody please suggest me how should I use this bapi to post Asset acquisition?
    Thanks in advance for your help.
    Regards,
    Vijay

    hi,
    BADI AC_DOCUMENT is available in the system.
    This badi is called whenever the account document is posted in the system.
    With the help of this badi, i guess you can change the t.code value.
    regards,
    Vinod.

  • Problems in Posting an Accounting Document using BAPI_ACC_DOCUMENT_POST

    Hi All,
    I am facing a problem when I try to post an accounting document using the BAPI "BAPI_ACC_DOCUMENT_POST".
    While passing data to the structure "ACCOUNTTAX", I get the errors "Required field AMT_BASE was not transferred in parameter CURRENCYAMOUNT" and "Required field TAX_CODE was not transferred in parameter ACCOUNTTAX".
    Till now I was not passing the ACCOUNTTAX structure to the BAPI and posting was happening fine.
    Any pointers / solutions in this direction will be most helpful.
    Thanks in advance.
    Regards,
    Keerthi

    Hi
      As u told earlier it was fine , so it may there is some config. change done by func. so this error is coming.
      For minimum required fields fo BAPI , u can go to SE37 and click on Function Module Documentation on Application tool bar.
    here u will find good help.
    Regards
    Sachin

  • Posting Vendor invoice details using  BAPI_ACC_DOCUMENT_POST

    Hi Techies
    M uploading f-02 data using bapi: BAPI_ACC_DOCUMENT_POST.. But m facing a problem while uploading vendor invoice details.. here goes the vendor line item data ..
    doc type : KR
    posting key :40
    vendor account :410000
    Amount :100
    cost center: 1000
    Text: text.
    in  BAPIACAP09(bapi for vendor item) i cant find costcenter which i can see in GLdata... where should i pass this cost center value???
    Thanks...

    For vendor invoices GLaccount will have cost centre data.the first line is always of vendor when you create vendor invoice in which vendor number is passed.
    In GLaccount apss your cost centre data.
    Nabhheet

  • How to populate COPA fields for GL posting using BAPI_ACC_DOCUMENT_POST

    Hi All,
    I am posting documents in FB50 using BAPI_ACC_DOCUMENT_POST. I have a requirement to post the documents with profitability segment parameters as well. Should I use EXTENSION1 table to pass COPA updates and implement BTE to achieve it? Can anyone please guide me with the procedure to populate the COPA fields for GL posting using BAPI_ACC_DOCUMENT_POST?
    Also please let me know how/where to check if COPA is enabled for a GL account.
    Thanks,
    Subathra

    Moderator Message: This forum is for questions directly related to Web Dynpro ABAP only.  It should not be used for general questions.  I am moving this thread to the ABAP General forum.

  • Problem while Posting a Document Using BAPI_ACC_DOCUMENT_POST

    Hi All,
    When i try to post my General Ledger Document using BAPI_ACC_DOCUMENT_POST, i face a situation due to the exchange rate. The field EXCH_RATE in CURRENCYAMOUNT table accepts only 5 decimals. But according to my scenario it should accept more than 5 decimals. Is there any BAPI or other way to solve this issue.
    Thanks & Regards,
    Venkatesh. R

    We restricted our entry to five decimals and solved the issue.

  • Problem in Posting data using BAPI_ACC_DOCUMENT_POST

    Hi ,
    I am trying to post a Sub-ledger account using the BAPI_ACC_DOCUMENT_POST.
    The Details I am passing are
    DOCUMENTHEADER
    USERNAME  -        UPPUVID
    COMPANY CODE - 1030
    DOC_DATE -           2/2/2009 
    PSTNG_DATE-        2/2/2009
    FISCAL YEAR-        2009
    PERIOD -                02
    DOC TYPE -            DR
    ACCOUNTGL
    ITEMNO_ACC   0000000002
    GL_ACCOUNT  230400   
    PROFIT_CTR    110001          
    ACCOUNTRECEIVABLE
    ITEMNO_ACC     0000000001
    CUSTOMER       40000087
    GL_ACCOUNT   110100  
    CURRENCYAMOUNT
    ITEMNO_ACC       CU CURRE CUR AMT_DOCCUR 
    0000000001          USD                    1,000.0000 
    0000000002          USD                    1,000.0000-
    The result shown is as follows.
    Document posted successfully: BKPFF 180001511510302009 DV1CLNT200 
    But when we go and check in FB03 .
    I am getting an error message saying Document doesnot exist for the Tcode 1030 .
    Also there is no corresponding entry in BKPF .
    Please let me know If I have to pass anything else to post the  data.
    Regards,
    Vidyulatha U.

    Hi Vidyulatha,
    You can also use FM : POSTING_INTERFACE_START & POSTING_INTERFACE_DOCUMENT & POSTING_INTERFACE_END.
    As you know you can post all types of documents through FB01.
    You can set the i_tcode as 'FB01' & i_sgfunct as 'C'.
    You just Pass on the values to these FMs.
    Edited by: Yogesh Karanjikar on Feb 2, 2009 10:55 AM
    Edited by: Yogesh Karanjikar on Feb 2, 2009 10:56 AM

  • How to post asset using BAPI_ACC_DOCUMENT_POST w/o creating custom OBJ_TYPE

    Hi,
    I want to post asset together with expense into one document. The first approach is to use BAPI_ACC_DOCUMENT_POST with custom obj_type, like ZBKPF. But when we post using the custom obj_type, we cannot reverse the document using FB08.
    Is that anyway we can post using BAPI_ACC_DOCUMENT_POST and reverse using FB08?
    Or is that any BAPI that can do this?
    Thanks,
    Tai
    Edited by: Tai Pang Ng on Apr 8, 2011 9:37 PM

    It is because I want to post asset. I tried to post my asset without specified the obj_type and acc_type, then I got an error saying cannot direct post thru my GL account. That's true becuase posting asset, we just use asset number and reconciliation GL.
    Then I tried to put my asset no in GL field, then I got another error saying the GL is not in Chart of Account, and that's true also becuase the asset no is never config in our chart of account.
    Then I found out that I had to specified the acct_type to 'A'. After that, I got another error saying RFBURFBU000000000000 is not define. That's I cannot post this thru obj_type RBFU. After checking that, I had to specified bus_act to RMWE and custom obj_type to some Z value to make it go.
    But after all these, I cannot reverse my posting using FB08 anymore because this is an custom obj_type and not allow to reverse using FB08.
    Please let me know if I made mistake in the above.
    Thanks,
    Tai

  • Issue with using BAPI_ACC_DOCUMENT_POST to write to table FAGLFLEXA.

    Hi,
    I'm using BAPI_ACC_DOCUMENT_POST to do intercompany posting. The posting is successful and I got the document created. The only problem is data is not written into table FAGLFLEXA. I searched in the forum and it said to make us of BTE RWBAPI01 to pass in the ledger to the document header. I have tried that, but that only writting the ledger to the document header in BKPF, still the data is not writting to the FAGLFLEXA table.

    Hi,
    I'm having the same problem. Could you solve this?
    Thank you in advance.
    Andrea

  • Accounting Document not Cleared using BAPI_ACC_DOCUMENT_POST

    Dear Experts,
    I am Using BAPI_ACC_DOCUMENT_POST to post the GL'S , Accounting document is getting created successfully . My Doubt is whether this bapi will clear the Accounting document automatically or we have to use any other function module to clear the Document?
    Please let me know how to clear the document.
    Thanks & Regards,
    Hemant Gulati(A1)

    Documents are not cleared; their line items are.
    Rob

  • Error while using BAPI_ACC_DOCUMENT_POST

    Hi all,
    while using BAPI_ACC_DOCUMENT_POST i am getting an error
    "G/L account not found in chart of accounts"
    But i am able to post a document in FB01 using the same G/L account.Moreover, this error is occuring only for posting key 50.
    Please help.

    Hi all,
    while using BAPI_ACC_DOCUMENT_POST i am getting an error
    "G/L account not found in chart of accounts"
    But i am able to post a document in FB01 using the same G/L account.Moreover, this error is occuring only for posting key 50.
    Please help.

  • Upload item text for FI document using BAPI_ACC_DOCUMENT_POST

    Hi,
    I need to upload FI document posting using BAPI_ACC_DOCUMENT_POST.  However item text that I received is too long and need to store at item long text.  So can we use BAPI_ACC_DOCUMENT_POST to upload long text for item text? If this possible, may I know how to do this.
    Thanks.
    Regards,
    ain

    Hi,
    You cannot pass item long text using this BAPI,  Call the function module SAVE_TEXT after successfull call of BAPI
    Call Save_Text with following parameters.
    Text_ID : 0001 (Notes)
    Text_object : DOC_ITEM (Line Item Text)
    Language : EN
    Text Name : Company code +Document NO + Fiscal Year + Line item ID
    Regards
    Vinod

  • Down payment request for assets using bapi_acc_document_post

    Hi guys(girls)!,
    I<< priority reduced >>
    I'm posting a down payment request to an asset with a z program using bapi_acc_document_post. Everything is fine, but, when i go to fb03 to check the generated document i don't see the asset number associated to the purchase doc. When i go to bseg to check, i don't see the asset number and the subnumber. I lack just these to fields even i'm passing the values to correct fields in bapiacgl09.
    This is the values i'm passing:
    wa_acctgl-itemno_acc  =  iterator.
    wa_acctgl-gl_account  =  lv_skont.
    wa_acctgl-vendor_no   =  p_vendor.
    wa_acctgl-doc_type    =  p_tipdoc.
    wa_acctgl-item_text   =  p_txtcab.
    wa_acctgl-po_number   =  p_ponum.
    wa_acctgl-po_item     =  s_ekpo-ebelp.
    wa_acctgl-serial_no   =  imp_no.
    wa_acctgl-asset_no    =  wa_ekkn-anln1.
    wa_acctgl-sub_number  =  wa_ekkn-anln2.
    wa_acctgl-acct_type   =  'A'.
    wa_acctgl-CS_TRANS_T  =  '100'.
    wa_acctgl-asval_date  =  sy-datum.
    APPEND wa_acctgl      TO gt_acctgl.
    CLEAR wa_acctgl.
    Please help!.
    Edited by: Rob Burbank on Oct 24, 2011 9:44 AM
    Edited by: ramvargash on Oct 25, 2011 2:54 PM

    Hi Eduardo, what i'm trying to do is a down payment request for an asset. Indeed, i do the post. My problem is that the asset main number and the asset subnumber are not getting saved in bseg, so when i go to fb03 and double click on a line item, i got prompt to fb03 in visualize mode, and the fixed asset field is blank.
    I have now a week trying to get the asset main number and the asset subnumber getting saved in bseg. I note that i have other field that are not getting saved 'cause i'm not passing the value thru the bapi. This field is LNRAN.
    If you or anybody have a clue how to solve this, i would appreciate the help.
    Ramón Vargas

  • Inter company GL Postings using BAPI_ACC_DOCUMENT_POST

    Hi,
    I am having a requirement where one GL entry will be done for one company code and the 2nd entry will be done for another company code.
    In this case there are 3 documents that are being generated.
    One document for each company code and 3rd one for cross company code GL posting.
    Can you please tell me how this can be done technically using some BAPI's or FM.
    I tried using BAPI_ACC_DOCUMENT_POST, but was not successful
    Appreciate any help in this regard.
    Thanks and regards,
    Hariharan

    I have found it out myself. You can give the company code at item level and though the document number it gives back is the document for the header level code, where as this document contains the cross company code document inside it.

Maybe you are looking for

  • SQL query for date & time interval

    Hello everyone, there is my problem I have to make a search for events that are taking place during inserted date & time . There's the table structure: event datefrom dateto timefrom timeto The problem is, when I try: select * from xyz where datefrom

  • Where i might be doing wrong in Bulk collect ,forall

    DECLARE CURSOR Cur_sub_rp IS SELECT A.SUB_ACCOUNT, B.RATE_PLAN,B.SUB_LAST_NAME,A.SUB_SSN FROM STG_SUB_MASTER_MONTH_HISTORY A, SUB_PHONE_RATEPLAN B WHERE A.SUB_ACCOUNT = B.SUB_ACCOUNT (+) AND A.MONTH_ID = B.MONTH_ID ; TYPE t_values_tab IS TABLE OF cur

  • I get the following error when trying to open iTunes

    I get the following error when trying to open iTunes: iTunes.exe - Entry Point Not Found The procedure entry point AVCFAssetCreateWithByteStreamAnd Options could not be located in the dynamic link library AVFoundationCF.dll. Any help would be much ap

  • Why is my Spry menu so slow in IE?

    Hallo all I'm a novice web designer. We're re-designing our very outdated travel website. The old site used (still uses...) images in its dropdown menu. I was very excited to discover the Spry widgets and it was one of the main reasons we upgraded ou

  • [solved] thunar and udev rules

    I want to hide my windows paritions (sda1 and sda2) in thunar. But even if i set udev rules... they still appear. → cat /etc/udev/rules.d/10-hide-partitions.rules KERNEL=="sda1",ENV{UDISKS_PRESENTATION_HIDE}="1" KERNEL=="sda2",ENV{UDISKS_PRESENTATION