Skip to Content
-2
Nov 24 at 11:23 AM

Deep structure into flat structure

100 Views

Hello all,

I have a deep structure that

TYPES : BEGIN OF ty_deep,

lineid TYPE i,
asset LIKE lt_asset, ( internal table with columns lineid , asset_no )
oper_bud LIKE lt_operbud, ( internal table with columns lineid oper_bud_no )
END OF ty_deep

I have data to an internal table DATA : lt_deep TYPE TABLE OF ty_deep (deep structure) below,

lineid asset(internal table) operbud(internal table)

10 [ (row1) 10 Asset000110 ] [ (row2) 10 Operbud000110 ]

[ (row2) 10 Asset000210 ] ___________________________

20 [ (row1) 20 Asset000120 ] [ (row2) 20 Operbud000120 ]

___________________ [ (row2) 20 Operbud000220 ]

And I have a flat structure like

TYPES : BEGIN OF ty_flat,
lineid TYPE i,
asset_no TYPE char20,
oper_bud TYPE char20,
END OF ty_flat.

An internal table DATA : lt_flat TYPE TABLE OF ty_flat.

I want my output to be in format below

Lineid asset_no oper_bud

10 Asset000110 Operbud000110

10 Asset000210 Operbud000210

20 Asset000120 Operbud000120

20 Asset000220 Operbud000220

Kindly help me to solve this.

Thank you,

Vidhya V