Вы находитесь на странице: 1из 3

BAPI_ACC_DOCUMENT_POST

FM:

POSTING_INTERFACE_START, POSTING_INTERFACE_DOCUMENT,
POSTING_INTERFACE_END.

Post document using the internal posting interface

Function module 'POSTING_INTERFACE_DOCUMENT' creates a batch input transaction ( or Call Transaction


... Using ...) for a document to be posted with FB01 or FBB1.

You should transfer all document header and document item data which is needed for this document to table
T_FTPOST.

Note the following rules:

 The data is marked with a record type (header, code = K; item, code = P) and counter.

 Up to 950 line items can be transferred.

 The data is transferred with the field name and field value.

 The data must be transferred in the following sequence:

 The data must be transferred in the following sequence:

o Document header data ( K 1)

o Document item 1 ( P 1)

o Document item 2 ( P 2) etc.

 The field names are the same as those used on the entry screen (e.g. 'BKPF-WAERS', 'BSEG-
WRBTR', 'COBL-GSBER'...).

 The footer data can be transferred using the following fields:

o Posting key: RF05A-NEWBS or BSEG-BSCHL

o Account number: RF05A-NEWKO or BSEG-KONTO


or BSEG-KUNNR (for customer accounts)
or BSEG-LIFNR (for vendor accounts)
or BSEG-HKONT (for G/L accounts)

o Special G/L indicator: RF05A-NEWUM or BSEG-UMSKZ

o Company code (for intercompany posting):


RF05A-NEWBK or BSEG-BUKRS.
o The field names are analyzed by the function module so that the data can be assigned to the
right screens. Field names for one-time data or data for an alternative payer must start with
'BSEC-', for example (see screen SAPLFCPD 0100).

Processing with 'Call Transaction ... Using '

If processing takes place with 'Call Transaction .. Using', the initiator can see whether processing was
successful by looking at the export parameter'SUBRC'.

SUBRC = 0 means that the document was posted. The document number is stored in table T_BLNTAB. For
intercompany documents, several document numbers are stored here.

SUBRC <> 0 means that the document could not be posted. Information concerning the error which has arisen
is returned via the message fields MSGID, MSGNO, etc.

Support of transaction 'FBB1'

If you want to access transaction FBB1, you should note the following:

 Enter the foreign currency key in field BKPF-WAERS.

 In this transaction you should enter the local currency amount in field BSEG-WRBTR for each
document item.

Parameters
I_TCODE
I_SGFUNCT
I_NO_AUTH
I_XSIMU
E_MSGID
E_MSGNO
E_MSGTY
E_MSGV1
E_MSGV2
E_MSGV3
E_MSGV4
E_SUBRC
T_BLNTAB
T_FTPOST
T_FTTAX

Exceptions
ACCOUNT_MISSING
COMPANY_CODE_MISSING
POSTING_KEY_INVALID
POSTING_KEY_MISSING
RECORD_TYPE_INVALID
TRANSACTION_CODE_INVALID
AMOUNT_FORMAT_ERROR
TOO_MANY_LINE_ITEMS
COMPANY_CODE_INVALID
SCREEN_NOT_FOUND
NO_AUTHORIZATION

Function Group
FIPI