on 03-29-2020 8:16 PM
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
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.
Regards!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.