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: 

FB08 Doc. reverse post

Former Member
0 Kudos

Hi experts,

Iam trying to post the reverse document using

<b>BAPI_ACC_DOCUMENT_REV_POST</b> function module.

I have passed all the parameters properly.



        rev-obj_type = bkpf-awtyp.
        rev-obj_key  = bkpf-awkey.
        rev-obj_sys  = 'ABB_100'.
        rev-obj_key_r  = bkpf-awkey.
        tab_docheader-bus_act    = bkpf-glvor.

      CALL FUNCTION 'BAPI_ACC_DOCUMENT_REV_POST'
        EXPORTING
          reversal = rev
          bus_act  = tab_docheader-bus_act
        TABLES
          return   = tab_return.

In the tab_return iam getting the following error.


Error in document: BKPFF 120600005010102006 ABB_100	
Document BKPFF BKPFF ABB_100 cannot be reversed	
Reversal in component Financial Accounting not possible	
<b>Reversal not possible, accounting document for the ref. does not exist</b>	

What does it mean?Can any one explain me where iam doing wrong?

or is there any example using fm CALL_FB08?

Reward guaranteed,

thanks

kaki

11 REPLIES 11

Former Member
0 Kudos

Hi

Did you checked if there is no pb of leading zero on your doc n° ?

Erwan

Former Member
0 Kudos

It may be a business process error rather than a problem with your code. Try reversing it manually.

Rob

0 Kudos

Hi,

try 1st with trx. fb08 per dialog.

If item is cleared you've to rverse the clearing with transaction FBRA

A.

Message was edited by: Andreas Mann

Former Member
0 Kudos

Have you checked the long text? What is the message id and number??

Rob

0 Kudos

Hi Rob,

Iam getting the following errors with numbers


NUMBER	MESSAGE	
609     Error in document: BKPFF 120600005010102006 ABB_100	
632     Document BKPFF BKPFF ABB_100 cannot be reversed	
630     Reversal in component Financial Accounting not possible	
009     Reversal not possible, accounting document for the ref. does not exist

0 Kudos

OK, but what's the message ID? You can't look at long texts without that. It's in the return table.

Rob

0 Kudos

TYPE    ID	NUMBER	MESSAGE	
E	RW	609	Error in document: VBRR 1010000116RA00008704 NCS_100		000000	
E	RW	632	Document VBRR VBRR NCS_100 cannot be reversed		000000	VBRR	
E	RW	630	Reversal in component Financial Accounting not possible		000000	
E	F5A	009	Reversal not possible, accounting document for the ref. does not exist	

0 Kudos

Have you checked the long text for F5A 009??

Well, it seems to be saying that your document isn't there (possibly archived). Is that possible?

Rob

Message was edited by: Rob Burbank

0 Kudos

Hi Rob,

possibly archived means....document was reversed already?

thaks

kaki

0 Kudos

You should probably talk to your functional people to find out what's going on with this document.

Archived, means that it's been removed from the database and put on some other storage medium (CD) whare it can't be reversed or changed.

But it looks like it's a document from FY 2006, and it's unlikely that your're archiving recent documents.

What happens when you display this document using FB03? Does it say it's not in the database and ask to search the archive?

Rob

Surferpeck
Employee
Employee
0 Kudos

Hi, did you post the orginal document with a BAPI?

If so, BAPI_ACC_DOCUMENT_REV_POST cannot be used to reverse documents

posted with reference procedure BKPFF.

In FI there are two kind of documents, those with origin in FI and those posted from external applications.

Postings with origin in FI are those with reference procedure BKPF (for online postings with FB01 and others) and reference procedure BKPFF (originally for documents entered with direct input, RFBIBL00).

All other reference procedures indicate documents with external origin.

Depending on the origin the document can only be reversed by FB08 (for postings original in FI) or by the external application(BAPI, accounting interface) in case of external origin.

So you can only reverse the BKPFF documents with FB08.

The actual error here is that you only get an update termination when you try to reverse such documents by BAPI, it would be more transparent to get a proper error message that reversals of reference procedure BKPFF are impossible with this BAPI. Also it is not intended that BKPF docs are reversed by BAPI.

The feature to create BKPFF postings by BAPI is something that was introduced with note 561175. Before implementation of this note it was impossible to post BKPFF by BAPI.

This was meant as a help to enter large numbers of documents with origin in FI without the need to use batch input on classical transactions like FB01. It was not in the scope of this note to also allow reversing of such documents by BAPI.

<b>If you need to be able to reverse docs by BAPI</b> (and not FB08) proceed according to note 306504 and define your own reference procedure 'Z????' and use this for posting. In this case the unique reference key OBJ_KEY is not automatically created by the BAPI but must be created and passed by the BAPI caller.

Regards,

Chris