on 10-20-2014 9:58 PM
Hi,
Does anyone know if its possible to created multilevel deep create via Gateway?
For Example: I want to create 3 levels deep hierarchy via Gateway in 1 go:
Level 1: Project to Group Products
Level 2: Group Products to Group Sales Articles
Level 3: Group Sales Articles to Article Market Listing
If not, I will have to break these into multiple Asynchronous deep calls bound with some logical keys
Regards,
Saumil Jyotishi
Saumil,
Multi level Deep Insert is very much possible. Do you have Fiori Sales Quotation Application in your system? This OData service uses multi level deep insert like this.
Sales Quotation header
Sales Quotation Items
Pricing Conditions
With Associations/Navigations setup right, this is as simple as deep insert.
Thanks
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saumil,
How will be your deep entity type in the MPC_EXT class?
Can you please give me an example.
Thanks & Regards,
Jhansi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saumil,
Yes we can achieve....We already implemented kind scenario.
Thanks,
Syam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So,
We did a small POC and I can get 3 levels nesting in read_entry_data in Gateway
If anyone needs an example, here is the sample JSON model we used for prototyping:
{
"employeeNumber": "00000001",
"employeeName": "Santi",
"Countries": [
{
"countryCode": "GB",
"countryName": "GreatBritain",
"Addresses": [
{
"houseNumber": "20 Old Bakery",
"postCode": "OX11JP",
"PhoneNumbers": [
{
"phoneNumber": "12345"
}
]
},
{
"houseNumber": "28 Old Bakery",
"postCode": "OX11JP",
"PhoneNumbers": [
{
"phoneNumber": "12345"
}
]
}
]
}
]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Saumil,
Thanks for sharing the JSON payload.
May be u can just share the below as well so that others can get entire idea on the whole scenario
This will help how they can model service and code deep structure as well.
1. Screen shot of Associations & Navigation between entities with cardinality.
2. Deep structure which u have created in DPC level to capture the data coming from as payload.
Its just an suggestion
Regards,
Ashwin
Hi Ashwin,
As I described before, the scenario here to create 4 nested entities (3 Levels of deep create).
What we did in POC or what you can do: Create associations and navigations (nothing special, the way you would do normally). As shown below:
Grand Parent -> Parent -> Child -> Grand Children
Then, create a nested ABAP types in your DPC_EXT class for these entities (One type embedded in other all the way through).
Then, in read entry data method of the API, Gateway should be able to give you these things via your nested structure (Again nothing special).If we know some ABAP, we can do whatever we want with this data
You can test this kind of deep create via a payload similar to what I have described above.
Now, The real question is how will I read this in 1 go . As you know $expand has its own limitations.
Turns out its possible to read 4 levels deep data in 1 go with the help of Complex Types and $expand.
Here is an example of working URL:
bpmodata/taskdata.svc/21effb75608911e4b216000002d08e4e/InputData('21effb75608911e4b216000002d08e4e')?$expand=ComplianceContextType/projectDetails/grp_products/gsa_List/Aml_List&$format=json
Hello Saumil,
Yes its possible through creating different entities and associations & navigation's between them with appropriate cardinality.
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krishna,
Thanks for this info. I will try and have a look at this Service.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Talking about multiple asynch calls, I see it as follows (All of this has to be created on a button click in UI):
Level 1: Project to Group Products
This can be 1 deep create and it will return the Group Product IDs created with response.
Level 2: Group Products to Group Sales Articles
This will be a series of deep calls by UI (for each Group product id from previous step) to create all Group Products and Sales Articles. Again as a response call will return the unique ids for Group Sales Articles.
Level 3: Group Sales Articles to Article Market Listing
This, again, will be a series of deep calls (for each Group Sales Article from previous step) to create all Group Sales Articles and Article Market Listing.
Has anyone tried such thing before?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.