cancel
Showing results for 
Search instead for 
Did you mean: 

Counter In XSLT

Former Member
0 Kudos

Hi,

Can somebody please let me know how I can create counter in XSLT. When I have multiple line item of certain segment in an idoc, I want to put the counter on the segment attribute as shown below.

The scenario should be,

Field Value

Acc_Document02

Idoc

Begin (attr) 1

E1BPACPA09

Segment(attr) 1

E1BPACPA09

Segment 2

E1BPACPA09

Segment 3

If somebody has XSLT code, can you please send.

TIA.

Warm Regards,

Ranjan

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Ranjan,

have you tried with the number function?

http://www.w3.org/TR/xslt#number

Regards,

michal

Former Member
0 Kudos

Hi Michal,

Thank you for your quick reply mate. I used the position() function and it works fine.

Cheers,

Ranjan