cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

EML- READ Entity using partial key fields

Jaison_John
Discoverer
3,237

Hi Experts,


I have a requirement to read the BO entity using partial key. I have 3 key fields in the BO and want to read the data using only the first two key fields. When I pass only two fields to the READ statement it is not fetching any value. The third key is a numeric type and it will be defaulted as "0" when no data is passed. Is there any way to overcome this issue?

The pseudo code is below. Any help would be appreciated!

 

READ ENTITY IN LOCAL MODE <Root_entity>

ALL FIELDS WITH VALUE #( ( %key-field1 = value1

%key-field2 = value2

"%key-field3 = <No value is passed here> -- This is an integer type

) )

RESULT DATA(lt_result)

FAILED DATA(lt_failed).

 

 

View Entire Topic
MioYasutake
SAP Champion
SAP Champion
0 Likes

@Jaison_John 

How about removing the '%key-' and directly specifying the field names like an example below?

READ ENTITY IN LOCAL MODE <Root_entity>

ALL FIELDS WITH VALUE #( ( field1 = value1

field2 = value2 ) )
Jaison_John
Discoverer
0 Likes

Hi Mio,

Unfortunately, that doesn't work because the 3rd key field is still defaulted as '0' and not fetching the result.