Hi
In Gateway, I want to get header and item data of my PO from ERP, on behalf of the PO number.
In transaction /IWFND/GW_CLIENT I execute the http method GET for
/sap/opu/odata/sap/ZGW_BD_PURCH_SRV/
and
/sap/opu/odata/sap/ZGW_BD_PURCH_SRV/$metadata
I got a http status 200 return – which is fine
In the ERP that I am calling, there is a purchase order with no. '3000000006'
But when I execute the service for following url: /sap/opu/odata/sap/ZGW_BD_PURCH_SRV/PurchaseOrderCollection('3000000006')
But I got this error:
<?xml version="1.0" encoding="utf-8" ?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>005056A509B11ED199D891D139C92103</code>
<message xml:lang="en">Resource not found for the segment 'PurchaseOrderCollection('3000000006')'.</message>
</error>
My settings are like this:
Entity types is created:
PurchaseOrders (PoNumber is key) + PurchaseOrdersItems (PoNumber+PoItem are keys)
Entity Sets is created:
PurchaseOrderCollection (assigned to PurchaseOrders) + Purchaseorderitem (assigned to PurchaseOrdersItems)
In the Service Implementation the PurchaseOrderCollection has following mappings:
And for Purchaseorderitem I have following mappings:
The only BAPI that we are using is: BAPI_PO_GETITEMS
Any ideas?
Thanks,