atsv1.png
  • Home

  • Offerings & Downloads

  • FAQ

  • Anubhav's Learning Series

  • Next Batchs

  • Testimonials

  • Contact Us

  • Become a trainer

  • Testimonials

    www.anubhavtrainings.com

    Mail us on contact@anubhavtrainings.com

    Follow excellence with sheer passion

    s4hana tutorial.png
    Mail us
    To see this working, head to your live site.
    1. Anubhav Forum
    2. How to use conversion exits in OData.
    Search
    Gurpreet Jaspal
    Dec 17, 2019

    How to use conversion exits in OData.

    Very often we use DDIC reference to create entity and entity sets. For some standard document numbers, we always have leading zeros (alpha exit). And its not ideal to show that to user on his screen. By default, SAP does not support these conversions. Or as Anubhav says:

    'There is nothing like magic' :)

    You have to tell your model provider to do that for you. One of the quickest and easiest method is to redefine your 'define' method in MPC extension class (*MPC_EXT). Get the property (field) of your entity set and call the method set_conversion_exit.


      METHOD define.
        super->define( ).
        model->get_entity_type( zcl_<your class>mpc_ext=><entity name> )->get_property('<property/field name>')->set_conversion_exit('ALPHA').
      ENDMETHOD.

    0 comments
    0

    Mail us at contact@anubhavtrainings.com