Skip to Content

We need URI to test Odata service for Document number search help

Hi all,

We are trying to create an Odata service for Document Number search help.The search help should show (Controlling Area, Document No,Posting date,Document date).The user should pass the Controlling area as a mandatory field to get the search help.

There is no elementary serach help at data element level. So we followed two approaches :

1) Create a CDS view . Call the Get Entity Set method to AMDP which queries from CDS view.

2) Create a Custom Search Help.Import this Search Help in SEGW .

*Now we can have multiple controlling areas as input.

We need to find URI so that we can test our service. For example we tried below :

/sap/opu/odata/SAP/ZCASE_TEST_SRV/Ztest1Set (works fine).

When the user gives Controlling Area :

/sap/opu/odata/SAP/ZCASE_TEST_SRV/Ztest1Set(KOKRS='US00') (No Result , BAd request).

Can we give other parameters as blank like below :

/sap/opu/odata/SAP/ZCASE_TEST_SRV/Ztest1Set(KOKRS='US00',BELNR='') (This also gives no result).


Can we write URI where we can give filter like :

/sap/opu/odata/SAP/ZCASE_TEST_SRV/Ztest1Set?(SIGN='I', OPTION='EQ', LOW='US00', HIGH='') ( Status 200, but no result )

Please suggest URIs so that we can test the Odata service.

Regards,
SHUBHAM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Nov 05, 2015 at 10:09 AM

    Hi Shubham,

    you can specify the filter options in URL but the syntax should not contain phrases. it should be

    /sap/opu/odata/SAP/ZCASE_TEST_SRV/Ztest1Set?$filter=<ip1 eq ''> and <ip2 eq ''>

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 05, 2015 at 08:37 AM

    Hello Subham,

    A little debug into the Data Provider class will show you why /sap/opu/odata/SAP/ZCASE_TEST_SRV/Ztest1Set(KOKRS='US00',BELNR='') does not return any result.

    /sap/opu/odata/SAP/ZCASE_TEST_SRV/Ztest1Set?(SIGN='I', OPTION='EQ', LOW='US00', HIGH='') will not work as SIGN, OPTION, LOW and HIGH are not the properties of the OData service you generated.


    Regards

    Atanu


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.