cancel
Showing results for 
Search instead for 
Did you mean: 

Query similar to like operator

former_member192971
Participant
0 Kudos

Hello All,

I have a query regarding Like operator in Abap . I am using the below code using like operator to fetch some data . For that RFC I need an Odata request URL which Inturn calls that RFC . Which String function i need to use ?

SELECT EBELN        "Purchasing Document Number

              EBELP        "Item Number of Purchasing Document

              TXZ01          "Short Text

              MATNR        "Material Number

              MENGE       "Purchase Order Quantity

              MEINS         "Purchase Order Unit of Measure

              FROM EKPO

             INTO TABLE T_EKPO

             WHERE EBELN  LIKE IM_PO_NUM.

I want to get all records which starts with '045'. I tried with below syntax.

http://host:port/sap/opu/odata/sap/ZPO_SRV/POSearchCollection?$filter=substringof('045' , ImPoNum) eq true and ImPlant eq ' ' .

Syntactically it's correct but not able to get data.

Appreciate your help.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

kammaje_cis
Active Contributor
0 Kudos

Uday,

In the *DPC_EXT class, filter select options will give you a 'Select Option' table.

You can use it directly in your select statement using 'IN'.

Example: WHERE EBELN  IN <select_table>