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

Create Sequential Numbering in Message Mapping

We are using XI 3.0 with R/3 Enterprise.

I am working on a scenario:

Webapp to xi to R/3 to xi to webapp to xi to R/3.

Basically, users log onto web site, request invoice details from R/3, dispaly invoice in webapp, pay amount and post receipt into R/3!

As we are posting an accounting document we have to pass accross the accounting document number.

I have tried the following to generate a number for the externally assigned number:

Constant: 9800000000 and A Counter starting from one( with increments of one) add together and map into obj_key field on accounting document header. When I test the mapping, I get the following:

Debug:Start tag [OBJ_KEY]

Debug:Put value [9.7999995E9]

Debug:Close tag [OBJ_KEY]

Is there an easier way to assign a sequential/incremental number into mapping??

Regards.

Barry Neaves

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Oct 13, 2005 at 09:00 AM

    Hi Barry,

    have you tried the standard parrtern?

    <b>Mapping “Patterns” – Sequence–Number Generation</b>

    from:

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/mapping functionality in xi.pdf

    Regards,

    michal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2005 at 09:28 AM

    I have implemented a simple function in one of my mappings to generate sequqnce nos. Modify the code according to your requirement

    //write your code here

    GlobalContainer globalContainer;

    globalContainer = container.getGlobalContainer();

    Integer count;

    Object obj =globalContainer.getParameter("Count");

    if (obj==null) count =new Integer(0);

    else count = (Integer)obj;

    count=new Integer(count.intValue()+1);

    String szero="";

    String str=count.toString();

    for(int i=0;i<5-str.length();i++)

    szero=szero.concat("0");

    str=szero.concat(str);

    globalContainer.setParameter("Count",count);

    return str;

    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.