Skip to Content
0
Former Member
Feb 17, 2009 at 07:03 AM

How to create a structure of itab as rows as colums and columns rows dynami

1009 Views

HI,

Experts,

I want to create a structure for itab2 like rows of another itab1 as columns(generic type) to the structure for itab2.

Ex:

itab1: work area-> data: begin of sy_vbak1,

vbeln ................,

posnr ................,

erdat ................,

netwr ................,

waerk ................,

end of sy_vbak1.

data: itab1 like table of sy_vbak1,

wa_tab1 like ay_vbak1,

count type i.

select vbeln posnr erdat netwr weark from vbak into table of itab1 up to 5 rows.

Here i want to create a structure for itab2.But i want rows of itab1 as columns of generic type that too dynamically.

Like:

As i have select only 5 row in select query.

itab2:work area->data: begin of sy_vbak2,

row1 type generic_type,

row2 type generic_type,

row3 type generic_type,

row4 type generic_type,

row5 type generic_type,

end of sy_vbak2.

how to acheive/create this dynamically based up the rows of itab1. I have tried but i did not achieved i need Experts help.

I think u have understood my problem/issue.If not please post your not understood points.

Thank in Advance,

Shabeer ahmed.