cancel
Showing results for 
Search instead for 
Did you mean: 

'Invalid Member' error after BADI processing

Former Member
0 Kudos

Hello! I am new to BPC. I have implemented an enhancement to calculate tax and push the values to CT_DATA. When I run UJKT the values are being rejected stating an 'INVALID MEMBER[AUDITTRAIL] = TAXEXPENSE.' It happens even when this is run from the front end. TAXEXPENSE is just a copy of an existing AUDITTRAIL= 'INPUT'. However, when I used 'INPUT' everything worked fine the first time but when I run it again, it says 'DUPLICATE ENTRY'. So, a new member 'INPUT2' was created as a COPY of 'INPUT' and we tried it but it throws the same error again.

I did not use WRITEBACK but I am just appending entries to CT_DATA structure.

     LOOP AT lt_netexp INTO ls_netexp.

       <ls_ctaudit>     = 'TAXEXPENSE'.

       <ls_result_rec>  = '890001'.

       .

      .

      .

     .

       APPEND <ls_rec> TO ct_data.

     ENDLOOP.

Can you please share some thoughts on where the issue might be or if I am missing something.

Thanks in advance.

Sunny

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sunny,

Check in debug mode whether your code is generating expected result in ct_data table.

Also, check whether you have proper write authorizations - if incase AuditTrail is relevant for authorization in your model.

Regards,

Prashant

Answers (5)

Answers (5)

Former Member
0 Kudos

Found the issue. It was the Admin rights to the Auditrail that were set up as 'ONLY READ'.

Astha_M
Participant
0 Kudos

Hi,

Please check your script logic Scope Parameters. Have you hardcoded only Input?

You need to add all the Audit trail IDs used for the purpose of running BAdi.

Thanks

Astha

former_member200327
Active Contributor
0 Kudos

How do you call your BADI: QUERY = ON or OFF?

Former Member
0 Kudos

*START_BADI Calculate_Tax_Expense
QUERY = ON
WRITE = ON
*END_BADI

Former Member
0 Kudos

When I debugged the standard program POST-BADI, I found one issue. When the attributes of the AUDITTRAIL were being read by the standard class/method, the 'CALCMEMBER' flag is BLANK(Neither a Y nor an N). But when I looked at the values in the Table in SE11, the value is shown 'N'.

gajendra_moond
Contributor
0 Kudos

Hi Sunny

Do you have member TAXEXPENSE in your audit dimension? If not, add and then click Save and process dimension.

Former Member
0 Kudos

TAXEXPENSE exists in the Dimension