Skip to Content
0
Former Member
Mar 16, 2007 at 08:25 AM

Passin one internal tab to another

13 Views

Hi all,

According to the problem i need to pass

<b>i_mard to t_mard</b>

But it showing error conversion is not possible

what I have to do ,so that FM on EXECL will work.

report y_test.

data: begin of i_mard occurs 0,

matnr like mard-matnr,

labst like <b>mard-labst</b> ,

end of i_mard.

data: begin of t_mard occurs 0,

matnr like mard-matnr,

labst(17) <b>type c</b> ,

end of t_mard.

data : begin of it_fnames occurs 0,

reptext like dfies-reptext,

end of it_fnames.

select matnr LABST from mard into table i_mard.

t_mard = i_mard.

it_fnames-reptext = 'MATERIAL'.

Append it_fnames.

it_fnames-reptext = 'Valued Stock'.

Append it_fnames.

CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'

EXPORTING

FILE_NAME = 'C:\T001'

DATA_SHEET_NAME = 'Companies'

TABLES

DATA_TAB = t_MARD

FIELDNAMES = it_fnames

EXCEPTIONS

FILE_NOT_EXIST = 1

FILENAME_EXPECTED = 2

COMMUNICATION_ERROR = 3

OLE_OBJECT_METHOD_ERROR = 4

OLE_OBJECT_PROPERTY_ERROR = 5

INVALID_FILENAME = 6

INVALID_PIVOT_FIELDS = 7

DOWNLOAD_PROBLEM = 8

OTHERS = 9

.