Hi Masa,
We have leveraged using BADI's available for SRM_PURCHASEORDER up to the last request received, where we added a new entity type to support Smart forms PDF display of Purchase Order data. We resulted in creating a brand new Odata Service to follow SCN exampleDisplaySmartform(PDF) in SAPUI5 . We successfully tested PDF rendering of PO via backend t-code /IWFND/GW_CLIENT; however when we attempted to call new service Z_SRM_PO_APP_SRV from HCP Web IDE we receive the following error:
"error":{"code":"005056A509B11EE1B9A8FEC11C21D78E","message":{"lang":"en","value":"Resource not found for the segment 'WorkflowTasks'."},"innererror": ...........
Backend error log states the following:
The request URL or the metadata definition is incorrect.
Message no. /IWFND/MED167
Possible reasons are
- The URL contains a segment with a wrong name. E.g. the requested entity set or function import does not exist.
- The metadata definition is not correct. E.g. the definition of an association references to an entity set that does not exist. This is especially likely if two services have been composed via method INCLUDE_MODEL_BY_SERVICE_ID in the BEP Add-On.
I noticed the standard definition Entity Set ' "WorkflowTasks" property is “Not Addresable". Is this the reason why we are getting error message? How can I change this property as it is currently not available for me to edit in SEGW?
A second approach is to create the “pdf” Entity Type in BADI IF_SRM_PURCHASEORDER_MPC~ENHANCE_GW_SERVICE_ENTITY_MPC but I am not sure I can accomplish the same results?
Your feedback is very much appreciated.