Blog Archive

Thursday, April 6, 2017

SAP PI udf && frequently used java api && skip suppress and null and context separation



Add suppress
remove context seperation including null;

checking context separation and supress and null in array.

Example: helps 
add suppress
remove suppress
( also validation of context separation and null empty )

Remove Leading zeros in string in HCI


//Add MappingContext as an additional argument to read or set Headers and properties.
def String removeLeadingZero(String inputValue){
    if(inputValue != null && inputValue.length() > 0){  
    char[] inputValueChars = inputValue.toCharArray();
    int index = 0;

    for (; index < inputValue.length(); index++)
        if (inputValueChars [index] != '0'){
        return (index == 0) ? inputValue:inputValue.substring(index);
    return null;

No comments:

Post a Comment