on 12-24-2013 7:20 AM
Just faced the same problem. From my point of view it is an error in gateway framework. It calls output conversion exit for exchange rate and provides non-character output field as you can see in debugger. If it provided character like output field (as it should do) everything worked fine. You can not change this behaviour by entering a different data type for the property of the entity type.
Did you import the entity type via DDIC structure? This is where it gets the output conversion info from. If you do not import the exchange rate field from DDIC but just add it from scratch the error will not show.
Maybe you can suppress output conversion in the first place, but this is my first day trying it out so I don't have much knowledge about GW or OData.
Regards,
Christoph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you can disable output conversion programmatically by overriding /IWBEP/CL_MGW_ABS_MODEL->DEFINE like that (makes use of some new ABAP syntax):
METHOD define.
super->define( ).
* Disable all output conversion since it is buggy
DATA(lt_type) = CAST /iwbep/if_mgw_odata_re_model( model )->get_entity_types( ).
LOOP AT lt_type ASSIGNING FIELD-SYMBOL(<s_type>).
DATA(lo_type) = model->get_entity_type( <s_type>-external_name ).
LOOP AT <s_type>-properties ASSIGNING FIELD-SYMBOL(<s_property>).
DATA(lo_property) = lo_type->get_property( <s_property>-external_name ).
lo_property->disable_conversion( ).
ENDLOOP.
ENDLOOP.
ENDMETHOD.
Hello,
I am also facing the same issue.
@Ron - I tried what you described above but it does not work. If i execute conversion function independently, its working fine but when executed through web service, with exact same values/types, it goes for a short dump. What could be the reason?
Thanks
Gaurav K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav,
If you are testing with SE37, the function will work because the test harness interface is generated appropriately. I would therefore still be checking the property data type in the model because it is most likely an elementary numeric. The logic of the conversion seems to be changing an 'internal' value into a number suitable for list output. You don't necessarily want this to occur in your feed.
Alternatively, decouple this property from ABAP Dictionary, it is that binding that is invoking the conversion exit.
Regards
Ron.
This is the exchange rate conversion function, so I expect that you have an exchange rate element in the entity that is defined as a numeric EDM type - it probably needs to be made a string. The conversion is trying to SHIFT, which cannot be done on an elementary number type.
Regards
Ron.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saritha,
Can you please give a code snap... if possible.
We might have problem with the data type used.
Thanks
Saurabh Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.