Symptom
You are trying to execute a GET request for API_MKT_CAMPAIGN_SRV based on the attribute CampaignExecutionStatusName, but are receiving the error "A database error occured. The error message in the database was: "invalid column name: EXEC_STATUS_T: line 1 * 826 (at pos 825)".
Environment
SAP Marketing Cloud
Reproducing the Issue
- Execute a GET request using a Service URI like: https://myXXXXXX-api.s4hana.ondemand.com/sap/opu/odata/sap/API_MKT_CAMPAIGN_SRV;V=3/Campaigns?$top=10&$filter=CampaignExecutionStatusName eq 'Finished, where XXXXXX is your system number.
- You will receive a 500 Internal Server Error.
Cause
The attribute "CampaignExecutionStatusName" that you are using to filter is not available for the API.
Resolution
You can check the attributes available for the API in question, first checking the API metadata using the following GET request:
https://myXXXXXX-api.s4hana.ondemand.com/sap/opu/odata/sap/API_MKT_CAMPAIGN_SRV/$metadata
Then you can rebuild your GET request based on the available API's fields.
Keywords
API_MKT_CAMPAIGN_SRV, metadata, GET , KBA , CEC-MKT-CPG , Campaign , How To