on 10-30-2018 9:12 PM
Good afternoon,
I am wondering if anyone out there has successfully built a dataflow in Data Services (currently using 4.2 SP10) that calls an external REST Webservice which returns a set of records which are then written to a database table?
What I have done successfully so far, is to build my dataflow that calls the Webservice once for each row, by passing in a list of IDs and using a Row Generator. Each row is then written back to my table. I used this blog to accomplish this: https://blogs.sap.com/2016/06/07/consuming-rest-web-service-in-sap-data-services-using-web-service-r...
This works fine, but I need to be able to call the WebService for a batch of records when I don't know the individual IDs to pass in as parameters. It's there that I am stuck and haven't quite figured out what I need in my data flow. I can call the webservice using a filter which returns a set of records, but I haven't been able to figure out how to then take that return JSON message and parse each individual record out and write them back to the database.
Does anyone have experience with this?
Thanks,
Stacey
Hi Stacey.
You will have to create a JSON my mapping the source table, file etc where the id's are stored and map it in the same way as you are currently mapping individual records. The link will be helpful but believe me for the first time creating an XML / JSON is very confusing. Would suggest in case by any chance if you have an RDS template looking as to how an iDOC is mapped will be very useful.
Regards S.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your response Shazin. I found that my problem was with my XML Schema definition in the WADL file. The way I was generating it, it was creating an extra nested level with the max occurs property set, but BODS didn't seem to handle that well.
Once I modified my schema definition by removing the unnecessary level, then it started returning the set of records instead of just a single record.
Thanks again,
Stacey
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.