a month ago
I am currently working on a project to upgrade existing SAP Function Models from external RFC to OData Rest-Services.
Certain things are set:
The given Function Model has the followong architecture:
The function model works relativly easy:
Knowing my way around the SEGW and the DPC, DPC_EXT, MPC, MPC_EXT -Classes i designed a webservice with a deep_entity setup.
so overall the segw looks something like this:
and the associations look like this:
lastly i redefined the CREATE_DEEP_ENTITY Method of the DPC_EXT and voilà, it works...
...but its kind of ugly and it feels "done in the wrong way"
so this is the request:
{
"Testrun": "",
"Values": {
"results": [
{
"ConfNo": "1",
"Orderid": "",
"Operation": "",
"SubOper": "",
"CapaCategory": ""
},
{
"ConfNo": "2",
"Orderid": "",
"Operation": "",
"SubOper": "",
"CapaCategory": ""
}
]
},
"Returns": []
}
ConfCreate is, as already explained, the "link" to the Value-Entries.
Testrun defines if it´s a testrun or not. Since both have to be adressable i defined them as KEYS.
And in Values, we have the timeticket-values which we can give noumerous at once into the service.
... And then there is results ...
this is left blank because it is needed to be automatically in the tech_clauses, which is a string_table defining what goes in AND comes out.
If there should be a general error we get a 40X or 50X http status and if there is a business wrongdoing we get the results filled as intended
this is an example response:
[...]
"Returns": {
"results": [
{
"__metadata": {
"id": "https://.../sap/opu/odata/sap/Z...CONF_CREATE_SRV_01/ReturnSet(ConfCreate='',Testrun='')",
"uri": "https://.../sap/opu/odata/sap/Z...CONF_CREATE_SRV_01/ReturnSet(ConfCreate='',Testrun='')",
"type": "Z...CONF_CREATE_SRV_01.Return"
},
"ConfCreate": "",
"Testrun": "",
"Type": "E",
"MessageId": "RU",
"MessageNumber": "020",
"Message": "Rückmeldenr. 1 nicht vorhanden (Bitte Eingabe prüfen)",
"LogNumber": "",
"LogMsgNo": "000000",
"MessageV1": "1",
"MessageV2": "",
"MessageV3": "",
"MessageV4": "",
"Parameter": "",
"Row": 1,
"Field": "",
"System": "A05_010",
"FlgLocked": false,
"ConfNo": "0000000000",
"ConfCnt": "00000000"
},
{
"__metadata": {
"id": "https://.../sap/opu/odata/sap/Z...CONF_CREATE_SRV_01/ReturnSet(ConfCreate='',Testrun='')",
"uri": "https://.../sap/opu/odata/sap/Z...CONF_CREATE_SRV_01/ReturnSet(ConfCreate='',Testrun='')",
"type": "Z...CONF_CREATE_SRV_01.Return"
},
"ConfCreate": "",
"Testrun": "",
"Type": "E",
"MessageId": "RU",
"MessageNumber": "020",
"Message": "Rückmeldenr. 2 nicht vorhanden (Bitte Eingabe prüfen)",
"LogNumber": "",
"LogMsgNo": "000000",
"MessageV1": "2",
"MessageV2": "",
"MessageV3": "",
"MessageV4": "",
"Parameter": "",
"Row": 2,
"Field": "",
"System": "A05_010",
"FlgLocked": false,
"ConfNo": "0000000000",
"ConfCnt": "00000000"
}
]
}
}
}
so now we come to my question:
Is this really the intended way of solving sth like this?
Is there a more fitting configuration and setup hidden inside the SEGW i do not know yet?
So please, if someone is experienced with mass-creates and explicit returns for each individual create please let me know.
Kind Regards
Mirco
Request clarification before answering.
User | Count |
---|---|
25 | |
22 | |
8 | |
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.