Skip to Content

PI AlertConsumerJobV2 - add filename (SFTP Adapter)

Hello,

In SFTP scenario i would like to add filename into AlertConsumerJobV2 template.

I don't know if it's possible, but thanks in advance.

Regards,
Youri

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

8 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 20, 2016 at 12:12 PM

    Hi Youri,

    Then make sure Sender Component, Receiver Component, Interface and Namespace are same in the message header and in the filter configuration.

    Message Header you can find it in Message Monitor select the message and click on Open Message

    Regards,

    Praveen.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 19, 2016 at 02:54 PM

    Hi Youri,

    You can create FileName as UDS attribute then you can include it in the CBMA alerts, you can find below blog for more details.

    Enhancing CBMA Alerts and Message Monitoring with UDS Attributes

    Regards,

    Praveen.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 19, 2016 at 03:28 PM

    A concrete example: The adapter refuse the file : XML Validation Error (we use Validation by Adapter).

    Alert :
    The alert contains the following information:
    Err Category: XML_VALIDATION
    Err Code: XML_VALIDATION_ERROR
    Err Label: 1300
    Err Text: com.sap.aii.utilxi.xmlvalidation.impl.XMLValidationException: XML Validation for payload with root element name si_o_a_FC_CUSTACCDOC , target namespace http://xxxx.be/v01/AR Failed!Errors Encountered During Parsing
    1.cvc-complex-type.2.4.d: Invalid content was found starting with element 'test'. No child element is expected at this point.

    In PIMON Communication Channel Monitoring I can see the filename :
    Sending of file AR_XXXXXXXXX.xml failed.

    If I can also see this information (filename) in Alert mail it's perfect.

    Thanks,
    Youri

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 19, 2016 at 03:39 PM

    Hi Youri,

    You can create a search criteria using dynamic header option like below.

    Regards,

    Praveen.

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks for your help, but it doesn't work ...

      In my UDS I think it's Ok, I used your settings.
      In my Communication Channel (SFTP adapter) sender and receiver :
      - ASMA = Checked
      - Namespace = http://sap.com/xi/XI/System/File
      - File name box = Checked

      In Message Monitoring I can use my UDS Criteria but always : "No messages available for selected filter criteria"

      Thanks,
      Youri

  • avatar image
    Former Member
    Oct 20, 2016 at 10:59 AM

    Hi Youri,

    After you created the filters UDS attributes are stored only for new messages not already processed messages before you create the filters.

    If you want to see for already processed messages before creating the filters you need to run indexing options like below, after run this you can be able to see the UDS attributes in the message monitor.

    Regards,

    Praveen.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2016 at 11:48 AM

    Can you try with namespace-

    http://sap.com/xi/XI/System/SFTP

    I doubt the one being is used in UDS is for File adapter.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2016 at 12:20 PM

    Hi Youri,

    I have tested for SFTP sender with same configuration it is working for me.

    Regards,

    Praveen.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2016 at 01:33 PM

    Thanks Praveen for your help.
    Now I can see "User-Defined Attributes" and the filename value in Message Monitor.

    But =) in my scenario I use Validation by Adapter in Inbound Processing, in this case no message are created but I receive an alert with the error text :
    The alert contains the following information:
    Err Category: XML_VALIDATION
    Err Code: XML_VALIDATION_ERROR
    Err Label: 1300
    Err Text: com.sap.aii.utilxi.xmlvalidation.impl.XMLValidationException: XML Validation for payload with root element name si_o_a_FC_CUSTACCDOC , target namespace http://www.fedcom.be/v01/AR Failed!Errors Encountered During Parsing 1.cvc-complex-type.2.4.d: Invalid content was found starting with element 'test'. No child element is expected at this point.

    I want to see the filename in this Alert.
    I use AlertConsumerJobV2, I can edit the template if it's necessary.

    But with AlertConsumerJob (not V2) I don't see "UDSAttrs": { ... }

    Thanks,
    Youri

    Add comment
    10|10000 characters needed characters exceeded