cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a sequence number in PI

Former Member
0 Kudos

Hi,

A sequential Number that groups transactions together to form a logical group. In my interface the SAP PI will generate this sequence number. Each distinct order number will get another sequence number (so all Sales order header & detail records can be grouped together).

Can someone give me some idea as to how could i ac

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

The best way is using number ranges on ABAP stack. Go to transaction code SNRO, define a custom number range. Then, wrap function module NUMBER_GET_NEXT_V1 with an RFC enabled function.

Ibrahim

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sahil,

You can generate sequence number using a RFC lookup.

Keeping information about the previous sequence number generated in a UDF will not be feasible.

Regards

Arpil

Former Member
0 Kudos

You can use counter, message id, or UDF to generate sequence number.

Former Member
0 Kudos

Hi Farooq,

Thanks for your reply.

Can you pleae give some example for using UDF or message ID for the above requirement as to how to build this?

Thanks

Sahil

Former Member
0 Kudos

It's better to maintain a table in SAP and use RFC / BAPI to get the sequence number. If you use UDF in PI, then you might be at risk or losing the seq num, because if the PI server is re-started, the sequence number will be lost.