How to give error messages in odata services
How to give an error message in OData services, I going to write simple code so we can achieve error in OData service here I write simple code can help you to give an error message in data
method ZODATAERRORSET_GET_ENTITYSET.
Data: ls_header TYPE ihttpnvp.
* ls_header-name = 'ERROR'.
* /iwbep/if_mgw_conv_srv_runtime~set_header( ls_header ).
ls_header-name = 'ERROR'.
ls_header-value = 'Sales order creation problems'.
/iwbep/if_mgw_conv_srv_runtime~set_header( ls_header ).
endmethod.
Data: ls_header TYPE ihttpnvp.
* ls_header-name = 'ERROR'.
* /iwbep/if_mgw_conv_srv_runtime~set_header( ls_header ).
ls_header-name = 'ERROR'.
ls_header-value = 'Sales order creation problems'.
/iwbep/if_mgw_conv_srv_runtime~set_header( ls_header ).
endmethod.
Comments
Post a Comment