2007 Mar 22 9:10 AM
Hi Experts,
I am having a problem to download data from different DB to different flat file. Hope you guys able to provide the details code based on the following situtation. Appreciate your help. Thanks!
Eg:
- I required to download the below data from different table to 3 different flat file based on the selection parameters. Let said based on the Date_join.
<u>Table 1 - Table Name: Course Record</u>
StudentNo
S_Course
<u>Table 2- Table Name: Student Details </u>
StudentNo
S_Add
S_aAge
<u>Table 3- Table Name: Student_results</u>
StudentNo
S_Mark
S_Subject
2007 Mar 22 9:39 AM
Hi Take the 3 tables data into 3 different internal tables.
Then call GUI_DOWNLOAD 3 times each time passing different internal table and different file names....
reward if helpful...
Hi Experts,
I am having a problem to download data from different DB to different flat file. Hope you guys able to provide the details code based on the following situtation. Appreciate your help. Thanks!
Eg:
- I required to download the below data from different table to 3 different flat file based on the selection parameters. Let said based on the Date_join.
<u>Table 1 - Table Name: Course Record</u>
StudentNo
S_Course
<u>Table 2- Table Name: Student Details </u>
StudentNo
S_Add
S_aAge
<u>Table 3- Table Name: Student_results</u>
StudentNo
S_Mark
S_Subject
2007 Mar 22 9:39 AM
Hi Take the 3 tables data into 3 different internal tables.
Then call GUI_DOWNLOAD 3 times each time passing different internal table and different file names....
reward if helpful...
2007 Mar 22 9:54 AM
Hi,
Could you provide sample code to extract data (based on my example table) to internal table which data have to get from 3 different DB.
Hope you can help. Thanks:-D
2007 Mar 22 9:51 AM
Hi,
DATA : BEGIN OF I_DISPLAY OCCURS 0,
REC(400),
END OF I_DISPLAY.
based on date
select StudentNo S_Course from Course Record
into i_Course Record
****if parameter
where date eq p_Date_join
****if select-options.
where date in s_Date_join.
-
select StudentNo S_Course from Student Details
into i_Student Details
****if parameter
where date eq p_Date_join
****if select-options.
where date in s_Date_join.
-
select StudentNo S_Mark S_Subject
from Student_results
into i_Student_results
****if parameter
where date eq p_Date_join
****if select-options.
where date in s_Date_join.
*********************************
DATA : FNAME(255) TYPE C VALUE '/data/sapdata/eu_ums/astdetails'.
CONSTANTS : C_COMMA TYPE C VALUE ','.
********Fields to insert
I_FINAL-StudentNo = 'StudentNo.
I_FINAL-S_Course = 'S_Course'.
*
INSERT I_FINAL INDEX 1.
CLEAR I_FINAL.
*
LOOP AT I_FINAL.
CONCATENATE
I_FINAL-DOCNUM
I_FINAL-STATXT
into I_DISPLAY-REC SEPARATED BY C_COMMA.
APPEND I_DISPLAY.
CLEAR I_DISPLAY.
ENDLOOP.
OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE.
LOOP AT I_DISPLAY.
TRANSFER I_DISPLAY TO FNAME.
ENDLOOP.
CLOSE DATASET FNAME.
Do this for all tables.
Don't forget to reward if useful
2007 Mar 22 10:20 AM
Hi,
Can provide the sample how to download the data to Presentation server which enable user to browse the directory location based on muralikrishna kaipha coding.
Thanks.
2007 Mar 22 10:22 AM
Hi,
Above mensioned code is example code.Based on that change your code.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |