Skip to Content

Custom alert for empty file and Mapping failure

Hi All,

System: SAP PO 7.4 single stack, Third party SFTP server

Third party system sends flat file with multiple rows and some time they send file without data (but with header line), I need to trigger an alert with custom message when file doesn't have rows(but with only header) , saying " No data found in file" also need to trigger an generic alert in case of mapping failure due to any reason.

Please let me know how to achive this also share the UDF which need to be written in Mapping.

Regards,

Mani

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Sep 30, 2015 at 08:25 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 30, 2015 at 09:26 AM

    Hi Mani,

    Hope you have defined the condition to check whether row exist or not in root segment of line item.

    Handling alerts for  mapping issues, you can try with alert API's sends error information va mail adapter.

    plz check the link for detailed steps to proceed: Customize E-Mail Body and Subject in Alerts in SAP PI 7.31 – Java Stack Only – Part 1 – ESR

    but while process huge data which contains multiple headers followed with line items, the above option causes performance issues.

    Regards,prasanth

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 30, 2015 at 09:33 AM

    Hi Manikandan,

    In receiver determination, use an xpath to check the existence of ROWS. Then under the No Receiver Found Behavior choose ignore. That way, the file will stop processing at the receiver determination step and will not persist in the integration server as a mapping error. Using this method removes the alerting part 😊

    Regards,

    Mark

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 30, 2015 at 09:58 AM

    Hi Mani,

    Use Component-Based Alert Monitoring to send the custom alerts.

    Use small UDF to identify the data is exit or not ,if data is not there sends the alerts saying that  field is empty

    UDF

    If (var1.equals(""))

    {

    throw new  RuntimeException("Field is empty") ;

    }

    else

    return var1;

    Regards,

    AshokR

    Add comment
    10|10000 characters needed characters exceeded