Skip to Content
0

PI AlertConsumerJobV2 - add filename (SFTP Adapter)

Oct 19, 2016 at 02:42 PM

266

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

8 Answers

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

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.


messageheader.png (21.8 kB)
filter.png (11.3 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 19, 2016 at 02:54 PM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Ok thanks, but in Search Criteria how to add filename ?
Filename is not available in my Xml structure.

Regards,
Youri

0
Youri Catinat Oct 19, 2016 at 03:28 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 19, 2016 at 03:39 PM
0

Hi Youri,

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

Regards,

Praveen.


Show 1 Share
10 |10000 characters needed characters left 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

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

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.


Show 1 Share
10 |10000 characters needed characters left characters exceeded

That's not the problem, i tried with new message.

0
Raghuraman S Oct 20, 2016 at 11:48 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 20, 2016 at 12:20 PM
0

Hi Youri,

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

Regards,

Praveen.


Share
10 |10000 characters needed characters left characters exceeded
Youri Catinat Oct 20, 2016 at 01:33 PM
0

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

Show 4 Share
10 |10000 characters needed characters left characters exceeded

SAP Note 2088606 helped me.

I try with [User Defined Data: $uds_attributes$] in template.
Waiting Basis team to upload my new template ...

0

I see the User-Defined Attributes in Message Monitoring but nothing in Alert Mail.

0
Former Member
Youri Catinat

Hi Youri,

Did you get the mail with user defined attributes?

Regards,

Praveen.

0

No but I think it's normal.

In my scenario I use Validation by Adapter in Inbound Processing, in this case no message are created in PI Monitoring, the message is rejected by Adapter.

0