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: 

Can't see FI document that generated by BAPI_ACC_DOCUMENT_POST

Former Member
0 Kudos

Hi expert,

I have used the "BAPI_ACC_DOCUMENT_POST" for posting a FI document and I could get the document number also generated. But I am not able to see the same document through the T code FB03. I have commit this bapi using BAPI_TRANSACTION_COMMIT. Please tell me where i can view the document?

Thanks beforehand.

5 REPLIES 5

vyende
Active Participant
0 Kudos

check if there is update terminated transaction code SM13

Former Member
0 Kudos

You should execute the 2 BAPI's one after the other as sequences.

If the document number is generated, You just need to call BAPI_TRANSACTION_COMMIT.

Open the FB03 txn, now u can see the document.

Hari

Former Member
0 Kudos

Did you check the SY-SUBRC after BAPI_TRANSACTION_COMMIT?

0 Kudos

Yes, i have run 2 BAPI with sequence, sy-subrc of BAPI_TRANSACTION_COMMIT is 0.

Former Member
0 Kudos

May be this is little late to answer .. but still it will be better for clarity.

First of all accouting document will be generated only after commit of the BAPI i.e. call BAPI_TRANSACTION_COMMIT after BAPI_ACC_DOCUMENT_POST.

Second to check the accounting document number generated from BAPI

When filling the BAPI interface, leave the following fields empty if the FI document number is to be the reference document number for the posting:

o DOCUMENTHEADER: OBJ_TYPE, OBJ_KEY and OBJ_SYS

o DOCUMENTHEADER and ACCOUNTGL: AC_DOC_NO

o ACCOUNT_GL: STAT_CON, AC_DOC_NO

In the importing paramters

IMPORTING

obj_type = l_type

obj_key = l_key

obj_sys = l_sys

The first 10 character of l_key will contain the FI document number