Skip to Content
avatar image
Former Member

XML Exceptions

Dear Experts,

I have to raise a message, when Sender Side XML message does not full fills mapping requirement.

Mean If sender message is faulty & it will give Mapping exception error,

so at that time, it should not will go for Exception error & will not pick file from FTP, directly it will send a message that "sender file is faulty".

How I can do this.

Regards,

Study SAP

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 28, 2009 at 02:59 PM

    Hi,

    Please check my reply in this thread for all the validations you can check:

    1-file-with-25k-records-or-25k-files

    Regards,

    ---Satish

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 28, 2009 at 06:55 PM

    Hi,

    Send all the fields to one UDF, in that UDF you have to handle all the errors, if all the inputs are valid map that UDF to first field in the target and send the corresponding value.

    For example

    if(cno.trim().length()==0) //Checking the mandatory field

    {

    isError2 = true;

    res = res+ " You have to enter the customer number and customer number should not be space also";

    }

    strValidChars = ".0123456789"; //Checking the decimal number is in correct format or not

    b = creditvalue;

    dotcounter = 0;

    for (i = 0; i < b.length(); i++)

    {

    strChar = b.charAt(i);

    if(strChar=='.') dotcounter++;

    }

    if(dotcounter>1)

    {

    isError2 = true;

    res = res + ",Credit Value Number format wrong";

    }

    if (isError1 || isError2)

    throw new RuntimeException("ERROR: "+res);

    else

    return cno;

    Regards

    Ramesh

    Add comment
    10|10000 characters needed characters exceeded