Application Development and Automation 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: 
Read only

FB01 - Create an outgoing payment with a Bapi

Former Member
0 Likes
750

Hi there, I'm trying to simulate outgoing payments with BAPI_ACC_GL_POSTING_POST but I'm finding problems, does someone knows if this is the right bapi ??

I'm finding problems 'cause the bapi needs a gl account but I have to put the vendor code and I don't know if I'm doing right, I'm putting the code for the items (25 and 50) in the accountgl-doc_type field.

Hi there, I'm trying to simulate outgoing payments with BAPI_ACC_GL_POSTING_POST but I'm finding problems, does someone knows if this is the right bapi ??

I'm finding problems 'cause the bapi needs a gl account but I have to put the vendor code and I don't know if I'm doing right, I'm putting the code for the items (25 and 50) in the accountgl-doc_type field.

4 REPLIES 4
Read only

Former Member
0 Likes
693

Try BAPI_ACC_DOCUMENT_POST, and fill the "accountpayable" structure for Vendor account.

Read only

andreas_mann3
Active Contributor
0 Likes
693

Hi,

-accountgl-doc_type isn't 25 or 50

-> it's the document type -> look table t003

-25 / 50 are Posting keys -> look table tbsl

regards Andreas

Read only

Former Member
0 Likes
693

Thank you all, I'm trying to use BAPI_ACC_DOCUMENT_POST but I'm still finding problems.

First I putted 'RFBU' in the header-bus_act did I do right ?

I need to refer the payment to an invoice, wich are (number year) the fields that I must fill ?

and finally (for now) which are the posting keys fields ?

Thanks for your patience..

Message was edited by: Pino

Read only

0 Likes
693

You don't need to put posting key ( In fact with the Doc Type and the amount sign +/-, the Bapi deduce posting keys )

For the header you need :

[code]

documentheader-obj_type = 'BKPFF'.

documentheader-obj_key = '$'. " If external Num.

CONCATENATE sy-sysid 'CLNT' sy-mandt INTO documentheader-obj_sys.

documentheader-username = sy-uname.

documentheader-bus_act = 'RFBU'.

documentheader-header_txt = s_notilus-header_txt.

documentheader-comp_code = s_notilus-comp_code.

documentheader-fisc_year = sy-datum(4).

documentheader-doc_date = s_notilus-doc_date.

documentheader-pstng_date = sy-datum.

documentheader-doc_type = s_notilus-doc_type.

documentheader-ref_doc_no = s_notilus-ref_doc_no.

[/code]

Hope it helps

erwan