08-14-2009 12:59 PM
Hi All,
I need to post incoming payments by transaction F-28 by using the BAPI BAPI_ACC_DOCUMENT_POST.
what are the import parameters i need to pass to post incoming payments.....
I searched all threads where i didnt find the relavant information
Can u please help me to resolve this....
08-14-2009 1:10 PM
Hi Ravi!
Check it out. Here is an example of this BAPi using. Hope it will be useful for you.
08-14-2009 1:10 PM
Hi Ravi!
Check it out. Here is an example of this BAPi using. Hope it will be useful for you.
08-14-2009 1:13 PM
Hi,
You need to fill the import parameter : DOCUMENTHEADER which has the header information of the document that you are going to post and has information company code transaction type posting date and so on........so you ahve to create a work area with reference to structure : BAPIACHE09 and fill it with the relevent information that you would have provided while posting a document using the transaction also you need to pass tables parameter : CURRENCYAMOUNT which has the amount information for the document and the tables parameter RETURN in the tables parameter return you can create a table with reference to : BAPIRET2 and pass the blank table to the BAPI.
If you search SCN you can find several examples regarding calling of this BAPi and with the above info you should be able to build on that.
Hope that this helps.
himanshu
08-18-2009 7:21 AM
Hi,
I need to post the incoming payments for the transaction F-28 by using function module...BAPI_ACC_DOCUMENT_POST.
What are all the import parameters i need to pass for the FM to post incoming payments.
Please help me to resolve this........
Regards,
Ravi
08-18-2009 7:38 AM
Hi,
OK!!!
data:
obj_type like bapiache02-obj_type,
obj_key like bapiache02-obj_key,
obj_sys like bapiache02-obj_sys,
documentheader like bapiache08,
**** populate Doc Header
documentheader-username = sy-uname. <<<< Name of the user
documentheader-header_txt = 'Test using BAPI'.<<<<Header Text
documentheader-comp_code = '1000'. <<<<Company Cde
documentheader-doc_date = sy-datum. <<<<Document Date
documentheader-pstng_date = sy-datum. <<<<< Posting date
documentheader-doc_type = 'SA'. <<<<<Document Type
*****Populate GL line item
accountgl-itemno_acc = '1'. <<<< Item #
accountgl-gl_account = '0000160100'. <<<< GL account
accountgl-comp_code = '1000'. <<<< Company code
accountgl-pstng_date = sy-datum. <<<<<Posting Date
accountgl-doc_type = 'SA'. <<<<<Document Type
accountgl-profit_ctr = '0000010000'. <<<<Profit Center
append accountgl.
accountgl-itemno_acc = '2'.
accountgl-gl_account = '0000160100'.
accountgl-comp_code = '1000'.
accountgl-pstng_date = sy-datum.
accountgl-doc_type = 'SA'.
accountgl-profit_ctr = '0000010000'.
append accountgl.
You cna have multiple lines like above just increase the itemno_acc to the next number
***** Populate amount table
currencyamount-itemno_acc = '1'. <<< For which line
currencyamount-currency = 'GBP'. <<<< Currency
currencyamount-amt_doccur = '100.00'. <<<< Amount
append currencyamount.
currencyamount-itemno_acc = '2'.
currencyamount-currency = 'GBP'.
currencyamount-amt_doccur = '-100.00'.
append currencyamount.
Then
call function 'BAPI_ACC_GL_POSTING_POST'
exporting
documentheader = documentheader
tables
accountgl = accountgl
currencyamount = currencyamount
return = return
Regards,
Himanshu
08-18-2009 9:34 AM
Hi Varma,
Thanks alot for ur valuable information. i entered the importing data as u suggested .It is generating a posting document with out generating any errors.
But generally after posting the document ,it has to update the tables BKPF,BSEG .it is not updating the tables with the generated document number.And it is not clearing the amount in the transaction FBL5N...
To update all this is i need to pass any other fields values rather than u suggested....?]
And i am using the FM BAPI_ACC_DOCUMENT_POST to post the incoming payments..
Which bapi will compliance to post incoming payments among BAPI_ACC_DOCUMENT_POST or BAPI_ACC_GL_POSTING_POST?
Regards,
Ravi
08-18-2009 9:42 AM
Hi,
Also populate the structure :ACCOUNTRECEIVABLE to clear the customer account.
Regards,
Himanshu
08-18-2009 10:11 AM
Hi Varma,
I entered the values in the ACCOUNTRECEIVABLE also....Now i am getting a error like "Line item entered several times".
What it means ?
i filled the ACCOUNTRECEIVABLE table as item _num, G/L account numbers in ACCOUNTGL...
What actuvally i need to pass in ACCOUNTRECEIVABLE...?
Kindly help me to resolve this..
Regards,
Ravi
08-18-2009 10:22 AM
Hi,
fdo like below:
*****Populate GL line item
accountgl-itemno_acc = '1'. <<<< Item #
accountgl-gl_account = '0000160100'. <<<< GL account
accountgl-comp_code = '1000'. <<<< Company code
accountgl-pstng_date = sy-datum. <<<<<Posting Date
accountgl-doc_type = 'SA'. <<<<<Document Type
accountgl-profit_ctr = '0000010000'. <<<<Profit Center
append accountgl.
Customer Data
ACCOUNTRECEIVABLE-itemno_acc = '2'.
ACCOUNTRECEIVABLE-gl_account = '0000160100'.
ACCOUNTRECEIVABLEcomp_code = '1000'.
ACCOUNTRECEIVABLE-PMNTTRMS= 'ZPTRM'.
ACCOUNTRECEIVABLE-profit_ctr = '0000010000'.
append ACCOUNTRECEIVABLE.
Populate the CURRENCYAMOUNT here first line is for the first posting line on Gl teh second is for 2nd line of Customer.
Then call the FM
Regards,
Himanshu
08-18-2009 11:00 AM
Hi Varma,
i am passing the data like below....
populate Doc Header
documentheader-username = sy-uname.
documentheader-header_txt = 'Test using BAPI'
documentheader-comp_code = 'G010'.
documentheader-doc_date = sy-datum. <<<<Document Date
documentheader-pstng_date = sy-datum. <<<<< Posting date
documentheader-doc_type = 'ZF'. <<<<<Document Type
documentheader-fis_year = '2009'
documentheader-fis_period = '05'.
*****Populate GL line item
accountgl-itemno_acc = '1'. <<<< Item #
accountgl-gl_account = '1028000060'. <<<< GL account
accountgl-comp_code = 'G010'. <<<< Company code
accountgl-pstng_date = sy-datum. <<<<<Posting Date
accountgl-doc_type = 'ZF'. <<<<<Document Type
append accountgl.
accountgl-itemno_acc = '2'.
accountgl-gl_account = '1023000010'.
accountgl-comp_code = 'G010'.
accountgl-pstng_date = sy-datum.
accountgl-doc_type = 'ZF'.
append accountgl.
*******Populate Account Recivable
accountreceivable-item_acc = '3'
accountreceivable-customer =
accountreceivable-gl_account = '1028000060'
accountreceivable-comp_code = 'G010'
append accountreceivable.
accountreceivable-item_acc = '4'
accountreceivable-customer = 'A8000003'
accountreceivable-gl_account = '1023000010'
accountreceivable-comp_code = 'G010'
append accountreceivable.
Populate amount table
currencyamount-itemno_acc = '1'.
currencyamount-currency = 'INR.
currencyamount-amt_doccur = '25000,00''.
append currencyamount.
currencyamount-itemno_acc = '2'.
currencyamount-currency = 'INR.
currencyamount-amt_doccur = '-25000,00''.
append currencyamount
currencyamount-itemno_acc = '3'.
currencyamount-currency = 'INR.
currencyamount-amt_doccur = '25000,00''.
append currencyamount
currencyamount-itemno_acc = '4'.
currencyamount-currency = 'INR.
currencyamount-amt_doccur = '-25000,00''.
append currencyamount.
still i am getting errors.....is i need to change any thing...
Regards,
Ravi
08-18-2009 11:03 AM
08-18-2009 11:14 AM
Varma,
It is not getting any error.It is creating a document successfully..But it is not updating the tables BKPF,BSEG.
And it is not clearing the amount in transaction FBL5N
Regards,
Ravi
08-18-2009 11:22 AM
Hi,
Did you do a commit work after the BAPI call.
Regards,
Himanshu
08-18-2009 11:40 AM
Hi,
i am checking by passing all the values in the standard FM only....
Regards,
Ravi
08-18-2009 11:48 AM
try using:
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
RETURN =
.
after your bapi call and then check.
08-18-2009 12:00 PM
Hi,
i am passing the values directly in the standard FM only.Even i am running the transaction commit FM also after that..
Regards,
Ravi
08-18-2009 12:02 PM
you mean you are passing values to FM in se37?In that case it is only test environment and wont update anything even if you call FM for commit after that.
08-18-2009 12:04 PM
Hi,
So how can i know that whether it was clearing customer amount in FBL5N or not..?
Regards,
Ravi.
08-18-2009 12:07 PM
you will only get to know when you call the bapi in your program and not from se37 and then call bapi for transaction commit.
the se37 only provides test environment but does cause any database updates
08-18-2009 9:35 AM
08-18-2009 11:15 AM
you need to fill the these importing parameters
call function 'BAPI_ACC_DOCUMENT_CHECK'
destination dest
exporting
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
tables
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
.