Create a Data Model in SE80 using the From Scratch option as described in OData Channel, specifically doing the following:
Enter a Data Model name of ZHS_EPM_GI.
On the Create Data Model popup, keep the Type as PS and ensure the From Scratch button and accompanying OData Channel box are checked (the default).
Enter GOODSISSUE as the Root Data Object name:
Select the green check mark to continue.
On the next popup (Create Object Directory Entry), select Local Object (package $TMP) and choose Save.
A message displays at the bottom of the screen confirming that the Data Model has been saved. A model skeleton is created and displays in the repository browser in a tree structure, showing the root Data Object and an Object Structure folder beneath it, where the Data Objects and Properties we create will display.
Create the following Data Model structure (Properties, keys, and sub Data Objects):
See Creating Data Objects and Creating Properties for details of how to do this using the Property editor.
Create the Properties with the names and settings listed in the following table.
Set GI_NODE_KEY and GI_ITEM_NODE_KEY as key Properties:
Property Name |
External Name |
Core Type |
Label |
Key |
Read-only |
---|---|---|---|---|---|
GI_NODE_KEY |
GoodsIssueKey |
Edm.Guid |
Goods Issue Key |
Yes |
Yes |
BUYER_GUID |
BuyerKey |
Edm.Guid |
Buyer Key |
No |
Yes |
BUYER_ID |
BuyerID |
Edm.String |
Buyer ID |
No |
Yes |
BUYER_NAME |
BuyerName |
Edm.String |
Buyer Name |
No |
Yes |
CHANGED_AT |
ChangedOn |
Edm.DateTime |
Changed On |
No |
Yes |
CREATED_AT |
CreatedOn |
Edm.DateTime |
Created On |
No |
Yes |
ROOT_TITLE |
RootTitle |
Edm.String |
Root Title |
No |
Yes |
SO_GUID |
SalesOrderKey |
Edm.Guid |
Sales Order Key |
No |
Yes |
SO_ID |
SalesOrderNumber |
Edm.String |
Sales Order Number |
No |
Yes |
GI_ITEM_NODE_KEY |
GoodsIssueItemKey |
Edm.Guid |
Goods Issue Item Key |
Yes |
Yes |
PRODUCT_GUID |
ProductKey |
Edm.Guid |
Product Key |
No |
Yes |
PRODUCT_NAME |
ProductName |
Edm.String |
Product Name |
No |
Yes |
QUANTITY |
QuantityCode |
Edm.Decimal |
Quantity |
No |
Yes |
QUANTITY_DESC |
QuantityText |
Edm.String |
Quantity |
No |
Yes |
QUANTITY_UNIT |
QuantityUnit |
Edm.String |
Quantity Unit |
No |
Yes |
SO_ITEM_GUID |
SalesOrderItemKey |
Edm.Guid |
Sales Order Item Key |
No |
Yes |
SO_ITEM_POS |
SalesOrderItemPosition |
Edm.String |
Position of Sales Order Item |
No |
Yes |
Do not model the Query and GetDetails operations explicitly.
Each Data Model created from scratch currently contains a generated GSDO type, with its name derived from the Data Model name. This is obsolete and is ignored.
Create a custom operation (Operation Type of X) called GOODSISSUE_OP as described in Creating Operations, with the following input parameter structure:
Name |
External Name |
Core Data Type |
---|---|---|
SO_GUID_PARAM |
so_guid |
Edm.Guid |
Select the GOODSISSUE root Data Object as the operation's output parameter.
Save the operation.
The Data Model structure should now be as follows, with the new operation displaying under the Operations folder:
The ZHS_EPM_GI PS Data Model is created.