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

Post Document

Former Member
0 Likes
791

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
Read only

Former Member
0 Likes
747

Check for commit flag.

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

Hope you get it.

6 REPLIES 6
Read only

Former Member
0 Likes
748

Check for commit flag.

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

Hope you get it.

Read only

0 Likes
747

>

> 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

Read only

0 Likes
747

The Bapi does not have commit flag.

Read only

0 Likes
747

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

Read only

peter_peng
Product and Topic Expert
Product and Topic Expert
0 Likes
747

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 .

Read only

Former Member
0 Likes
747

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