cancel
Showing results for 
Search instead for 
Did you mean: 

Bapi BAPI_ACC_DOCUMENT_POST is not auto deriving G/L account for Asset journal entries posting.

Former Member

Hi Gurus,

I'm using bapi BAPI_ACC_DOCUMENT_POST to post journal entries. I'm getting the input data in an excel file. Bapi is working fine for other cases like vendor etc. except for the Asset scenario.

When we post Asset journal entries manually through FB01 transaction the asset G/L will be derived automatically due to this reason i'm not getting the G/L account corresponding to Asset record in input file but G/L is mandatory field in BAPI.

My requirement is to get the asset G/L account on the basis of company code, Asset number, Asset subnumber & Transaction Type.

I already tried the below logic:-

Pass Company code(BUKRS), Asset number(ANLN1) & Asset sub number(ANLN2) in ANLA table & get Account determination(KTOGR). After fetching Account determination(KTOGR) from ANLA, Pass it in T095 table along with Chart of accounts(KTOPL) as ‘GCCA’ & Real depreciation area(AFABE) as ‘1’ and get KTANSW(Bal. sheet account: Acquisition & production costs). Use KTANSW as Asset G/L account. I'm able to post asset entries though this logic.

But as per my functional the G/L should be derived in combination of asset number & transaction type because corresponding asset G/L might change accordingly as this combination will change. My functional consultants are not providing me the logic to derive the G/l because it is auto derived in Standard SAP.

I really appreciate your help here.

Regards,

Ashwani

0 Kudos

Hi Ashwani ,

Did you get any solution for this problem ? can you please post the solution if this issue was resolved. I have the same issue.

Thanks

Ramya

Accepted Solutions (0)

Answers (2)

Answers (2)

raymond_giuseppi
Active Contributor
0 Kudos

First, use a FM like AMSP_ASSET_READ_FOR_POSTING to read required data (ANTS) and TABWV_READ to convert activity type to AA transaction type. Then call FIAA_CHECK_ACCOUNTING_OBJECT to get a COBL structure to use in your program. (or analyze those FM and build your own code)

kasralikarpratik
Explorer
0 Kudos

Try using BAPI_ACC_DOCUMENT_CHECK before POST. I hope you are passing BUS_ACT as RFBU

Former Member
0 Kudos

Hi Pratik,

Thanks for your response.

I'm already using BAPI_ACC_DOCUMENT_CHECK before BAPI_ACC_DOCUMENT_POST. I tried it with BUS_ACT with value RFBU & without any value as well. Unfortunately this is not working.

My requirement is to get G/L account corresponding to Asset number & asset transaction type combination.

Thanks.