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

regarding background job schedulig

Former Member
0 Likes
345

i am using function module gyi_dwonload for downloading data but when i am executing it in background it is not creating any flat file

so is tehre any alternative of that where i can download the datd on my presentation server and that too by scheduling the program in back ground

i even tried open dat set but i am not pretty comfortable in that so dont know jow do go about it

after using when i am executing the program it is not doing any thing, will it create the file pn the application server or presentation server

any sample code or a simp,e prgram using it will do

thanks in advance

2 REPLIES 2
Read only

Former Member
0 Likes
326

Hello Ashish,

You can't use FM to download the data in background,there is no fm to download file in presentation server.

You have to use open dataset inorder to achive this functionality.

check the sample program :

parameters: d1 type localfile default

'/usr/sap/TST/SYS/Test.txt'.

data: begin of itab occurs 0,

field1(20) type c,

field2(20) type c,

field3(20) type c,

end of itab.

data: str type string.

constants: con_tab type x value '09'.

start-of-selection.

itab-field1 = 'ABC'.

itab-field2 = 'DEF'.

itab-field3 = 'GHI'.

append itab.

itab-field1 = '123'.

itab-field2 = '456'.

itab-field3 = '789'.

append itab.

open dataset d1 for output in text mode.

loop at itab.

translate itab using ' # '.

concatenate itab-field1 itab-field2 itab-field2

into str

separated by con_tab.

translate str using ' # '.

transfer str to d1.

endloop.

close dataset d1.

Thanks

Seshu

Read only

Former Member
0 Likes
326

thnx for ur help