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

xml file

Former Member
0 Kudos

Hi All,

my requirement is to download the xml from the application server (specific directory) and create sales order and after creation i have to upload the sales order data with some other information in the same place in xml format. this process should done automatically..

now how the system knows when the xml file is kept in the application server directory.

is there any method, function module or some thing to identify the file imd after it has been kept in that directory ?

can any one give me some idea on this process...



Former Member
0 Kudos


1. I don't think there is any direct way (eg. event etc)

provided by sap, so that we can know if some file

has been put on the application server.

2. That file will be put on server (by some other server)

using ftp, at the OS level, so SAP will not come

to know that a file has been put.

3. So, in such case, our program has to run in background,

scanning if there is some new file (based upon some naming convention and time etc). If file is found, then it can process the data.


amit m.

0 Kudos

hi amit,

thanks for ur reply....

hw do we scan on the file names because diff customers will send files with diff names in diff times..

so if v execute program in background for every 1 hr for example,

what abt the performance.. ?

is this the right way ?

can u explain me in detail..

it will be helpful if u provide any relevant code also if possible..


Former Member
0 Kudos


if I understand your need, the file lives in trans. AL11. If this is correct, you must work with OPEN DATASET like this:

OPEN DATASET '/usr/sap/TDO/EXT/trans/data/in/FILE.XML' IN TEXT MODE.

IF sy-subrc NE 0.


WRITE:/10 'Error in file ! Not possible to open file !'




you can know in that way, whether the file exists.