on 04-05-2023 5:22 PM
Hello
I've created a new API action for creating a customer project in S/4HANA Cloud. I can successfully test the API via the web test tool just fine.
I then created a new process and added the data type for a new project (it has a child element for work package structure). I then integrate the action and map the fields, but when I call the Build Process API from Postman and approve the workflow, the process fails with the following error:
TypeError: Cannot read property "map" from undefined in <eval> at line number 157
I suspect it has something to do with the way I have set up my data type, but the JSON that is in the context when it fails matches exactly the JSON that is in the "successful" API test.
Successful call in API
Datatype:
JSON
{ "definitionId": "eu10.na-sa-sandbox-pf0pujwe.newcustomerprojectapprovaldemo.newProjectApproval", "context": { "customerProject": { "OrgID": "1710", "EndDate": "2024-03-25T00:00:00", "Currency": "USD", "Customer": "1000185", "ProjectID": "PROCAUTOAPI10", "StartDate": "2023-03-25T00:00:00", "CostCenter": "0017101902", "ProjectDesc": "PROCAUTOAPI10 Desc", "ProjectName": "PROCAUTOAPI10", "ProfitCenter": "YB101", "ProjectStage": "P001", "WorkPackageSet": { "results": [ { "ProjectID": "PROCAUTOAPI10", "WPEndDate": "2024-03-25T00:00:00", "Description": "Execution WP Desc", "WPStartDate": "2023-03-25T00:00:00", "WorkPackageID": "PROCAUTOAPI10.1", "WorkPackageName": "Execution" } ] }, "ProjectCategory": "C", "ProjManagerExtId": "I805828" } }}
Mapping
Error on API call via action
Any idea what I'm doing wrong?
Thanks,
Marty
Hello Marty,
We currently do not support complex nested structure in process automation. The structure is supported only till one level but in your case "result" inside "WorkPackageSet" is under 2-level nesting. Here is the documented restrictions. This however will be removed in the future when we support complex nested structure.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.