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

Incrementing The constant

Hi,

I am mapping a field with a constant value and that value should be incremented sequentially wheen I execute it.Suppose I am mapping a field NO - with 20000 and for the next time when i execute the scenarion the value of the NO should be 20001 and so on....How could I acheive this.

Regards,

Vijaya Lakshmi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 22, 2008 at 11:57 AM

    hi,

    [creating-a-counter;

    chk the above thread.

    Siddhesh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 22, 2008 at 12:25 PM

    Hi Vijaya,

    Do like this,

    Create a Ztable in R/3 and initially store values 20000 and onwards in an internal table, Create a UDF in XI with RFC lookup functionality.

    Each time XI makes a lookup in R/3 system, increase the variable by one and pass same to XI.

    Use this link for RFC lookUp.

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439

    Thanks!

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 22, 2008 at 12:03 PM

    Hi,

    I think you can do it in XI. But yes you can store it somewhere outside XI, like in file or some database table and fetch data from it by using a UDF.You can write UDF's java code in such a way, that this code will first read the data from file or database. Increment it and send it to target field, also store the new value in file or database in same java code.

    Regards,

    Sami.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      You can store that variable onto a file on the Xi flesystem or as stated before you can opt to store it on a ABAP table. At runtime you can then retrieve and update it using a runtime lookup. Check this blog to read more about it. /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

      There's probably new functionality available in SAP PI 7.x around this topic.

      Regards.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 07:07 AM

    Answered

    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.