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 for FBS1

Former Member
0 Likes
7,156

Hi SAP Gurus,

I am using BAPI_ACC_DOCUMENT_POST

for transaction FBS1. I am able to get the document No from this bapi.

when I am pasing this doc no in BKPF table I find an entry against that but

Reversal posting Date (STODT) and Reversal flag (XSTOV) is coming blank.

I didn't find where to pass STODT in bapi?

Or do I need to use any other function mod or BAPI by passing doc no.

Thanks,

Krishna

Hi SAP Gurus,

I am using BAPI_ACC_DOCUMENT_POST

for transaction FBS1. I am able to get the document No from this bapi.

when I am pasing this doc no in BKPF table I find an entry against that but

Reversal posting Date (STODT) and Reversal flag (XSTOV) is coming blank.

I didn't find where to pass STODT in bapi?

Or do I need to use any other function mod or BAPI by passing doc no.

Thanks,

Krishna

3 REPLIES 3
Read only

Former Member
0 Likes
3,429

Hi Krishna,

hi, there is no BAPI for FBS1 and BAPI_ACC_DOCUMENT_POST does not do it despite having the reversal reason as a header segment field! helpful... I think not.

The options are either BDC or RFBIBL00..

I wrapped the standard BAPI and within this either called the standard BAPI or called BDC code if the posting was to be an FBS1.

Thanks

Saurabh

Read only

Former Member
0 Likes
3,429

Hi,

I solved this...

After getting document no from BAPI,

pass the doument no in fun mod: TSTOR_INSERT

with comp code and reversal date.

Then run TCode: F.81 to reverse so.

Thanks,

Krishna

Read only

Former Member
3,429

Hi Krishna,

I'm able to post accrual document (FBS1) by using BAPI_ACC_DOCUMENT_POST, and pass in reversal reason [STGRD] and reversal date [STODT] via EXTENSION2.

Using BAdI BADI_ACC_DOCUMENT, method CHANGE, replace reversal reason and reversal date to all items in C_ACCIT-STGRD and C_ACCIT-STODT respectively.

By doing so, BKPF-XSTOV will automatically marked with STGRD and STODT having the value passed via EXTENSION2. Record will automatically exist in table TSTOR as well.

Hope this will help anyone that need to create accrual document via BAPI in future.