Skip to Content
avatar image
Former Member

SAP PI SFTP messagetransformbean xml2plain

Hi all

In SFTP flow using messagetransformbean xml2plain how can we ignore to send a field value to sftp server.

My payload as below :

<?xml version="1.0" encoding="UTF-8" ?>
http://www.honda-eu.com/pi/fi">
<FinInvoRow>
<DN>040</DN>
<InvoiceNo>1234</InvoiceNo>
<VIN>4567</VIN>
<VatDate>30.08.17</VatDate>
<DueDate>23.09.17</DueDate>
<Amount>12345</Amount>
<ICO>12345</ICO>
<Type>C</Type>
<Model>2345343</Model>
<Motor>12093298</Motor>
<Colour>788P</Colour>
<OrderNo>1234-5</OrderNo>
<ICO2>123232</ICO2>
</FinInvoRow>
<FileName>AB2017083106</FileName>
</ns0:MT_FinInvoice>

In my content converstion i need to ignore to send Filename while generating the flat file using messagetransformbean

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Aug 31, 2017 at 06:03 PM
    Add comment
    10|10000 characters needed characters exceeded

  • Aug 31, 2017 at 05:59 PM
    Add comment
    10|10000 characters needed characters exceeded

  • Sep 01, 2017 at 06:07 AM

    Hi Lakshman,

    This module is not available in 7.1 system however you can try below approaches :

    • Remove that node in mapping itself.
    • Create a XSLT to remove that node deploy this XSLT in some PI OS level folder then call it via MTB . More info on this blog

    Br,

    Manoj

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 31, 2017 at 06:35 PM

    Hi Evgeniy Kolmakov / Manoj

    Thanks for your inputs.

    My requirement is that in the above xml need to converted as flat file and send to sftp server, FileName is populated in payload to set the file name from the payload. i need to remove this FileName while generating the flat file. i am using MTB but there i am getting error saying file name value is too long. but in MTB i am not using this field to send.

    31.08.2017 19:44:51.995 Error Transform: failed to execute the transformation: com.sap.aii.af.sdk.xi.adapter.trans.TransformException: Error converting Message: java.lang.Exception: Exception in XML Parser (format problem?):java.lang.Exception: Message processing failed in XML parser: java.lang.Exception: Column value AB2017083106 too long - must stop, probably configuration error in file adapter (XML parser error)'; nested exception caused by: java.lang.Exception: Exception in XML Parser (format problem?):java.lang.Exception: Message processing failed in XML parser: java.lang.Exception: Column value AB2017083106 too long - must stop, probably configuration error in file adapter (XML parser error)
    31.08.2017 19:44:52.009 Error The message status was set to NDLV.

    I tried this remove payload but i am getting below error :

    31.08.2017 20:20:59.332InformationMP: processing local module localejbs/AF_Modules/RemovePayloadValueBean31.08.2017 20:20:59.333ErrorMP: exception caught with cause com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of RemovePayloadValueBean.31.08.2017 20:20:59.333ErrorAdapter Framework caught exception: Object not found in lookup of RemovePayloadValueBean.31.08.2017 20:20:59.333ErrorDelivering the message to the application using connection SFTP_http://sap.com/xi/XI/SFTP failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of RemovePayloadValueBean..31.08.2017 20:20:59.339ErrorThe message status was set to NDLV.

    Please advice your input.

    Thanks in advance and have a nice day.

    -Lakshman

    Add comment
    10|10000 characters needed characters exceeded

    • FileName is populated in payload to set the file name from the payload

      I Believe you are using Dynamic Config , in case you are using variable substitution then note this approach doesn't work . As module execution takes place before Variable subs and the removepayload value will remove this node resulting error in your variable substitution.

      In case if you are using Dynamic config in mapping for this field then you are good to go with this approach.

  • Aug 31, 2017 at 08:00 PM

    Hi Lakshman!

    Try to set the module name exactly as "AF_Modules/RemovePayloadValueBean", without prefix "localejbs".

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 01, 2017 at 02:10 AM

    Hi Evgeniy

    I tried to set the module name exactly as "AF_Modules/RemovePayloadValueBean", without prefix "localejbs" but still same error. We are currently PI7.1 only.

    Module screen as below :

    01.09.2017 04:08:49.380InformationMP: processing local module localejbs/AF_Modules/RemovePayloadValueBean01.09.2017 04:08:49.381ErrorMP: exception caught with cause com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of RemovePayloadValueBean.

    01.09.2017 04:08:49.381ErrorAdapter Framework caught exception: Object not found in lookup of RemovePayloadValueBean.01.09.2017 04:08:49.381ErrorDelivering the message to the application using connection SFTP_http://sap.com/xi/XI/SFTP failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of RemovePayloadValueBean..01.09.2017 04:08:49.393ErrorThe message status was set to NDLV.

    -Lakshman

    Add comment
    10|10000 characters needed characters exceeded