Application Development 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: 

Error in BAPI_ACC_DOCUMENT_POST for asset posting?

tamilselvanm
Participant
0 Kudos

Hi Experts,

I am trying to post the assets in BAPI_ACC_DOCUMENTS_POST. I am now getting following error.

E AA 326 Enter a transaction type

Even though I have maintained transaction type CS_TRANS_T = 100 in ACCOUNTGL, I am still getting the same error.

Kindly help.

Regards,

Tamilselvan.M

9 REPLIES 9

satyapriyanka_vana
Active Participant
0 Kudos

Hi,

Try putting a break point at FM 'AM_ASSET_CHECK' (Line no.257).

Regards,

Priyanka.

0 Kudos

Hi Priyanka,

Thanks!

This is to update you that I am working in S4 Hana system but not in SAP ECC system. The FM AM_ASSET_CHECK is not there in S4 Hana system.

Regards,

Tamilselvan.M

tamilselvanm
Participant
0 Kudos

Hi Experts,

Any update on this. It is an urgent requirement. Kindly help.

Regards,

Tamilselvan.M

Sayan_C
Explorer

Hi,

I've solved the error E AA 326 Enter a transaction type by implement BADI_ACC_DOCUMENT to pass my Trasaction Type = 100.

In method BADI_ACC_DOCUMENT->CHANGE I've change the C_ACCIT-ANBWA = 100 ( by passing them form Z program) then able to post FI-AA.

Follow Example step below.

  1. Tcode SE24 to create class for passing your variable.
    - Classe: ZCL_ACC_PASS
    - Attribute: GV_ANBWA TYPE ANBWA. ( As level static for passing value to BADI_ACC_DOCUMENT)
  2. Tcode SE19 to implement BADI_ACC_DOCUMENT in method CHANGE.
    Method IF_EX_ACC_DOCUMENT~CHANGE.
    FIELD-SYSBOLS:<LFS_ACCIT> TYPE ACCIT.
    LOOP AT C_ACCIT ASSIGNING <LFS_ACCIT>.
    "need to apply AA Transaction Type in here which passing from Z program
    <LFS_ACCIT>-ANBWA = ZCL_ACC_PASS=>GV_ANBWA.
    ENDLOOP.
    ENDME
  3. In Z program need to pass value before call function BAPI because the implemented BADI will be triggered inside 'BAPI_ACC_DOCUMENT_POST'.
    " Passing your value 100
    ZCL_ACC_PASS=>GV_ANBWA = '100'. "AA Transaction Type
    " Inside this
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'.
    "need to clear when you not use it
    CLEAR ZCL_ACC_PASS=>GV_ANBWA.

Hope it help.

Sayan.

0 Kudos

Thank you so much. I solved my problem.

john_bequilla
Explorer
0 Kudos

Hi,

can you share how did you populate your BAPI_ACC_DOCUMENT_POST for Fixed Asset Invoice posting? Thanks.

Warm regards,

John

0 Kudos

Hi,

I write some step to solve this please check it out.

I've solved the error E AA 326 Enter a transaction type by implement BADI_ACC_DOCUMENT to pass my Trasaction Type = 100.

In method BADI_ACC_DOCUMENT->CHANGE I've change the C_ACCIT-ANBWA = 100 ( by passing them form Z program) then able to post FI-AA.

Follow Example step below.

  1. Tcode SE24 to create class for passing your variable.
    - Classe: ZCL_ACC_PASS
    - Attribute: GV_ANBWA TYPE ANBWA. ( As level static for passing value to BADI_ACC_DOCUMENT)
  2. Tcode SE19 to implement BADI_ACC_DOCUMENT in method CHANGE.
    Method IF_EX_ACC_DOCUMENT~CHANGE.
    FIELD-SYSBOLS:<LFS_ACCIT> TYPE ACCIT.
    LOOP AT C_ACCIT ASSIGNING <LFS_ACCIT>.
    "need to apply AA Transaction Type in here which passing from Z program
    <LFS_ACCIT>-ANBWA = ZCL_ACC_PASS=>GV_ANBWA.
    ENDLOOP.
    ENDME
  3. In Z program need to pass value before call function BAPI because the implemented BADI will be triggered inside 'BAPI_ACC_DOCUMENT_POST'.
    " Passing your value 100
    ZCL_ACC_PASS=>GV_ANBWA = '100'. "AA Transaction Type
    " Inside this
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'.
    "need to clear when you not use it
    CLEAR ZCL_ACC_PASS=>GV_ANBWA.

Hope it help.

Sayan.

emilwe
Discoverer
0 Kudos

john.bequilla , did you figure out how to get this one working? We get the exact same issue

0 Kudos

Hi @sayan.churatao and @nikki.wang

Please share your complete piece of code how did you manage to asset posting via this BAPI. My requirement to post the transaction as per F-90. Please help to share soonest possible.

Thanks