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

BAPI not commiting

Former Member
0 Likes
1,638

I am using the BAPI, BAPI_ACC_GL_POSTING_CHECK to park a GL doc.

After using the BAPI the get the below message.

Document posted successfully: BKPFF 010000024512002008 DE2CLNT400

Structure name : BKPFF

In this Doc no is : 0100000245

Company code : 1200

Fiscal year : 2008.

Server details : DE2CLNT400

I have used BAPI_TRANSACTION_COMMIT to commint the trasaction code.

But it does not park the document (i.e) I cant see it in FBV3. But I can see the document number in tables BKPF & BSEG.

While pasiing the header details in BAPI 'BAPI_ACC_GL_POSTING_CHECK', I am leaving the fields OBJ_T, OBJ_KEY, OBJ_SYS blank.

Do I have to fill them or is there any thing I am missing.

If more information is required from my side,Please let me know, I ll provide.

Thanks in advance.

Ravindar.

12 REPLIES 12
Read only

Former Member
0 Likes
1,461

Hi,

when you use BAPI and execute it, one table return the error values.

use the following logic.

CALL FUNCTION 'BAPI_ACC_GL_POSTING_CHECK'

  • EXPORTING

  • DOCUMENTHEADER =

TABLES

accountgl =

  • CURRENCYAMOUNT =

return = it_returm <------ pass this.

  • EXTENSION1 =

if it_return is initial.

then commit work.

endif.

this shd solve ur problem

Read only

Former Member
0 Likes
1,461

Hi,

I am not sure if you are using the right BAPI, you should be using BAPI_ACC_GL_POSTING_POST, because check BAPI should never commit transaction thats why it has been built.

Read only

Former Member
0 Likes
1,461

Hello

Are you use BAPI_TRANSACTION_COMMIT with WAIT = 'X' ?

Read only

JozsefSzikszai
Active Contributor
0 Likes
1,461

this BAPI only checks if the document would be OK, it does NOT post and does NOT park anything, only returns messages... It is irrelevant if you use COMMIT or not... Even the the name of the BAPI indicates the same...

Read only

Former Member
0 Likes
1,461

Hi Ravindar,

You can use the BAPI, bapi_acc_document_post which can post the G/L documents and then try the bapi commit.

Hopefully this should work.

Regards,

Shobana.K.

Read only

Former Member
0 Likes
1,461

Hi

Pass this:

IF logsys IS INITIAL.

SELECT SINGLE logsys FROM t000 CLIENT SPECIFIED INTO logsys

WHERE mandt = sy-mandt.

ENDIF.

CONCATENATE sy-uname sy-datum sy-uzeit INTO obj_key.

also pass obj_typ and

pass logsys as obj_sys.

hope that will solve the problem.

Regards

Neha

Read only

Former Member
0 Likes
1,461

I am sorry, I was actually using BAPI : BAPI_ACC_GL_POSTING_POST to park the document which be done manually through tcodes FV50 & FV50L.

I am not sure if I am using the right BAPI to park the document.

My requirment is to park the document and it should reflect in FBV3. I dont want to post the document, just have to park it.

Thanks & Regards

Ravindar.

Read only

0 Likes
1,461

Nice one. Well, with that BAPI you cannot park documents. There is no actual BAPI for parking documents, afaik, but there is function PRELIMINARY_POSTING_FB01 which can do the trick.

Thomas

Read only

0 Likes
1,461

Ravindar ,

You can use the FM 'AC_DOCUMENT_GENERATE' for parking the G/L document followed by a function call to 'PRELIMINARY_POSTING_DOC_WRITE'.

For posting the parked document you can use the FM 'PRELIMINARY_POSTING_POST_ALL' .

Regards,

Shobana.K.

Read only

0 Likes
1,461

Hi Thomas

I am also looking into using this BAPI "PRELIMINARY_POSTING_FB01" to park a document. But there is no documentation I can find on this BAPI, i wonder if you can share your knowledge on it, or kindly point me to the right place for further help.

Greatly appreciate your help.

Jackie

Read only

0 Likes
1,461

Hi ,

u can also try FM AC_DOCUMENT_DIRECT_INPUT for parking .

see the documentation of program RFBIBL00.

regards

Prabhu

Read only

Former Member
0 Likes
1,461

Thanks Shobana