09-14-2008 11:27 AM
HI All,
I want to download data from 3 internal tables into a single Text file on presentation Server .
I knew about the GUI_download function module with Appending options but my problem is that i want to distinguish 3 types of data present in my 3 internal tables
My 3 internal table contains following type of data
1st Internal table : Production schedule data
2nd Internal Table: Material Master Data
3rd Internal Table: Bom Data
So i want some description between the 3 types of data downloaded to single file
Like:
01 Production Schedule
( Then production Schedule data)
02 Material Master
( Then Material Master Data)
03 Bom data
( Then Bom data)
Please help me out
Thanks
09-14-2008 11:39 AM
Hi Gaurav,
from your posting I don't know which type of output file are you filling.
But let's guess it is simple text file.
Just create one new internal table of type string into which pull your comments and then again with addition option put this data into file.
Regards,
Karol
09-14-2008 11:35 AM
Before downloading the tables insert the descriptions as 1st record in the tables.
09-14-2008 11:39 AM
Hi Gaurav,
from your posting I don't know which type of output file are you filling.
But let's guess it is simple text file.
Just create one new internal table of type string into which pull your comments and then again with addition option put this data into file.
Regards,
Karol
09-14-2008 4:08 PM
Thanks for your reply
I got your idea of making a new internal table having "Identifier" and " Description"
But how can i add these 2 values into the text file
Means how to add
01 production schedule
then data of 1 internal table
02 Material Master
then data of 2nd internal table
03 Bom data
Then data of 3rd internal table
Please reply me
Thanks
09-16-2008 6:42 PM
Hi Gaurav,
what exactly is the problem. I would say that now everything is clear. The code should be similar to this one just do corrections depending on your table names.
In first saving use append = '' in other savings append = 'X'
data: it_comments type table of string.
data: wa_comments type string.
wa_comments = '01 production schedule'.
append wa_comments to it_comments.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = file
FILETYPE = 'ASC'
APPEND = ''
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = it_comments.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = file
FILETYPE = 'ASC'
APPEND = 'X'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = it_tab1.
refresh it_comments.
wa_comments = '02 Material Master'.
append wa_comments to it_comments.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = file
FILETYPE = 'ASC'
APPEND = 'X'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = it_comments.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = file
FILETYPE = 'ASC'
APPEND = 'X'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = it_tab2.
refresh it_comments.
wa_comments = '03 Bom data'.
append wa_comments to it_comments.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = file
FILETYPE = 'ASC'
APPEND = 'X'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = it_comments.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = file
FILETYPE = 'ASC'
APPEND = 'X'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = it_tab3.
I hope you can finish your task now.
Regards,
Karol
09-20-2008 6:53 PM
Hi karol
Thanks for your help
I have implemented your code
and it works
Thanks
Thanks all of you
09-14-2008 5:16 PM
hi Gaurav,
Try in this manner.
Take one final Internal table which having String as an field in it.
Then pass First internal table to Final internal Table, After that pass the Description. Similarly you pass the second internal table data and third internal table data. I hope this will solve ur problem.....
09-15-2008 1:32 PM
Thanks for your reply
But can u plz give me the code how to do it
thanks