cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Business one api gateway for exporting the reports

kyuvi0786
Explorer
0 Kudos
1,189

Dear Experts.

When utilizing the sap business one api gateway to export crystal reports for sales invoice. While passing the parameter values, I'm getting an error as "You are not authorized to run this report; contact your administrator to update the settings in "Authorizations""

However I am using manager user with full authorizations. Kindly guide me with the payload for retreiving the parameter based crystal reports.

Used Payload:

[ { "name": "Dockey@", "type": "xsd:string", "value": [ [ "19964" ] ] }]

ankit.chauhan1

wenli.chen

andy.bai

Note:

I was able to export the crystal reports from sap business one api gateway for the reports without parameters.

View Entire Topic
kyuvi0786
Explorer
0 Kudos

Dear Ankit,

Thank you very much for your prompt response.

Version: 10.00.190 Patch: FP 2202.

However the issue with only if the crystal report is maintained as layout. Where as the same report I have exported it to sap business one as report and now I am able to export it to pdf with dockey and the payload for the reference.

[ { "name": "Dockey@", "type": "xsd:string", "value": [ [ "19964" ] ] }]

I trying to export another report using api gateway and need your guidance for providing multiple parameters

this report has 3 parameters and below is the response of LoadCR of the report.

{ "error": false, "resultSet": [ { "parameterType": "StoredProcedureParameter", "values": [ "C-ENG-00056547" ], "defaultValuesDescription": {}, "length": "131070", "isOptionalPrompt": "false", "description": "CustomerCode", "allowNullValue": "false", "isShownOnPanel": "false", "type": "xsd:string", "editMask": "", "minimumValue": "", "initialValues": [ "" ], "isEditableOnPanel": "false", "valueRangeKind": "Discrete", "allowMultiValue": "false", "name": "CardCode@SELECT * FROM OCRD ", "defaultValues": [], "currentvalues": [ "56547" ], "maximumValue": "", "allowCustomCurrentValues": "true" }, { "parameterType": "StoredProcedureParameter", "values": [ "Date(2021, 7, 1)" ], "defaultValuesDescription": {}, "length": "4", "isOptionalPrompt": "false", "description": "FromDate", "allowNullValue": "false", "isShownOnPanel": "false", "type": "xsd:date", "editMask": "", "minimumValue": "", "initialValues": [], "isEditableOnPanel": "false", "valueRangeKind": "Discrete", "allowMultiValue": "false", "name": "FromDate", "defaultValues": [], "currentvalues": [ "Date(2021, 7, 1)" ], "maximumValue": "", "allowCustomCurrentValues": "true" }, { "parameterType": "StoredProcedureParameter", "values": [ "Date(2021, 10, 16)" ], "defaultValuesDescription": {}, "length": "4", "isOptionalPrompt": "false", "description": "Todate", "allowNullValue": "false", "isShownOnPanel": "false", "type": "xsd:date", "editMask": "", "minimumValue": "", "initialValues": [], "isEditableOnPanel": "false", "valueRangeKind": "Discrete", "allowMultiValue": "false", "name": "Todate", "defaultValues": [], "currentvalues": [ "Date(2021, 10, 16)" ], "maximumValue": "", "allowCustomCurrentValues": "true" } ]}

Kindly guide me on the payload for the above reportextraaction to pdf.

below is the payload I have used but system gives a error.

"message": "Internal Server Error resulted from Runtime Exception"***** Payload*****[ { "name": "CardCode@SELECT * FROM OCRD", "type": "xsd:string", "value": [ [ "56547" ] ] }, { "name": "FromDate", "type": "xsd:date", "value": [ [ "Date(2021, 7, 1)" ] ] }, { "name": "ToDate", "type": "xsd:date", "value": [ [ "Date(2021, 10, 16)" ] ] }]