Hi,
In my scenario PI has to split the file based on the delivery number ranges and send it to respective systems. Currently I have a requirement where I need to send the file to all the four receiver SAP systems if the delivery number ranges fall outside or if there is no delivery number previously it sends based on the delivery number.
what would be the best way to send based on the above condition.
Below is my message Mapping:
UDF used in Message Mapping for enhanced receivers:
public void Iterator(String[] Lower, String[] Higher, String[] VBELN, ResultList result, Container container) throws StreamTransformationException{
int i=0;
int j=0;
int k=0;
for ( i=0; i<VBELN.length;i++)
{
if ( Long.parseLong(VBELN[i]) >= Long.parseLong(Lower [j] ) &&
Long.parseLong(VBELN[i]) <= Long.parseLong(Higher [k]) )
{
result.addValue("true");
break;
}
}
if( VBELN.length == i)
{
result.addValue("false");
}
return;
UDF used in Message mapping for File to IDoc:
public void Item_Iterator(String[] VBELN, String[] Input, ResultList result, Container container) throws StreamTransformationException{
for (int i=0; i<VBELN.length;i++)
{
if (Long.parseLong(VBELN[i]) >= 80000000 &&
Long.parseLong(VBELN[i]) <= 83999999 )
{
result.addValue(Input[i]);
}
}
return;