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

converting rows into columns

Former Member
0 Likes
2,046

Hi friends,

I have data in internal table based on condition types . The Particular condition may have have two or three

rows showing prices based on condition type. so i want all the three rows in same columns. can anybody

suggest me any build in type function available for doing the same. Is there any List function availaible.

The No. of rows may be 2, 3 or more based on condition type.

for eg :

Cond 1 45

Cond 1 20.

I want Cond1 45 20 .

Thanks

Kamal

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,640

Hi Kamal

By your example

for eg : 

Cond 1 45
Cond 1 20. 

I want Cond1 45 20 

It seems that you want vice versa.Anyways

Check the thread

and

Regards

Sachin

Edited by: sachin sharma on Feb 25, 2009 10:39 AM

5 REPLIES 5
Read only

Former Member
0 Likes
1,641

Hi Kamal

By your example

for eg : 

Cond 1 45
Cond 1 20. 

I want Cond1 45 20 

It seems that you want vice versa.Anyways

Check the thread

and

Regards

Sachin

Edited by: sachin sharma on Feb 25, 2009 10:39 AM

Read only

keerthy_k
Product and Topic Expert
Product and Topic Expert
0 Likes
1,640

Hi,

U can try this.

In itab, you will get values as :

Cond 1 45

Cond 1 20.

here t_dummy is your actual internal table in which you want data in required format.

SORT itab BY row col.

LOOP AT itab INTO wa.

CASE wa-col. * eg. col 1 for first time and its values..

WHEN '1'.

wa_dummy-a = wa-value.

WHEN '2'.

wa_dummy-b = wa-value.

WHEN '3'.

wa_dummy-c = wa-value.

WHEN '4'.

wa_dummy-d = wa-value.

WHEN '5'.

wa_dummy-e = wa-value.

ENDCASE.

AT END OF row.

APPEND wa_dummy TO t_dummy.

CLEAR wa_dummy.

ENDAT.

ENDLOOP.

Keerthi.

Edited by: Keerthy K on Feb 25, 2009 6:56 AM

Edited by: Keerthy K on Feb 25, 2009 6:57 AM

Read only

Former Member
0 Likes
1,640

Hi,

1. Copy the data in one or more columns or rows.

2.Before you paste the copied data, right-click your first destination cell (the first cell of the row or column into which you want to paste your data), and then click Paste Special.

3. In the Paste Special dialog box, select Transpose, and then click OK.

You'll find theTranspose check box in the lower-right corner of the dialog box

then Starting with your first cell, Excel pastes the data into a row or column.

Neelima.

Read only

Former Member
0 Likes
1,640

Hi Kamal,

Would you like to display your outlike like below :

COND1--45--20 
COND2--12--13
COND3--11--14

Would you like to make the COND1 as a key field?

If this is the case then you can go ahead with the dynamic INternal Table.

PLease let me know if this is the case...

I will procide you fruther help to use Dynamic INternal Table.

Regards,

KIttu

Read only

0 Likes
1,640

Hi,

ya i want to display the output

COND14520

COND21213

COND31114 like this only. you can send me the help regarding dynamic internal Table.

Kamal