cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi Friends,

Thanks in Advance.

I am using the BAPI 'BAPI_ACC_DOCUMENT_POST' for the FB70 T.Code.

Please check the Below Code...

Moderator message - Please see below

The above code is Executing Perfectly...and generating the Accounting Documnet Number.

But the Problem is i cant able to see the Generated Accounting Document Number in FB03.

I had crossed Checked with the G/L Account in FBL3N T.Code and with Customer Number in FBL5N T.Code

Finally i checked the Data Base Table BKPF & BSEG.

But no use.

i can't understand where the problem is...

Whether in Customizing or in Table Inconsistency or i have to Send any other parameter.

If we try to post using Standard Transaction FB70 / FB60 it is Posting Successfully.

i mean we can see this A/C Number in FB03, FBl3N, FBl5N and in BKPF & BSEG Tables.

Regards:

Sridhar.J

Edited by: Rob Burbank on Sep 22, 2009 2:10 PM

0 Likes
View Entire Topic
Former Member
0 Likes

Hi Take a look at the and check the parameter

bapiache09-username       = sy-uname.
  bapiache09-bus_act        = 'RMRP'.
  bapiache09-comp_code      = bkpf-bukrs.
  bapiache09-pstng_date     = bkpf-budat.
  bapiache09-doc_date       = bkpf-budat.

***************************************************************************************
* POPULATE THE GL ITEM.

  it_bapiacgl09-itemno_acc = '0000000001'.
  it_bapiacgl09-gl_account = rf05a-konto+6(10).
  it_bapiacgl09-comp_code  = 'RS01'.
  it_bapiacgl09-bus_area   = busa.
  append it_bapiacgl09.
  clear it_bapiacgl09.
  amtp =  -1 * amtp .
  it_bapiaccr09-itemno_acc   = '0000000001'.
  it_bapiaccr09-currency_iso = 'INR'.
  it_bapiaccr09-amt_doccur   = amtp.
  it_bapiaccr09-amt_base     = amtp.
  append it_bapiaccr09.

*************************************************************************************

  it_bapiacap09-itemno_acc   = '0000000002'.
  it_bapiacap09-vendor_no    = rf05a-agkon.
*  it_bapiacap09-PMNTTRMS     = '0001'.
  append it_bapiacap09.
  clear it_bapiacap09.
*lf_inv = -1 * lf_inv.
  it_bapiaccr09-itemno_acc   = '0000000002'.
  it_bapiaccr09-currency_iso = 'INR'.
  it_bapiaccr09-amt_doccur   = lf_inv.
  it_bapiaccr09-amt_base     = lf_inv.
  append it_bapiaccr09.
  clear :it_bapiaccr09.
*****************************************************************************************
  it_bapiacgl09-itemno_acc = '0000000003'.
  it_bapiacgl09-gl_account = '0056000002'.
  it_bapiacgl09-comp_code  = 'RS01'.
  it_bapiacgl09-bus_area   = busa.
  it_bapiacgl09-costcenter = 'D1102'.
  append it_bapiacgl09.
  clear it_bapiacgl09.

  bank_c = -1 * bank_c.
  it_bapiaccr09-itemno_acc   = '0000000003'.
  it_bapiaccr09-currency_iso = 'INR'.
  it_bapiaccr09-amt_doccur   = bank_c.
  it_bapiaccr09-amt_base     = bank_c.
  append it_bapiaccr09.
  clear it_bapiaccr09.
   
 call function 'BAPI_ACC_DOCUMENT_POST'
       exporting
         documentheader          =  bapiache09

       tables
      accountgl              =  it_bapiacgl09[]
      accountpayable         =  it_bapiacap09[]
**   ACCOUNTTAX              =
         currencyamount      =  it_bapiaccr09[]
         return              =  it_return[]  
  endif.
  if sy-subrc = 0 .
    call function 'BAPI_TRANSACTION_COMMIT'.

    leave to list-processing.
    perform refresh.
    loop at it_return .
      write: / it_return-message.
    endloop.
  else.
    leave to list-processing.
    perform refresh.
    loop at it_return .

write: / it_return-message.

endloop.

endif.

with regards

Nilesh