cancel
Showing results for 
Search instead for 
Did you mean: 

ODATA SAP NOTE 1797736

former_member626380
Participant
0 Kudos

HI

I created Program To Test ODATA ,

when using GET the result is true no problem like below

1- implement GET_ENTITY

method TESTSET_GET_ENTITY.
DATA : IS_KEY_TAB TYPE /IWBEP/S_MGW_NAME_VALUE_PAIR,
IV_MAID TYPE ZODATA_TEST-ID.
LOOP AT IT_KEY_TAB INTO IS_KEY_TAB .
IF IS_KEY_TAB-NAME EQ 'ID'.
IV_MAID = IS_KEY_TAB-VALUE .
ENDIF .
ENDLOOP .
SELECT SINGLE * FROM ZODATA_TEST INTO CORRESPONDING FIELDS OF ER_ENTITY WHERE ZODATA_TEST~ID = IV_MAID.
endmethod.

2- implement GET_ENTITYSET

method TESTSET_GET_ENTITYSET.
select * FROM ZODATA_TEST INTO TABLE ET_ENTITYSET .
endmethod.

the result run like pic below

but when Using delete there are error I can not found what is the error like below .

1- implement DELETE_ENTITY

method TESTSET_DELETE_ENTITY.
DATA : IS_KEY_TAB TYPE /IWBEP/S_MGW_NAME_VALUE_PAIR,
IV_MAID TYPE ZODATA_TEST-ID.
LOOP AT IT_KEY_TAB INTO IS_KEY_TAB .
IF IS_KEY_TAB-NAME EQ 'ID'.
IV_MAID = IS_KEY_TAB-VALUE .
ENDIF .
ENDLOOP .
DELETE FROM ZODATA_TEST
WHERE ID = IV_MAID.
endmethod.

the result like pic below

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member1716
Active Contributor
0 Kudos

Hello alaa-azazy,

The URL you have used should have an issue, that's the reason you get this error.

Recommend you to go through the below Link to get a knowledge on troubleshooting, You should get a better understanding on these different methods through the blog.

BLOG

Regards!

samson_moses
Explorer
0 Kudos

Hi,

Not sure how are passing your Key for Deletion in the above example.

Please try as below :

Regards,

Samson

former_member626380
Participant
0 Kudos

I do this but no result can you check my code false or true