on 08-11-2015 7:42 AM
Hi all,
i followed this article to redefine a bw query into a gateway service for my mobile app. the service is ok, i could retrieve the data. however if i want to store the data on my mobile app for offline usage, something bad happened. i used SAP Kapsel plugin to create my Hybird mobile app, and used its offline plugin to store data. But the plugin can't be working if the key on gateway service didn't have a max length assigned(). unfortunately the service redefined from BW Query has a ID as key, however this field didn't have a max length assigned.
i tried modified the ID filed, failed, can't change the max length property. then deleted the ID ,and create a new ID_NEW, failed, the metadata still showed no max length,even i have assigned the max length.
seems SAP has a conflict between these two product , BW Query to gateway, and Kapsel Offline Plugin. any advice will be helpful.
thanks,
Billy
the screenshot below shows the ID without max length. 0 means no max length. how can i generate a gateway service from BW Query ,meanwhile the ID has a max length assigned?
Hello Shen,
Add code manually to restrict the length of the field in the Define Method of your MPC_EXT class.
Sample code to be written in Define Method ->
super->define( ).
DATA:
lo_entity TYPE REF TO /iwbep/if_mgw_odata_entity_typ,
lo_property TYPE REF TO /iwbep/if_mgw_odata_property.
lo_entity = model->get_entity_type( iv_entity_name = '<Your_Entity_Name>' ).
IF lo_entity IS BOUND.
lo_property = lo_entity->get_property( iv_property_name = '<Your_Property_Name' ).
lo_property->set_maxlength( iv_max_length = 10 ).
ENDIF.
Activate and clear Model Cache once using t-code /iwfnd/cache_cleanup in GW System.
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On potion could be to assign max length by manual coding in DEFINE method of _MPC_EXT class.
Have you tried it already ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.