2007 Jul 18 3:18 AM
hi this is my first bdc prog,, i am unable to sort out what the problem,, error message is itab is not compatible with formal parameter "data_itab",,pls help me out points will be rewarded...
REPORT ZSAMPLEBDC .
tables :kna1.
data : begin of itab occurs 0,
kunnr like kna1-kunnr,
name1 like kna1-name1,
land1 like kna1-land1,
end of itab.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
FILENAME = 'c:\praveen.txt'
FILETYPE = 'asc'
CHANGING
data_tab = itab.
loop at itab.
write :/tab.
endloop.
2007 Jul 18 5:18 AM
hi,
in ur gui download function module pass internal table body not work area.
for ex: if internal table is with out header line u have to pass body of taht internal table and if internal table is with header line then give internal table name.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
FILENAME = 'c:\praveen.txt'
FILETYPE = 'asc'
CHANGING
data_tab = itab[]. ///////// when internal table is with out header line.
and data_tab = itab //// when internal table is with header line.
if helpful reward some points.
with regards,
Suresh.A
hi,
in ur gui download function module pass internal table body not work area.
for ex: if internal table is with out header line u have to pass body of taht internal table and if internal table is with header line then give internal table name.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
FILENAME = 'c:\praveen.txt'
FILETYPE = 'asc'
CHANGING
data_tab = itab[]. ///////// when internal table is with out header line.
and data_tab = itab //// when internal table is with header line.
if helpful reward some points.
with regards,
Suresh.A
2007 Jul 18 3:22 AM
2007 Jul 18 3:24 AM
Try to use like this the internal table declaration
REPORT ZSAMPLEBDC .
tables :kna1.
types : begin of ty_itab,
kunnr like kna1-kunnr,
name1 like kna1-name1,
land1 like kna1-land1,
end of ty_itab.
data : itab type table of ty_itab, " Internal table
ltab type ty_itab. " Work Area
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
FILENAME = 'c:praveen.txt'
FILETYPE = 'asc'
CHANGING
data_tab = itab.
loop at itab.
write :/tab.
endloop.Since that you are using classes, you can not use Header Line.
Regards
Gopi
2007 Jul 18 5:18 AM
hi,
in ur gui download function module pass internal table body not work area.
for ex: if internal table is with out header line u have to pass body of taht internal table and if internal table is with header line then give internal table name.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
FILENAME = 'c:\praveen.txt'
FILETYPE = 'asc'
CHANGING
data_tab = itab[]. ///////// when internal table is with out header line.
and data_tab = itab //// when internal table is with header line.
if helpful reward some points.
with regards,
Suresh.A
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |