This content from the SAP Concur Community was machine translated for your convenience. SAP does not provide any guarantee regarding the correctness or completeness of this machine translated text. View original text custom.banner_survey_translated_text
Issue: No matter what ExpenseTypeCode we send in (or not send in) we get the error below... This worked roughly 9 months ago when we first programmed this, but never released it. Now that we are back to testing it no longer works.
Level = LINE_ITEM; Field = ExpenseTypeCode; Value = ; Code = 7000; Message = Invalid pet code.
I cant attach the JSON here... its always blocked... but suffice to say we have validated that the number (2009) that we are sending in, is valid in concur.
This content from the SAP Concur Community was machine translated for your convenience. SAP does not provide any guarantee regarding the correctness or completeness of this machine translated text. View original text custom.banner_survey_translated_text
@Corey10e if you are a site admin at your company, I suggest requesting to join the Admin Group here on the Community and posting your question there.
We do check your profile to make sure you do have site admin permissions before admitting you to the group, so as long as you have some admin permissions, you should be good.
This content from the SAP Concur Community was machine translated for your convenience. SAP does not provide any guarantee regarding the correctness or completeness of this machine translated text. View original text custom.banner_survey_translated_text
unfortunately I am not, but I can have the site admin post there for me.
Thanks
Corey
This content from the SAP Concur Community was machine translated for your convenience. SAP does not provide any guarantee regarding the correctness or completeness of this machine translated text. View original text custom.banner_survey_translated_text
Hi @Corey10e ,
Can you try below:
1. Create Cognos custom report in Concur. You may take someone's help who has Concur Reporting access and ask them to build this report as below. It will give you Expense type wise expense type code available in Concur system.
Sample screenshot:
2. Now using API try to get expense type wise Expense type code and compare both codes (fetched through Concur reporting and API) are matching or not. If both are matching, then try to pass same code through API and check whether your error gets resolved.
If not matching, then you will get same error.
Additional information for your reference that I searched on chatgpt:
The error message "ExpenseTypeCode - Invalid pet code" in the Concur Invoice API typically indicates that the ExpenseTypeCode being passed in the API request is not valid or not recognized by the system. This can happen when the code provided for the ExpenseType is incorrect, misspelled, or does not match any existing values in the system.
Here’s how you can address and resolve this issue:
If you're using a PET (Predefined Expense Type) code, verify that it is a valid code in the Concur setup.
If you're unsure of the correct code or want to retrieve a list of valid ExpenseTypeCodes, you can use the Expense Type API to get a list of available expense types and their codes.
For Concur, the relevant API call would be:
GET /expense/types
This will return all the available expense types, along with their associated codes, which you can then use when creating or updating invoices.
Once you have the valid ExpenseTypeCode, ensure you pass the correct code in your API request.
Example (correct ExpenseTypeCode😞
{ "expenseTypeCode": "RENTAL_CAR" // This should be a valid, recognized code }
Here’s an example of how you might structure the API call to create or update an invoice with the correct ExpenseTypeCode:
{ "invoiceNumber": "123456", "expenseTypeCode": "RENTAL_CAR", // Make sure this is valid in your system "amount": 200.0, "description": "Rental car for business trip" }
If the issue persists, it may be useful to contact your SAP Concur support team to verify the correct codes and configurations.
Let me know if it works for you.
If this answers your query, then please mark solution as accepted.
This content from the SAP Concur Community was machine translated for your convenience. SAP does not provide any guarantee regarding the correctness or completeness of this machine translated text. View original text custom.banner_survey_translated_text
Thanks for your reply. We know that the code is correct, we have tried multiple. We have tried to submit on 2 different policies. We have done a GET to retrieve another invoice that had the ExpenseTypeCode set manually in the UI and tried to use that one as well.
This content from the SAP Concur Community was machine translated for your convenience. SAP does not provide any guarantee regarding the correctness or completeness of this machine translated text. View original text custom.banner_survey_translated_text
Hi @Corey10e ,
I hope you are using standard expense type field in invoice line item form and not using any custom field. Can you please confirm.
With reference to your statement may I know how did you set expense type code manually? If possible can you please provide a screenshot from Concur where you have set this code manually.
If you are using standard expense type field then please note that for standard expense types (default expense types) system has its own default expense type code and for custom created new expense types, system will generate unique code in the backend. You cannot set any random code to it as technically it is not feasible. This codes you can check using cognos reporting which I have shown in my previous response.
This content from the SAP Concur Community was machine translated for your convenience. SAP does not provide any guarantee regarding the correctness or completeness of this machine translated text. View original text custom.banner_survey_translated_text
Hi @PoojaKumatkar,
I am assisting @Corey10e with this issue.
We are using the standard expense type field.
We are also using the system generated code for our custom created expense types. We did used Congnos reporting to get the values and also confirmed it with a Localization export.
This content from the SAP Concur Community was machine translated for your convenience. SAP does not provide any guarantee regarding the correctness or completeness of this machine translated text. View original text custom.banner_survey_translated_text
Hi @STCornish , @Corey10e ,
If you are passing correct expense type code then It should not happen.
I would suggest raising a support ticket with Concur and provide them all required screenshots related to API, error msg, Concur expense type name and code from cognos report and from Concur UI screen.
They will investigate this issue and may be provide you some solution if anything needs to corrected from your side.