Skip to Content

Receiver File Error while using Dynamic Configuration

Hi All,

My Scenario is from SAP IDOC --> PI --> FIle...

In the mapping i have used the dynamic variable substitution for the receiver file....

The Dyanamic file will be alwasy generated irrespective of the condition for the Mapping...

Now Whenever SAP sends IDOC then file to be created . If the condition is met then there is no problem the file is being created...

But if condition is not met then the error is being thrown in the Communication Channel...

Error occurred while connecting to the FTP server "10.1.999.222:21": java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure '' found in document', probably configuration error in file adapter (XML parser error)'

Note the payload has the dyanmic file generated....

And when i tested the mapping by coping the payload then

I am getting the target with empty ...but with MT_ProductMaster node...

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_ProductMaster xmlns:ns0="http://xyz/Ix_ProductMaster/WMS"></ns0:MT_ProductMaster>

and the error i think bcz of this payload ... but i dont have any option to remove this .... because if condition not met then the root node always will be created...

In CC File Content conversion i have given like this

Record setStructure FileHeader,FileDetail,FileTrailer

FileHeader.fieldSeparator |

FileHeader.endSeparator |'nl'

FileDetail.fieldSeparator |

FileDetail.endSeparator |'nl'

FileTrailer.fieldSeparator |

FileTrailer.endSeparator |

and my MT structure is

MT_ProductMaster 1.1

FileHeader 0...1

FileDetail 0....unbounded

FileTrailer 0...1

Please help me on how to ignore the empty root node... do i need to handle something else???

Regards,

Sridhar Reddy

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 05, 2009 at 01:32 AM

    Hey

    Please have a look at question number 31 of SAP Note 821267

    Thanks

    Aamir

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member sridhar reddy kondam

      Hey

      Record setStructure FileHeader,FileDetail,FileTrailer
      FileHeader.fieldSeparator |
      FileHeader.endSeparator |'nl'
      FileDetail.fieldSeparator |
      FileDetail.endSeparator |'nl'
      FileTrailer.fieldSeparator |
      FileTrailer.endSeparator |
      
      and my MT structure is
      MT_ProductMaster 1.1
      FileHeader 0...1
      FileDetail 0....unbounded
      FileTrailer 0...1
      

      of course you will get error in content conversion if file is missing any of the parameters expected by FCC.

      Right now the Content conversion is expecting several values in your payload(even if blank values) but you don't have any of them hence you get this error.

      If you want to deliver empty file,you need to map all the receiver side nodes to some default,so that it is populated to that default (could be blank) if no values are present,then when this comes to content conversion,it will assume the blank value as node and do correct conversion.

      If you dont have values in payload but have specified parameters for it on content conversion,then you will get errors as you mentioned in your first post.

      Thanks

      Aamir

  • Aug 04, 2009 at 11:14 AM

    instead of variable substitution use dynamic configuration - /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Shabarish,

      The error i am getting when i am using the Dynamic variable configuration itself...

      This error occurs only if there is no data...

      And when i checked the mapping by copying the generated payload, then the target payload has only root node...

      Did i missed any Content conversion Steps?

      Please can you check the structure i have given in the first reply....

      Regards,

      Sridhar

  • Aug 04, 2009 at 11:17 AM

    Hi Sridhar,

    Can you tell us what is the CONDITION that you are referring to?

    Is there some condition in your UDF ?

    And what is the purpose of using Dynamic Configuration in your case?

    Do you want Dynamic File Name or Dynamic Directory?

    Regards,

    Ravi Kanth Talagana

    Add comment
    10|10000 characters needed characters exceeded