cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member339201
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

GowthamRaja
Participant
0 Kudos

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 ''>

former_member339201
Participant
0 Kudos

Hi Raja,

We tried the following query and it works :

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


We can add other filters to test our Odata service.



Regards,

SHUBHAM


GowthamRaja
Participant
0 Kudos

i cant understand please come again

former_member339201
Participant
0 Kudos

Hi Raja,


Its like below:

/sap/opu/odata/SAP/ZCASE_TEST_SRV/Ztest1Set?$filter=KOKRS eq 'US00' and BELNR eq '000000011'


Regards,

SHUBHAM

Answers (1)

Answers (1)

former_member184867
Active Contributor
0 Kudos

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