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.