‎2005 Dec 02 2:50 PM
Hi
I'm reversing FI documents using BAPI_ACC_GL_POSTING_REV_POST and BAPI_ACC_DOCUMENT_REV_POST, however I'm confused about how this works in comparison to manually reversing a document via FB08.
I am calling the BAPI from within the same system that the FI documents are posted in.
I've got two queries:
1. When using FB08 the reversal reason is updated in the document I am reversing. When using BAPI the reason is being updated in the reversal document instead?
2. When using FB08 the reversal document is created and the Reference Key automatically contains its own FI number. But when using the BAPI I have to pass the OBJ_KEY of the reversal document - how would I know what that would be before the BAPI has created the reversal document??
Thanks
‎2005 Dec 02 3:00 PM
Hi,
Actually you need to pass only OBJ_TYPE (AWTYP) and OBJ_KEY_R in REVERSAL structure. You dont have to pass OBJ_KEY when you call these BAPIs.
OBJ_KEY_R is the reference (AWKEY) of the document that you want to reverse.
They will give you back the OBJ_KEY in EXPORTING Parameters.
About reversal reason, try passing just OBJ_TYPE and OBJ_KEY_R and see whether it populates properly then..
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni
‎2005 Dec 02 3:00 PM
Hi,
Actually you need to pass only OBJ_TYPE (AWTYP) and OBJ_KEY_R in REVERSAL structure. You dont have to pass OBJ_KEY when you call these BAPIs.
OBJ_KEY_R is the reference (AWKEY) of the document that you want to reverse.
They will give you back the OBJ_KEY in EXPORTING Parameters.
About reversal reason, try passing just OBJ_TYPE and OBJ_KEY_R and see whether it populates properly then..
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni
‎2009 Apr 29 6:33 AM
Hi,
I have a similar requirement. Can you tell me what is the value i need to pass for fields OBJ_TYPE ( AWTYP) OBJ_key & OBJ_sys.
Regards,
Subbu.
‎2005 Dec 05 3:03 AM
Hi!
If there is no special strict requirement to use BAPI for FI documents reversal, you can use CALL_FB08 - standard FM with clear interface and all necessary checks before internal CALL TRANSACTION 'FB08', thus ensuring the same behavior during on-line on program reversal.
If you need to reverse FI document from outside system - just wrap CALL_FB08 into RFC-enabled FM.
Regards,
Maxim.
‎2005 Dec 05 6:01 AM
Hi,
Submit the Program RFBIBL00(Batch Input Program) with negative values to Reverse the Document
Thanks
‎2005 Dec 05 11:37 AM
Thanks for the response guys.
Srikanth: I original tried omitting the OBJ_KEY however both BAPIs give error error RW 101 ('FI/CO interface: Reference key is not filled'). It seems that unless i specify a pretend OBJ_KEY the BAPI won't work.
Maxim & Ramesh: I am replacing a program that creates FB08 batch sessions using RFBIBL00. We want to reduce the number of batch sessions in error that our users have to correct in SM35. I will have a look at CALL_FB08 though, I am not a fan of Call Transaction however at least this is done inside the FM!
‎2007 Oct 01 12:27 PM
you can use the following function module
TB_FI_DOCUMENT_REVERSE
COMPANYCODE 1000
DOCUMENT 700000062
YEAR 2007
REASON_FOR_REVERSAL 01
Regards,
Khusro Habib