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: 

Post Document

former_member622551
Participant
0 Kudos

Hello, i need to know if some data can be posted by BAPI_ACC_DOCUMENT_POST.

How can i know it without getting a document number? I only need to know if the document can be posted.

Thanks

Edited by: Javier Fernandez Acero on Nov 26, 2009 5:12 PM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Check for commit flag.

dont put this equal to X , and check the sy-subrc.

Hope you get it.

6 REPLIES 6

Former Member
0 Kudos

Check for commit flag.

dont put this equal to X , and check the sy-subrc.

Hope you get it.

0 Kudos

>

> Check for commit flag.

>

> dont put this equal to X , and check the sy-subrc.

>

> Hope you get it.

Even if you don't do the commit the document number will be used, so you will have holes in you document number assignments. This may or may not be a problem.

BAPIs don't set the return code. You have to check the RETURN table.

A better solution might be to use BAPI_ACC_DOCUMENT_CHECK I haven't tried this so I don't know if the document number is used up.

Rob

0 Kudos

The Bapi does not have commit flag.

0 Kudos

Check for commit flag.

dont put this equal to X , and check the sy-subrc.

Hope you get it.

Did you check this before replying?

It will not help anybody to flood this forum with untested answers.

Regards

peter_peng
Advisor
Advisor
0 Kudos

HI,

so you just want to know whether you can post it instead of post it, right?

I think you can just call BAPI_TRANSACTION_ROLLBACK after your post.

of course, if your post didn't succeed, you don't need call BAPI_TRANSACTION_ROLLBACK .

Former Member
0 Kudos

Hi,

You can use BAPI- BAPI_ACC_DOCUMENT_CHECK

In this all the structures and internal tables are passed

same as that needs to be passed in POST BAPI but the check

BAPI does not posts the document only checks the whole document

details if they are correct or not.

Hope it helps

Regards

Mansi