cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple records in response of deep entity Set

Former Member
0 Kudos

hi,

have a question regarding displaying Multiple rows as Output in XML Response using Create_Deep_Entity method. How to achieve that? Below is the procedure i followed and I am able to return only last record of the table in XML Response.


I have Created 3 entities,


TrialHeader

Vkorg

TrialItem

MATNR

  MAKTX

  VMSTB

  MVGR3

  BEZEI

  BRGEW

  NTGEW

  MVGR2

  CPARK

  CPARKT

  VKORG

  DWERK

  MSTAV

TrialItemDetail

MATNR

  MAKTX

  VMSTB

  MVGR3

  BEZEI

  BRGEW

  NTGEW

  MVGR2

  CPARK

  CPARKT

  VKORG

  DWERK

  MSTAV

Association between these:

Header_Item(1 N)

Header_ItemDetail(1 N)

I have created one Type as TS_GEN_DEEP_ENTITY

class ZCL_ZREALTY_MPC_EXT definition

   public

   inheriting from ZCL_ZREALTY_MPC

   create public .

public section.

   types:

     ty_item TYPE STANDARD TABLE OF ZCL_ZREALTY_MPC=>TS_TRIALITEM WITH DEFAULT KEY .

    types:

     ty_itemdetail TYPE STANDARD TABLE OF ZCL_ZREALTY_MPC=>TS_TRIALITEMDETAIL WITH DEFAULT KEY .

   types:

     BEGIN OF  TS_GEN_DEEP_ENTITY  ,

      VKORG type C length 4,

      header_item_nav TYPE ty_item,

      header_itemdetail_nav Type  ty_itemdetail,

      MATNR type C length 18,

      MAKTX type C length 40,

      VMSTB type C length 25,

      MVGR3 type C length 3,

      BEZEI type C length 25,

      BONUS type C length 2,

      BRGEW type P length 7 decimals 3,

      NTGEW type P length 7 decimals 3,

      MVGR2 type C length 25,

      CPARK type C length 30,

      CPARKT type C length 30,

end of TS_GEN_DEEP_ENTITY .

   methods DEFINE

redefinition .


I am getting values of header_item_nav and other fields in output xml

but not getting records of header_itemdetail_nav.


Can someone help me these.

I want multiple values which are there in header_item_nav

 

Regards,

SupriyaD

Accepted Solutions (0)

Answers (1)

Answers (1)

ChandraMahajan
Active Contributor
0 Kudos

Can you check this blog

Regards,

Chandra