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

Parameters of BAPI to reverse accounting doc 'BAPI_ACC_DOCUMENT_REV_POST'

Former Member
0 Likes
1,552

Hi All,

I am trying to reverse the accounting document using BAPI "BAPI_ACC_DOCUMENT_REV_POST"

and finally using"BAPI_TRANSACTION_COMMIT " .

can any one provide me sample data to be passed to the two paramters:

REVERSAL

BUS_ACT

Please help me in reversing the accounting document number..

Any Suggestions of other BAPI to reverse the accounting document are also would be of great help to me..

Thanks in advance.

Prathima..

Hi All,

I am trying to reverse the accounting document using BAPI "BAPI_ACC_DOCUMENT_REV_POST"

and finally using"BAPI_TRANSACTION_COMMIT " .

can any one provide me sample data to be passed to the two paramters:

REVERSAL

BUS_ACT

Please help me in reversing the accounting document number..

Any Suggestions of other BAPI to reverse the accounting document are also would be of great help to me..

Thanks in advance.

Prathima..

5 REPLIES 5
Read only

Former Member
0 Likes
997

Hi,

Try checking the function module documentation.

Cheers.

Read only

0 Likes
997

Hi wong,

Thanks for the reply..

Can you please post some sample data to fill up the parameters please..

thank you..

Read only

0 Likes
997

Hi,

Check this code below.

data: rev like BAPIACREV,

bus like bAPIACHE09-BUS_ACT,

ret like table of bapiret2 with header line.

data: flg(1) type c.

rev-obj_type = 'BKPFF'.

rev-obj_key = 'docnocompcodeyear'.

REV-OBJ_KEY_R = 'docnocompcodeyear'.

rev-PSTNG_DATE = '20070611'.

rev-FIS_PERIOD = '06'.

rev-COMP_CODE = 'comp_code'.

REV-REASON_REV = '02'.

REV-obj_sys = sy-mandt.

CALL FUNCTION 'BAPI_ACC_DOCUMENT_REV_POST'

EXPORTING

REVERSAL = rev

BUS_ACT = 'RFBU'

IMPORTING

OBJ_TYPE =

OBJ_KEY =

OBJ_SYS =

TABLES

RETURN = ret.

Thanks

Nayan

Read only

0 Likes
997

Hi nayan,

I tried the same code u have mentioned...

the return mesage from BAPI is successful with the message

"Document posted successfully: BKPFF 1600000269DC102008 I00CLT030"

I committed the BAPI also... but still I couldnt find the reversed accounting doc number for this in the BKPF table.

I was getting an express document "Update was terminated" after the execution of the prog.

Please help me on this issue...

regards,

Prathima.

Read only

0 Likes
997

I am getting the exact same update termination message. You can see the details using transaction SM13. It appears that the system proposes a new document number to reverse the original document, and then errors out with the message "line 001 of the original document has already been cleared" which is not in fact the case.

To further muddy the waters the update termination does not always occur.