cancel
Showing results for 
Search instead for 
Did you mean: 

Counter in XI

Former Member
0 Kudos

Hi! I'm wondering if it is possible to use a conter in message mapping like following :

counter -


> target field

(initial value = 0000)

(increment = 1)

My question is if I can use 0000 as initial value? because when I test it it only writes out only 0. I believe that counter function can't interpret numbers that starts with 0000 then it understands it as one 0 but when i write 1000 as initial value then it is ok.

anyone who knows this?

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use the initial value as 0 and use the FormaNumber standard function to format the number in the desired way.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Just after the counter fucntion add formatNum function (four zero's in top input box).

Counter -


> FormatNum (0000) -


> Target.

Regards,

Sarvesh

Former Member
0 Kudos

do mapping like this

counter > FormatNumber(0000)-> target

so your target will look like 0001 when the value for counter is 1..so on

Former Member
0 Kudos

Hi,

Also refer to this thread.

It has the solution for your problem.

https://forums.sdn.sap.com/click.jspa?searchID=17039518&messageID=3062103

Former Member
0 Kudos

Hi,

The counter function is used to provide the incrmental numbering to the fileds with mutiple occurances.

It is used as an indentifier for the queue of the specific field.

If a filed is going to be repeatative and have to pass sequencial numbering as 1,2,3......etc.

Then Counter -


> Target Field (1....unbound)