Skip to Content
author's profile photo Former Member
Former Member

xml file

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...

thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2008 at 01:06 PM

    Hi,

    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.

    regards,

    amit m.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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..

      thanks

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2008 at 01:23 PM

    Hi,

    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.

    SKIP 4.

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

    COLOR COL_NEGATIVE.

    EXIT.

    ENDIF.

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.