Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Database Download

Former Member
0 Likes
421

Hi,

I wanted to download all the data from database table to file with field name.

Anybody will suggest me the code.

Hi,

I wanted to download all the data from database table to file with field name.

Anybody will suggest me the code.

3 REPLIES 3
Read only

Former Member
0 Likes
408

Hi neha,

Use Extract the data into some internal table with all the required fields then use GUI_DOWNLOAD Function module if u want to download into presentation server , if u want to download in appl server then use open dataset, transfer and close dataset.

Regards,

Shafi

Read only

Former Member
0 Likes
408

hi

i given this syntax check this

OPEN DATASET [DATASET NAME] FOR [OUTPUT / INPUT / APPENDING]

IN [BINARY / TEXT] MODE

AT POSITION [POSITION]

MESSAGE [FIELD]

READ DATASET [DATASET NAME] INTO [FIELD]

DELETE DATASET [DATASET NAME]

CLOSE DATASET [DATASET NAME]

TRANSFER [FIELD] TO [DATASET NAME]

regards

praveen

Read only

Former Member
0 Likes
408

Hai,

Follow these steps:

<b>Step 1:</b>First declare an internal table of Database table type like:

Data:

begin of itab occurs 0.

include structure database_tabe_name.

data:

end of itab.

<b>Step2:</b>

Write a select query to retrive all dbtable data into otab.

Select *

from db_table

into table itab.

<b>Step 3:</b>

Call FM GUI_DOWNLOAD by passing itab and mensioning the FILE PATH and FILE NAME.

Hope now you can get all the data into your file.

<b>Reward points if it helps you.</b>

Regds,

Rama chary.Pammi