cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass input parameter in ODATA based on Bex Query

priyanka_kumari23
Active Participant
0 Kudos

Hello Friends,

I have created a ODATA SERVICES based on easy Query.But whenI run the URL for metadata. It gives runtime error because it needs to pass Input parameter.

I dont know how to pass Input parameter in odata created based on Query. My Bex Query has 1 Input variable which needs to be passed at run time.

Please help to resolve this Issue.

Thanks,

Priyanka

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member215851
Participant
0 Kudos

Hi Priyanka,

For fetching the metadata you do not need any input parameter.

Service Document URL and Metadata Url should work properly if your service is created successfully.

What is the runtime error that you are getting while fetching metadata?

Thanks & Regards,

Mohan

priyanka_kumari23
Active Participant
0 Kudos

Hi Mohan,

Yes,the service was created successfully.This query has one input variable.Not sure how to pass value for this.

At run time it says that you need to pass Input parameter for 'ZDATE1(this is the name of variable)'.

After metadata when I am running url for entity set.

AbhishekSharma
Active Contributor
0 Kudos

Hi Priyanka,

have you tried using filters available..

Thanks-

Abhishek

former_member215851
Participant
0 Kudos

Hi Priyanka,

  You would see a separate entity set in the metadata for you input variable. The properties of this entity should have the annotation sap: parameter= "mandatory” or sap: parameter= "optional”.

In the Service document there would be a href attribute mentioned for the corresponding QueryParameter Entity.

Your url should look like

http://<host>:<port>/sap/opu/odata/sap/<ServiceName>/<href attribute value>(Value In your case the value of ZDATE1)/Results

For more information, you can use the blog

Thanks & Regards,

Mohan