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

Error in BAPI_ACC_DOCUMENT_REV_POST

former_member186401
Participant
0 Likes
5,666

Please help me to find out why this document is not being reversed.

I got the following error in return table wen running the BAPI_ACC_DOCUMENT_REV_POST

ID FSA NUM 009 - Documento contabil não existe para referência. Accounting document does not exist for reference!

Reversal table informed is:

Obj_type = 'BKPFF'

Obj_key = 1900000005BB012013

Obj_sys = ECDCLNT120

Obj_key_r = 1900000005BB012013

Pstng_date = 15.10.2013

Fis_period = 10

Comp_code = BB01

Reason_Rev = 01

Ac_doc_no = blank

Acc_principle = blank

BUS_ACT = RFBU

I can see the documet in bkpf table with all these information, except for Obj_type which is only 'BKPF' in the table.

What can I doing wrong?

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,488

The BAPI seems to only allow reversal of document created with a BAPI, look at FM documentation :

Reversing an external document in Accounting.

Try a FM like POSTING_INTERFACE_REVERSE_DOC.

Regards,

Raymond

7 REPLIES 7
Read only

Former Member
0 Likes
2,488

Hi,

It should work if you pass the import paramters correctly...

Refer the below link to see a sample and more info

http://scn.sap.com/thread/1549572

https://scn.sap.com/thread/1457557

Read only

0 Likes
2,488

Maju,

Thanks for your help.

My guess is that I am passing parameters correctly, but...

According to the sample you mentioned, I am passing obj_type = ' BKPF', as sugested:

it_reversal-obj_type   = bkpf-awtyp.

Return message says 'BKPF' is not a valid entry to obj_type.

Would you mind to double check this?

Read only

Former Member
0 Likes
2,488

You should keep Obj_type from bkpf table that is 'BKPF', if you still get the error try to do it manually via tcode and see what happens.

For your reference

http://scn.sap.com/thread/1607253

Read only

0 Likes
2,488

Tnaks Felipe,

I will try again.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,489

The BAPI seems to only allow reversal of document created with a BAPI, look at FM documentation :

Reversing an external document in Accounting.

Try a FM like POSTING_INTERFACE_REVERSE_DOC.

Regards,

Raymond

Read only

0 Likes
2,488

Thanks Raymond,

I will try it from a BAPI created document.

Read only

0 Likes
2,488

You are right, it is described also in

1799990 - Error message RW628 is raised when reverse documents via BAPI

Also take a look at FM CALL_FB08

Thanks,

Felipe