hi all,
now currently i am working with reports.
In this i was given checkbox for a field.
i came with this problem. if we select checkbox.
A particular field should be activate and respected output should be shown in xl sheet otherwise it should be in deactivate. give that modules names which should been use to provide the output in xl sheet.
Try this.
call function 'WS_EXCEL'
exporting
filename = 'TEST.XLS'
tables
data = itab.
Regards,
Rich Heilman
Hi Sri,
I guess you will either select data from different fields based on your selection parameter entries into the corresponding field of your internal table or you will use field symbol to transfer data to your itab dynamically.
After that you can use WS_DOWNLOAD function with colselect mask to download specific columns if required.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = p_file
FILETYPE = 'DAT'
COL_SELECT = 'X'
COL_SELECTMASK = 'X XXX XXX X'.
TABLES
DATA_TAB = IT_DATATAB.
later u can use function module WS_EXECUTE to open it with EXCEL
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
COMMANDLINE = "C:\TEST FILE.XLS"
PROGRAM = EXCEL.
Hope this will solve your purpose.
regards,
Satya
Add a comment