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

Error in BAPI_ACC_DOCUMENT_POST for asset posting?

tamilselvanm
Participant
0 Likes
10,827

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
Read only

satyapriyanka_vana
Active Participant
0 Likes
4,721

Hi,

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

Regards,

Priyanka.

Read only

0 Likes
4,721

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

Read only

tamilselvanm
Participant
0 Likes
4,721

Hi Experts,

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

Regards,

Tamilselvan.M

Read only

Sayan_C
Explorer
4,721

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.

Read only

0 Likes
4,721

Thank you so much. I solved my problem.

Read only

john_bequilla
Explorer
0 Likes
4,721

Hi,

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

Warm regards,

John

Read only

0 Likes
4,721

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.

Read only

emilwe
Discoverer
0 Likes
4,721

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

Read only

Former Member
0 Likes
4,721

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