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

Directory for archiving files with errors

HI ,

My Scenario is file to RFC Asynch.

when ever the PI picks file from the source directory that file need to delete from the path and need to be archived to some other patch.

And if the file has wrong data it need to archive to error archive folder.

For this I used Archive processing in filesender adapter and I also used directory for archiving files with errors(for wrong data files).

Now the files are arching successfully in the given archive folder for successful messages. But the error files (wrong data which are throwing mapping error in MONI) are also archiving in the same archive folder.

But these error files need to archive in error archive folder.

How can I achieve this?

Thanks in Adv..

Vankadoath.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2011 at 01:04 PM

    Hi,

    We have only one archive parameter in sender file adapter. By using that you can archive one type of files it coud be either error files or picked files. Do one thing use adapeter archive parameter for archiving fetched files and use UDF for archiving errored files.

    Regards,

    Raju

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2011 at 01:07 PM

    Hi once files have picked up by the channel and transfered to intregartion engine then it will be archived into success folder only.

    Because error is in IE means Mapping not in adapter level

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI Debashish,

      Thanks for your reply.

      i understand that the files will not archived which are failed due to the reasons of mapping errors or others.

      Because error is in IE means Mapping not in adapter level.

      Files which are not picked by the adapeters are sucessfully moved to error archive folder. its working great. but i need to move the files which are mapping errors files to error archive folder.

      Is there any way to pick those files (Mapping error fies) from the success archive folder and again move to the error archive folder.

      how to approach this requirement. Thanks

      Vankadoath

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2011 at 01:09 PM

    Hi Vankadoath

    That option is used in case file adapter throws errors while procesithat file (content conversion or module processing).

    It's not used to archive messages in error during mapping.

    What kind of errors are your wrong data files throwing?

    Regards,

    Giuseppe

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2011 at 01:17 PM

    HI Vankadoath,

    IF the file has been picked up it means it not errored file so it is not possible to put file in a diff archive directory .

    However you can put a check like that if the file is not picked for 1 min or 2 min then it can be archived in some other directory say Error Archive directory . IF suppose a file with wrong name/wrong source format came which you adapter is not able to pick so you can write a script that if file is not picked by adapter in 2 min then put it to a Error archive directory. That script can be called in OS command of sender communication channel .

    Regards,

    Saurabh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 20, 2011 at 05:52 PM

    HI Vankadoath,

    In your file adapter you would be able to pick the file and archive those ...Also you can archive the files into Archive directory though the file is successful or failure...

    If you need to Archive the error files into a separate folder then you need to handle it in mapping....

    Thanks and Regards,

    Naveen.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Raja Sekhar Reddy

      you can use raja's logic ..........in addition in second receiver do a simple mapping UDF to delete the file from the SUCCESS folder. otherwise your file will be archived in both the folder success and errror

      see this code.

      DynamicConfiguration conf = (DynamicConfiguration) para.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
      			
      			DynamicConfigurationKey keyFileName1 = DynamicConfigurationKey
      			.create("http://sap.com/xi/XI/System/File", "FileName");
      	                inputFileName = conf.get(keyFileName1); 
      
        *File f1 = new File("/usr/sap/XX/"+keyFileName1);*
        *boolean success = f1.delete();*
        *if (!success){*
        *System.out.println("Deletion failed.");*
        *System.exit(0);*
        *}else{*
        *System.out.println("File deleted.");*
          *}*
        *}*

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2011 at 05:42 AM

    Hi Vankadoath,

    For Mapping errors, the files will not be archieved in the Directory for Archiving Files with Errors.

    It only archived either during the conversion of the file content, or in a module in the module processor.

    Ref: http://help.sap.com/saphelp_nwpi711/helpdata/en/44/655453b48a4ddfe10000000a1553f7/content.htm

    If you would like to view that files that got failed, then select the option Add Timestamp for the archive folder, so that when the message fails then you can get the file using the timestamp.

    Thanks,

    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.