Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI for FB01

Former Member
0 Kudos

hi all,

is there BAPI for FB01 transaction

1 ACCEPTED SOLUTION

timo_wendt
Explorer
0 Kudos

Hi Ester,

see the function groups ACC3, ACC4, ACC5, ACC6.

I hope it helps you.

Best regards

Timo

12 REPLIES 12

Former Member
0 Kudos

Hi,

try these:

BAPI_ACC_GL_POSTING_POST

BAPI_ACC_BILLING_POST

BAPI_ACC_INVOICE_RECEIPT_POST

regds,

latheesh

Former Member
0 Kudos

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.

timo_wendt
Explorer
0 Kudos

Hi Ester,

see the function groups ACC3, ACC4, ACC5, ACC6.

I hope it helps you.

Best regards

Timo

0 Kudos

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 ?

0 Kudos

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.

0 Kudos

Hi Deepak,

I have put the profit center in ACCOUNTGL table, but still the error appears as if it cant find it.

0 Kudos

Hi,

Post your code here what parameters you are pasing let us see.....

Thanks.

0 Kudos

Can these BAPI's be used for external invoices too? External, as in: not SAP module invoices? For example an Access aplication?

0 Kudos

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 =

.

0 Kudos

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.

0 Kudos

Hello

Use the BAPI BAPI_INCOMINGINVOICE_CREATE, the BAPI clear documentation, which will help you how to pass the values to the BAPI

0 Kudos

You can use FM POSTING_INTERFACE_DOCUMENT instead BAPI.

Regards.