Display Smartform as Pdf in Sap Odata for SAPUI5
How to Create Smartforms as Pdf, please see the following steps : Goto SEGW Tcode : Create Project. Then Create Entity Type and Entity Set SoPrint Entity SoPrintSet entittyset of automatic created. Generate the runtime artifacts and redefine the DEFINE method in MPC_EXT The following code here : METHOD define. DATA: lo_property TYPE REF TO /iwbep/if_mgw_odata_property, lo_entity_type TYPE REF TO /iwbep/if_mgw_odata_entity_typ. super->define( ). lo_entity_type = model->get_entity_type( iv_entity_name = 'SoPrint'). IF lo_entity_type IS BOUND. lo_property = lo_entity_type->get_property('Kunnr'). lo_property->set_as_content_type( ). ENDIF. ENDMETHOD. Create a Smartform Screenshot is given below : Code in DPC_EXT write code in the following method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_STREAM METHOD /iwbep/if_mgw_appl_srv_runtime~get