Skip to Content

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

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers