09-10-2008 12:51 PM
Hi All
I have got a requirement, where I have data in defferent internal tables.
one table for File Header Segment
second table for Data Header Segment
third table for Data Item Segment
fourth table for File Trailer Segment
Now I want to download all the data onto one .DAT file with data of one segment should be on one line, and there should be linefeed, and data of second table should come on second line.
I tried using GUI_Download but in that we can use only one internal table, Does any body know where we can download data from different tables into one file.
Thanks in advance for your help..
cheer
AJ
09-10-2008 12:57 PM
Hi AJ,
I think you can use the same FM to APPEND the records from different internal tables to the same file. There is an importing parameter (APPEND) that would allow you to append data to the same file.
Best Regards,
Ram.
Edited by: ram Kumar on Sep 10, 2008 1:57 PM
09-10-2008 12:58 PM
Hi,
In GUI_UPLOAD Fm theer is one parameter called APPEND.
Pass 'X' to this from second table onwards. It appends to the same file.
so For first table this APPEND parameter should be space, For second, third and fourth tables set this parameter to 'X'.
Instead of calling this FM 4 times u can put it in PERFORM.
eg:
PERFORM download USING 'X' itab1.
PERFORM download USING space itab2.
PERFORM download USING space itab3.
PERFORM download USING space itab4.
FORM download USING append_flag TABLES itab.
CALL FM GUI_DOWNLOAD.
"In append parameter pass append_flag, in tables pass itab.
ENDFORM.
Hope it solves ur problem.
Thanks,
Vinod.
09-10-2008 2:42 PM
Hi Vinod
How should I define itab as. because right now it gives the error message itab not defined, thing is in form...endform.....itab have different values.
so how can we define itab as???????
09-10-2008 3:17 PM
Hi,
In which version of SAP u r in. I am in 4.6C. I am using below statements. Its not giving any errors.
DATA: itab1 TYPE STANDARD TABLE OF mara,
itab2 TYPE STANDARD TABLE OF marc.
PERFORM download TABLES: itab1,
itab2.
FORM download TABLES itab.
ENDFORM.
If it doesn't work then u may have to call FM for 4 times or pass 4 tables parameters and apply the logic.
Thanks,
Vinod.
09-10-2008 3:24 PM
FORM DOWNLOAD USING FILEPATH APPEND_FLAG
CHANGING value(ITAB) TYPE TABLE .
ENDFORM.
IT WORKS IN THIS WAY........ACTUALLY i AM USING ECC5.
THANKS EVERYBODY FOR YOUR HELP