05-08-2006 6:38 AM
05-08-2006 6:55 AM
Hi Ester,
see the function groups ACC3, ACC4, ACC5, ACC6.
I hope it helps you.
Best regards
Timo
05-08-2006 6:46 AM
Hi,
try these:
BAPI_ACC_GL_POSTING_POST
BAPI_ACC_BILLING_POST
BAPI_ACC_INVOICE_RECEIPT_POST
regds,
latheesh
05-08-2006 6:47 AM
Hi,
Have a look..............
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
EXPORTING
documentheader = it_hdr
TABLES
accountgl = it_gl
ACCOUNTRECEIVABLE = act_rec
currencyamount = it_curr
return = t_result.
LOOP AT t_result WHERE ( type = 'E' OR
type = 'A' ).
EXIT.
ENDLOOP.
IF sy-subrc <> 0.
REFRESH t_result.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = it_hdr
TABLES
accountgl = it_gl
ACCOUNTRECEIVABLE = act_rec
currencyamount = it_curr
return = t_result.
*
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
Thanks.
If this helps you reward with points.
05-08-2006 6:55 AM
Hi Ester,
see the function groups ACC3, ACC4, ACC5, ACC6.
I hope it helps you.
Best regards
Timo
05-08-2006 9:05 AM
Hi All,
I am using BAPI_ACC_DOCUMENT_POST to post for gl account : 15548 and AP account: 200994 , since the special GL of 200994 : 15530 is set to have profit centre required field, the BAPI keeps returning error : Field Profit Ctr is a required field for G/L account FNW 15530.
In BAPI for account payable internal table itself doesnt have profit center's field, any advice for this problem ?
05-08-2006 9:21 AM
Hi,
This profit center field it is there in ACCOUNTGL table.
Vendor details you pass in AP table and counter you can do it in ACCOUNTGL table.
Check it.
Thanks.
If this helps you reward with points.
05-08-2006 9:22 AM
Hi Deepak,
I have put the profit center in ACCOUNTGL table, but still the error appears as if it cant find it.
05-08-2006 9:27 AM
Hi,
Post your code here what parameters you are pasing let us see.....
Thanks.
05-08-2006 9:28 AM
Can these BAPI's be used for external invoices too? External, as in: not SAP module invoices? For example an Access aplication?
05-08-2006 9:37 AM
hi deepak,
below is the coding;
gs_documentheader-obj_type = BKPFF.
gs_documentheader-obj_key = 0200189323FNW 2006.
gs_documentheader-obj_sys = MAXIS100.
gs_documentheader-bus_act = RFBU.
gs_documentheader-username = sy-uname.
gs_documentheader-header_txt = test.
gs_documentheader-comp_code = FNW.
gs_documentheader-doc_date = sy-datum.
gs_documentheader-pstng_date = sy-datum
gs_documentheader-fisc_year = 2006.
gs_documentheader-fis_period = 05
gs_documentheader-doc_type = EJ.
gs_documentheader-ref_doc_no = aaa.
gs_accountgl-itemno_acc = '0000000001'.
gs_accountgl-gl_account = 15548.
gs_accountgl-P_EL_PRCTR = ZBSMBL.
APPEND gs_accountgl TO gt_accountgl.
gs_currencyamount-itemno_acc = '0000000001'.
gs_currencyamount-currency = RM.
gs_currencyamount-amt_doccur = 100.
APPEND gs_currencyamount TO gt_currencyamount.
gs_accountpayable-itemno_acc = '0000000002'.
gs_accountpayable-vendor_no = 200994.
gs_accountpayable-item_text = testing
gs_accountpayable-sp_gl_ind = R.
APPEND gs_accountpayable TO gt_accountpayable.
gs_currencyamount-itemno_acc = '0000000002'.
gs_currencyamount-currency = RM
gs_currencyamount-amt_doccur = 100-.
APPEND gs_currencyamount TO gt_currencyamount.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = gs_documentheader
CUSTOMERCPD =
CONTRACTHEADER =
IMPORTING
obj_type = gv_obj_type
obj_key = gv_obj_key
obj_sys = gv_obj_sys
TABLES
accountgl = gt_accountgl
ACCOUNTRECEIVABLE =
accountpayable = gt_accountpayable
ACCOUNTTAX =
currencyamount = gt_currencyamount
CRITERIA =
VALUEFIELD =
EXTENSION1 =
return = gt_return
PAYMENTCARD =
CONTRACTITEM =
extension2 = gt_extension2
REALESTATE =
.
05-08-2006 9:41 AM
edited:
gs_accountgl-PROFIT_CTR = ZBSMBL.
the error still return :Field Profit Ctr is a required field for G/L account FNW 15530
Both 15530 and 15548 are set to 'profit center' is mandatory field.
05-26-2006 8:48 PM
Hello
Use the BAPI BAPI_INCOMINGINVOICE_CREATE, the BAPI clear documentation, which will help you how to pass the values to the BAPI
05-26-2006 8:52 PM