on 01-13-2015 4:44 AM
Hi experts
I have a REST based SAP Gateway service. This service has a key field called DeliveryNumber. It returns PGI data for the given Delivery Number.
It works fine when for one Delivery Number using the below url where '345667' is one delivery number.
http://xxxxxxxx/getpgidata('345667')
What I have to do if I want more than one delivery number details? How will my url look?
For example if I need to get PGI data for DN numbers 12345 and 678989
Please help.
Thanks
Gopal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gopalakrishna,
You have to use GET_ENTITYSET method to fetch multiple records . If you are using RFC then create two import parameters and pass those numbers to the RFC and include it in where condition in your select querry .
Regards,
Dinesh Jeyasurian.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gopalkrishna,
Till now you are using GET_ENTTITY method to get the PGI data of one Delivery Number i.e. Read scenario. Now you want the data of more than one delivery numbers so you need to use GET_ENTITYSET method of this entityset.
If you are using standard BAPI then check if you can pass multiple delivery numbers in that or not. If there is no provision of passing multiple numbers as input, you need to use a custom FM which accepts multiple delivery numbers. For this, you need to make delivery number as range(with SIGN, OPTION, LOW, HIGH fields). Then map your delivery number property to this range in GET_ENTITYSET method.
The HTTP Request URL would be something like: (say DeliveryNum is the key)
http://<server>:<port>/sap/opu/odata/ZXXXX/getpgidata?$filter=( DeliveryNum eq '123' or DeliveryNum eq '456' )
Regards
Ekansh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.