cancel
Showing results for 
Search instead for 
Did you mean: 

check for source file

Former Member
0 Kudos

Hi,

My requirement is as below:

In source FTP directory, I have to check if source file exists or not. If exists, that file shuld be picked up and created at target side with header, line items and detail record.

If the file does not exist, then a file should be created at target side with only header and detail record with no line item records.

In any case, a file should be created at target side.

Please suggest if Dynamic configuration is the better option for this or any other way gives better results.

Thanks and Regards,

Anil.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please select process empty files in source CC.

Now when the file is not present, u will get only the empty tags..(message type name in XML Payload)

Check the condition in the mapping if only the message type name is coming.. if so create only the header and detail record.

else u can map to all hearer, detail, line items.

Let us know still if u face any prblm....

Babu

Former Member
0 Kudos

@ Babu

Please select process empty files in source CC.

Now when the file is not present, u will get only the empty tags..(message type name in XML Payload)

This option will process "empty files" which are already created in the source directory and they are empty. This option won't "create" an empty file. Please check the SAP Help for further details.

-- Abhi

Former Member
0 Kudos

Dear Abhi,

Please read these carefully...

The query is like...

If the file does not exist, then a file should be created at target side with only header and detail record with no line item records.

In any case, a file should be created at target side.

so i answered as,

Now when the file is not present, u will get only the empty tags..(message type name in XML Payload)

u said as,

This option won't "create" an empty file.

Correct me if i am wrong, DID I SAY IT WILL CREATE an EMPTY FILE IN SOURCE FOLDER???

Babu

Edited by: hlbabu123 on Aug 11, 2010 11:24 AM

Former Member
0 Kudos

@ Babu,

The query is like...

If the file does not exist, then a file should be created at target side with only header and detail record with no line item records.

In any case, a file should be created at target side.

so i answered as,

Now when the file is not present, u will get only the empty tags..(message type name in XML Payload)

If you read the question carefully, it is not being asked "how to handle empty files". It is about "what to do if there are no files in the source directory", which implies that if there are no files present, then create one.

u said as,

This option won't "create" an empty file.

Correct me if i am wrong, DID I SAY IT WILL CREATE an EMPTY FILE IN SOURCE FOLDER???

No, you don't need to say that .. it was evident from your answer. In this forum post, nothing is being asked regarding empty files, so please don't provide such answers which has nothing to do in this situation.

-- Abhi

Answers (2)

Answers (2)

Former Member
0 Kudos

Do u want to create target file with header n detail records or only u wanted to create empty tag if file does not exist.

If ur file doesnot exist then process itself will not start by XI?

chirag

Former Member
0 Kudos

Satish (or Anil ?),

You can use script for this. You can't handle this situation by dynamic config.

Regards,

Neetesh