Skip to Content
0
Former Member
Feb 09, 2009 at 05:48 AM

How to convert rows of internal table to columns of another internal table?

2476 Views

Hi,

Experts,

test_data.xls:

one two three four five

one two three four

one two three

one two

one

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

EXPORTING

FILENAME = 'c:/test_data.xls'

I_BEGIN_COL = '1'

I_BEGIN_ROW = '1'

I_END_COL = '10'

I_END_ROW = '10'

TABLES

INTERN = it_tab

EXCEPTIONS

INCONSISTENT_PARAMETERS = 1

UPLOAD_OLE = 2

OTHERS = 3

.

output:

0001 0001 one

0001 0002 two

0001 0003 three

0001 0004 four

0001 0005 five

0002 0001 one

0002 0002 two

0002 0003 three

0002 0004 four

0003 0001 one

0003 0002 two

0003 0003 three

0004 0001 one

0004 0002 two

0005 0001 one

but i want this format:

one two three four five

one two three four

one two three

one two

one

i don't want this type of output display i want to display in ABAP report as in file format how can i achieve this post some ideas on it.

Thank U,

Shabeer ahmed.