SAP Knowledge Base Article - Public

3059733 - Internal Server Error When Executing a GET Request for API_MKT_CAMPAIGN_SRV

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

  1. 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.
  2. 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

Product

SAP S/4HANA Cloud Public Edition all versions ; SAP S/4HANA Cloud all versions