Blog Archive

Sunday, April 30, 2017

problems of holding messages resending after couple of months


Have you resend holding messages after couple of months?
( which may not appear in summary page of pi monitoring)

Business might have sent again, these specific documents(whatever are there in holding messages) , which might be success through some other server node

What happens, if your business receive the duplicate messages ( some times control records are different)

is that application system, allows duplicates of specific document
( handling duplicate messages in application system process)
(SAP, database, web-service or java system, file system,.....) 
( have you discussed with your business owners on this information...)

Only specific SAP PI server node restart? why? or full


1. Some times , holding messages are not able to cancel, after reset sequence(cancel first holding message , reset sequence and re sending next automatically)   also
( how to identify, first holding messages of same message type, on different server nodes ), we are supposed to reset sequence, all first holding messages based on time stamp( search result last to till year,holding messages of same message type) based on number server nodes, to process all holding messages ).?

Finally , Need to bring these messages in system error state. or any( like stopping receiver communication channel and restart few min later)?

restart only sap pi , message specific server-node ?

some of my colleagues are doing the same processes , when they are working with sftp( seeburger) adapter. ( it shows delivery only after getting notification from sftp system) if no. it is in still holding.
( they did not get proper response from sap and see-burger product support teams also, ).
( they used to say: upgrade next version, thread count increase, ... , did not work this time);

How to identify : how many server nodes,? for SAP PI? Why?
finding server node for holding messages?
relation between server node and cluster?
threads count? how it is related sap pi components ? 
when do we increase thread count? why? where?
answers will be soon?

Please provide your comments also.

Friday, April 28, 2017

Invalid mapping design example

I came across, to monitor inbound idoc, which was not posted in SAP tables,
After monitoring idoc status record's, I understood, this was due idoc control records missed values
Then I have verified success idoc, which has valid idoc control records for same inbound idocs
Again , verified idoc recover channel, if control records are fetched from mapping or channel?
Both the cases, it is channel

Solution: will be provided next day

solution: there are two line segments are created, 
        case 1: valid case, which has all line items;
         case 2: invalid line items; not all line items are  created.
                         ( due to this meta is not properly loaded for this case, that's why, control records are not appeared in inbound idoc)

Please let me know if you have any other comments.

Reset sequence in sap pi monitoring


To clear holding messages, this option will be useful

Let assume, we have found 3 holding messages in last week, we could not cancel. Not possible to cancel due to preceding message

( this means, these messages are enabled eoio messages)

Solution: find all holding messages for last couple of months

Check by date, find old one, ( download message  for safe, if any problem, we need to resend), choose reset sequence, to cancel present message stating fresh sequence again for next message and resend automatically

Thus, this option will be useful

Idoc package in sender idoc problems

Some times, idoc are generated without line items, this might not be mandatory at ecc levels, but it is mandatory at SAP pi mapping level

Due to package of multiple idocs, using sender idoc adapter, if any idoc with no line item, the entire message will be failed, which may have valid idocs also.

Using note pad plus, search option , need to find incorrect idoc , remove this , resend from either xi / ecc

I need to write more information on this

Holdings messages are not visible in summary monitoring sap pi support monitoring

In support project, we are supposed to monitor error messages,
    In pimon, summary monitor shows quick view all , error, schedule, success with sort ascending and descending options

By default, these are not visible, place mouse cursor , click, you can view, also scroll down and up options helps to monitor messages

For, holding messages, we need to go database, advanced option, 1st option of filter, choose, holding, for one day, week, month, year

As conclusion, monitor both, error message and holding messages

Dealing with holding message in SAP PI: ( EOIO case)


why do see holding messages in SAP PI?

check if these are with EOIO messages
( how:  ico-> receiver interfaces - operation mapping ( EOIO enabled or not for message splitting, multi mapping)

How to monitor holding messages in SAP PI?

1. first if any error messages or not
2. monitor holding messages for yesterday, last week. last month;
( but not from, just now to last....), having holding messages at present might be there.

How to clear the holding holding message.
(if you identify any holding message in this week)
now put filter for last year or more
( find the messages related to this holding messages) -> filter
select option last ( old hold message ) -> apply restart sequence ( if cancel is not worked)

( this will create , sequence again, to skip old message to start eoio message again).
thus we can clear the holding messagesa are due to EOIO messages in SAP PI single stack.

Tuesday, April 11, 2017

adjusting eclipse console output size also in NWDS


In one of my java program, I was trying to read a file, but i did not find certain output in console,

I have identified, I need to increase the console size

the steps are as follows

Monday, April 10, 2017

Using arrayList & io as workbench for your work around


simplify your work with java arraylist.

some rows in file

Scan all those (each row as entry in array list)
sort, check with another string, find index of any row

importance arralyList indexOf and String indexOf                  compare

ArrayList- -------    contains

Collections -------------;sort

String --------------------Trim

( all are explained with example) 

Example :
In this example, file1.txt ( certain entries) is java code reading this text file and placing all rows in arrayList.

Now, we can do various operations on this.
1. reading specific row
2. Update specific row with "rowcontent" if is in arrayList or not.
4.Sort the arrayList
5.Find the row number or Index Number of "row content"
6. comparision of String IndexOf and ArrayList indexOf
7.Arraylist contains

Another example : arrayList usage

Other userful operation with array list

 ArrayList obj = new ArrayList();

 /*This is how elements should be added to the array list*/

 /* Displaying array list elements */
 System.out.println("Currently the array list has following elements:"+obj);

 /*Add element at the given index*/
 obj.add(0, "Rahul");
 obj.add(1, "Justin");

 /*Remove elements from array list like this*/

 System.out.println("Current array list is:"+obj);

 /*Remove element from the given index*/

String array to ArrayList

ArrayList methods for use:

1) add( Object o): This method adds an object o to the arraylist.

This statement would add a string hello in the arraylist at last position.

2) add(int index, Object o): It adds the object o to the array list at the given index.

obj.add(2, "bye");
It will add the string bye to the 2nd index (3rd position as the array list starts with index 0) of array list.

3) remove(Object o): Removes the object o from the ArrayList.

This statement will remove the string “Chaitanya” from the ArrayList.

4) remove(int index): Removes element from a given index.

It would remove the element of index 3 (4th element of the list – List starts with o).

5) set(int index, Object o): Used for updating an element. It replaces the element present at the specified index with the object o.

obj.set(2, "Tom");
It would replace the 3rd element (index =2 is 3rd element) with the value Tom.

6) int indexOf(Object o): Gives the index of the object o. If the element is not found in the list then this method returns the value -1.

int pos = obj.indexOf("Tom");
This would give the index (position) of the string Tom in the list.

7) Object get(int index): It returns the object of list which is present at the specified index.

String str= obj.get(2);
Function get would return the string stored at 3rd position (index 2) and would be assigned to the string “str”. We have stored the returned value in string variable because in our example we have defined the ArrayList is of String type. If you are having integer array list then the returned value should be stored in an integer variable.

8) int size(): It gives the size of the ArrayList – Number of elements of the list.

int numberofitems = obj.size();
9) boolean contains(Object o): It checks whether the given object o is present in the array list if its there then it returns true else it returns false.

It would return true if the string “Steve” is present in the list else we would get false.

10) clear(): It is used for removing all the elements of the array list in one go. The below code will remove all the elements of ArrayList whose object is obj.


Array List methods;
T[] toArray(T[] a):Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array.
boolean add(E e):Appends the specified element to the end of this list.
boolean addAll(Collection c):Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's Iterator.
boolean addAll(int index, Collection c):Inserts all of the elements in the specified collection into this list, starting at the specified position.
boolean contains(Object o):Returns true if this list contains the specified element.
boolean isEmpty():Returns true if this list contains no elements.
boolean remove(Object o):Removes the first occurrence of the specified element from this list, if it is present.
boolean removeAll(Collection c):Removes from this list all of its elements that are contained in the specified collection.
boolean retainAll(Collection c):Retains only the elements in this list that are contained in the specified collection.
E get(int index):Returns the element at the specified position in this list.
E remove(int index):Removes the element at the specified position in this list.
E set(int index, E element):Replaces the element at the specified position in this list with the specified element.
int indexOf(Object o):Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.
int lastIndexOf(Object o):Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.
int size():Returns the number of elements in this list.
Iterator iterator():Returns an iterator over the elements in this list in proper sequence.
List subList(int fromIndex, int toIndex):Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
ListIterator listIterator():Returns a list iterator over the elements in this list (in proper sequence).
ListIterator listIterator(int index):Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list.
Object clone():Returns a shallow copy of this ArrayList instance.
Object[] toArray():Returns an array containing all of the elements in this list in proper sequence (from first to last element).
protected void removeRange(int fromIndex, int toIndex):Removes from this list all of the elements whose index is between fromIndex, inclusive, and toIndex, exclusive.
void add(int index, E element):Inserts the specified element at the specified position in this list.
void clear():Removes all of the elements from this list.
void ensureCapacity(int minCapacity):Increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.
void trimToSize():Trims the capacity of this ArrayList instance to be the list's current size.

String JAVA API : standard methods from API

Which returns as Integer:

Which returns boolean , used for conditino validation

String array;

Below example, helps how to put condition while reading file reader, placing in arraylist( whatever we required).
later we can print arrayList as we required.

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;