04-16-2008 12:03 PM
Hi Experts,
Is there any direct method to transport structure fields to the excel file instead of doing it manual?
Thanks in advance!!
04-16-2008 12:07 PM
04-16-2008 12:08 PM
I want to pass a text file to the standard program RAALTD11. The structure of the text file is same as the standard structure BALTD.
Please suggest the possible solutions
Thank you.
04-16-2008 8:58 PM
Try this.
data: idfies type table of dfies with header line.
parameters: p_table type ddobjname.
parameters: filename(40) type c default 'C:\download.xls'.
p_table = 'MARA'. "Material Master's fields are desired
call function 'DDIF_FIELDINFO_GET'
exporting
tabname = p_table
tables
dfies_tab = idfies
exceptions
not_found = 1
internal_error = 2
others = 3.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = FILENAME
FILETYPE = 'DAT'
TABLES
DATA_TAB = idfies
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.