Split the value from one input field using space and store in context, then return it. Using copyvalue standard function pick the index value to return to two fields
Groovy script:
import com.sap.it.api.mapping.*;
def void substring_value(String[] CC, Output output, MappingContext context)
{
String[] list = CC[0].split(" ");
if (list.length > 0)
{
for (int j = 0; j < list.length; j++)
{
output.addValue(list[j]);
} }
}
} }
}
Input: Ravi Krishna
Output : first field - Ravi
second field - Krishna
No comments:
Post a Comment