Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

dynamic internal table for creating column for rows

Former Member
0 Likes
1,128

hello ABAP gurus

i want to know how can i create an internal table dynamically and then move data into it.

i already have data in one internal table which is coming from more than one table and having say 5 rows.

now i want to move data of that table into a dynamic internal table.

which has only one row, two fields from row 2 3 and 4 are added as column.

please help...

thanks and regards in advance.

7 REPLIES 7
Read only

Former Member
0 Likes
843

Hi Deep,

Can you explain clearly on these below statements.

now i want to move data of that table into a dynamic internal table.

which has only one row, two fields from row 2 3 and 4 are added as column.

Thanks,

Pradeep

Read only

Former Member
0 Likes
843

Hi ,

check this link and try to execute it .this will be helpful.

[http://www.sap-img.com/ab030.htm]

Please let me know if you have any issues on this.

Thanks and regards,

Rajeshwar.

Edited by: rajeshwar on Jul 23, 2009 2:30 PM

Read only

MarcinPciak
Active Contributor
0 Likes
843

Hi Deep,

This is preety basic quetion which you will certainly yourself find anwser for.

Examples from wiki code gallery

[dynamic internal table all fields|http://wiki.sdn.sap.com/wiki/x/LgHlAw]

[How to create internal table dynamically|http://wiki.sdn.sap.com/wiki/x/j4E_Bg]

Also a number of results you would get when exploring forum. Example result for query [creating dynamic table|https://www.sdn.sap.com/irj/scn/advancedsearch?query=creatdynamictable#sdn_content_category_value_forums]

Regards

Marcin

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
843

search it here

link:[code gallery|https://wiki.sdn.sap.com/wiki/display/Snippets/Home?showChildren=true#children]

Read only

Former Member
0 Likes
843

the requirement is like i have data in one internal table

whose first 3 column are holding same values but 4th and 5th column have different values

now i want to arrange the data in such a manner that it appears in one single row

which holds those changing values as column

available data in my itab1

1a 1b 1c 1d 1e

2a 2b 2c 2d 2e

3a 3b 3c 3d 3e

.

.

.

and so on

number of rows is also not fixed

required format

1a 1b 1c 1d 1e 2d 2e 3d 3e........

if possible reply with some working code....

Read only

0 Likes
843

>

> if possible reply with some working code....

if possible try to Code with the help of existing sample code. if you are facing any issues then you post the issue here, every one ready to help you.

Read only

0 Likes
843

Hi,

Check the example program BCALV_TABLE_CREATE.

Regards,

Ankur Parab