2005 Aug 10 9:04 AM
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.
2005 Aug 10 9:28 AM
Try BAPI_ACC_DOCUMENT_POST, and fill the "accountpayable" structure for Vendor account.
2005 Aug 10 9:54 AM
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
2005 Aug 10 11:11 AM
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
2005 Aug 10 11:23 AM
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