cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc-XML file write concern (no middleware)

Former Member
0 Kudos

Hi All,

We have a R3 server that will output an IDoc-XML which will be written into a path in AL11.

Then, there will be an ABAP program that will pick up the file from the path in AL11 and push it to the FTP server.

The concern is that the FTP program will pick up the file that are in the midst of creation and sent to FTP server.

Is there any SAP FM or user exits that we can use to write the IDoc-XML file into a temporary file (e.g ~temp.xml) and rename it to the original filename upon finish creating the file in the path? Or it has been handled by the standard SAP code itself.

Note: There is no middleware involved.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi All,

Thank you for the suggestions.

The outcome is:

a) If use Open Dataset, then it is better to schedule the next job as a dependent to the current create file job.

b) If use the SAP standard way, there is no concern as the file will only be visible in the directory if it is fully created.

Cheers,

Han Yean

Former Member
0 Kudos

Hi,

You can alternatively use SM69 (Assign External Commands OS) where you can use a unix script to check whether the file is written and rename the file where the FTP will pick up)

Or

Simply whenever your idoc-xml is run, give 3-4 minutes and schedule this unix command to just simply rename the file where the FTP program will come and pick up which will be always complete.

Regards

Krish

Former Member
0 Kudos
former_member181985
Active Contributor
0 Kudos

To get better answers you should post this in ABAP forum.

prasanthi_chavala
Active Contributor
0 Kudos

Why dont you create dependency of job2 (program which pushes idoc xml file to FTP server) on job1 (program which creates idoc xml file).

So once the job1 is completed then your job2 will be executed so that it will not pick partial files.

Thanks,

Prasanthi.

Former Member
0 Kudos

Hi,

In help of transaction WE21, you have some info about FM but it's mainly to manage dynamically the filename : [sap help|http://help.sap.com/saphelp_erp60_sp/helpdata/EN/dc/6b7f5643d711d1893e0000e8323c4f/frameset.htm]

I don't see something about your exact question: temp file.

Note: you can do a test with WE19 and a big big Idoc to see if file is available when the file creation is complete (only) or not.

regards.

mickael