Application Development 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: 

How to separate the internal table columns into separate internal tables.

Former Member
0 Kudos

Hi Experts,

  • I have an internal table with 400 rows and 15 columns. I want to separate the 3 columns in one internal table and remains 12 columns in separate internal table .
  • I want to do the logic(convert the 12 columns into 12 rows) . But finally i want the table with both table values like 3 columns as itself and

follows the converted table.

  • I knows how to do the logic. but first of all, i want to know ,how to split and conjoin it ????

Help me to work out this.

Thanks in Advance !!!!

1 ACCEPTED SOLUTION

former_member192723
Active Participant
0 Kudos

Hi Yogesh,

You can declare two internal tables, one with 12 columns and other with remaining 3 columns.

Loop the main internal table, move corresponding values into newly declared table's workarea and append the recoreds.

Regards,

Shravan

8 REPLIES 8

former_member192723
Active Participant
0 Kudos

Hi Yogesh,

You can declare two internal tables, one with 12 columns and other with remaining 3 columns.

Loop the main internal table, move corresponding values into newly declared table's workarea and append the recoreds.

Regards,

Shravan

0 Kudos

Thanks Shravan.

            I splited and did my logic using dynamic internal table. Now i have 3 columns in internal table interms of field symbol and another converted table has 400 columns, 12 rows.  How to conjoin these internal tables intrems of field symbols.

0 Kudos

Hi

It's not possible by WHERE conditions, but you need to read the tables (by nested loop) and check the values in order to join them

Max

0 Kudos

Hi Yogesh,

Can you post your code for better understanding of the issue?

Shravan

0 Kudos

I did it Shravan

0 Kudos

Ok.Thanks.

How?

0 Kudos
  • I created three structure, one for full table, another for first 3 columns and next for remain 12 columns.
  • Then, i create fields and dynamic structure using LVC_S_FCAT sap global structure.
  • By calling Method  CL_ALV_TABLE_CREATE, I give the input as created fields and get the dynamic table.
  • Then its simple, i append first 3 columns into <f> and perform conversion using sy-tabix+3 for remaining columns and modify into the <f>.

Former Member
0 Kudos

Thanks All..

Thread is closed !