Skip to Content
author's profile photo Former Member
Former Member

XI Message Mapping - Padding

Hello everyone,

I have both text and number coming in the same field from SAP to XI.

If the field content is Number, I need to pad it with zeros.

If the field content is characters, I just need to leave it like that.

How do I determine if the field content is numeric or not. In XI, that field is defined as 'string' in the Data Type.


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 29, 2008 at 09:56 PM


    Try this.

    Import java.math.*;

    try {

    new BigDecimal(number);

    while (number.length() < 18){

    number = "0"+ number;



    catch (NumberFormatException ex)



    return number;


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.