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

BAPI_ACC_DOCUMENT_REV_POST

tarkan_atesoglu
Explorer
0 Likes
2,890

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

.

3 REPLIES 3
Read only

Former Member
0 Likes
1,827

Did you try using the exteranl "COMMIT" statement after the BAPI call function?

Read only

Former Member
0 Likes
1,827

Hi,

After you called the BAPI, call the following func module.

BAPI_TRANSACTION_COMMIT to commit the changes to the database.

Regards,

Subramanian

Read only

0 Likes
1,827

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