‎2009 Dec 04 3:57 PM
Dear All,
I used an ABAP program to reverse the financial documents
Function of the program: Call BAPI: BAPI_ACC_DOCUMENT_REV_POST to reverse the FI documents.
the table FAGLFLEXA must be updated by this bapi, but the table FAGLFLEXA was not updated after completed the running of the program.
CLEAR lv_bus_act.
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
own_logical_system = it_reversal-obj_sys .
lv_bus_act = bkpf-glvor."space
it_reversal-obj_type = bkpf-awtyp."ZACC
it_reversal-obj_key = bkpf-awkey."0100000001
it_reversal-obj_key_r = bkpf-awkey."0100000001
it_reversal-pstng_date = bkpf-budat."04.12.2009
it_reversal-comp_code = bkpf-bukrs."1015
it_reversal-reason_rev = '01'.
it_reversal-ac_doc_no = bkpf-belnr.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_REV_POST'
EXPORTING
reversal = it_reversal
bus_act = lv_bus_act
IMPORTING
OBJ_TYPE =
OBJ_KEY =
OBJ_SYS =
TABLES
return = it_return2
Can anybody who can tell me why?
With many thanks!
Cem Gokce
.
‎2009 Dec 04 9:12 PM
Did you try using the exteranl "COMMIT" statement after the BAPI call function?
‎2009 Dec 04 10:09 PM
Hi,
After you called the BAPI, call the following func module.
BAPI_TRANSACTION_COMMIT to commit the changes to the database.
Regards,
Subramanian
‎2023 Oct 31 11:42 PM
Use Function Module CALL_FB08, it is very simple and reverse all document!!
This function is same the FB08 transaction. Enter SE37 and execute this function with doc.numer, year, following below:
I_BUKRS = company Code
I_BELNR = Doc. Number ( doc. to be reverse)
I_GJAHR = Year
I_BVORG = 02
Bye