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

FM POSTING_INTERFACE_DOCUMENT

Former Member
0 Likes
3,134

HI All,

I am using this FM (mentioned in subject) for FB01 posting. This FM creates batch input session for FB01.

I am passing the profit center data for posting. Screen fields are RKEAK-FIELD(01),RKEAK-FIELD(08)to which I want to pass the profit center data.

But FM is not populating these values in the required screen.

Please suggest.

Regards

Saurabh

3 REPLIES 3
Read only

Former Member
0 Likes
1,578

hi

good

go through this and use accordingly

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:

Document header data ( K 1)

Document item 1 ( P 1)

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:

Posting key: RF05A-NEWBS or BSEG-BSCHL

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)

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

Company code (for intercompany posting):

RF05A-NEWBK or BSEG-BUKRS.

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.

Parameter

I_TCODE

I_SGFUNCT

I_NO_AUTH

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

thanks

mrutyun^

Read only

0 Likes
1,578

Hello

It is very well explained  but if i have many headers

Document header data ( K 1)

Document item 1 ( P 1)

Document item 2 ( P 2)

Document header data ( K 2)

Document item 1 ( P 1)

Document item 2 ( P 2)

should we call the FM    'POSTING_INTERFACE_DOCUMENT'  AT EVERY NEW header  or we can continie putting all of them until the end ?

Tahar

Read only

andreas_mann3
Active Contributor
0 Likes
1,578

Hi,

please check field-status of your G/L-accounts if PC is required or not with trx. ob14

A.