cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement 3 level Hierarchy in Create Deep Entity in SAP ODATA?

0 Kudos

Hi,

I have created entities in the following hierarchy.

Order -> items -> prices

Order and Items also contains some fields of their own.

Sales order will be created in bulk in front end and sent it to SAP as a batch.

1) Should i declare a dummy entity and create an association with Order to receive/accept multiple orders?

2) This is my deep entity declaration in mpc class.

TYPES:
BEGIN OF TS_ITEM_DEEP_ENTITY,
INCLUDE TYPE ZCL_xx_MPC=>TS_ITEMS,
NItemToConfiguration TYPE STANDARD TABLE OF ZCL_xx_MPC=>TS_CONFIGURATION WITH DEFAULT KEY,
NItemToShipping TYPE STANDARD TABLE OF ZCL_xx_MPC=>TS_ITEMSHIPPING WITH DEFAULT KEY,
NItemToPrices TYPE STANDARD TABLE OF ZCL_xx_MPC=>TS_PRICES WITH DEFAULT KEY,
END OF TS_ITEM_DEEP_ENTITY .


types:
BEGIN OF TS_DEEP_ENTITY,
INCLUDE TYPE ZCL_xx_MPC=>TS_ORDER,
NOrderToItem TYPE STANDARD TABLE OF TS_ITEM_DEEP_ENTITY WITH DEFAULT KEY,
NOrderToShipping TYPE STANDARD TABLE OF ZCL_xx_MPC=>TS_SHIPPING WITH DEFAULT KEY,
NOrderToChargesummary TYPE STANDARD TABLE OF ZCL_xx_MPC=>TS_CHARGESUMMARY WITH DEFAULT KEY,
end of TS_DEEP_ENTITY

How should i populate the data in order and price structure to corresponding backend tables?

3) How to give JSON as input for this service?

Accepted Solutions (0)

Answers (0)