cancel
Showing results for 
Search instead for 
Did you mean: 

problem with using counter standard function in pi

Former Member
0 Kudos

Hi experts,

i am working on idoc-file scenario(shipment information).

my problem is i have a field in the target side called palletnumber,i mapped palletnumber with counter(standard function).here it is incrimenting pallet number by 1 for the every reputation, like 1,2,3,4,5, and so on, but not in the below format.

<pallet>

pallet_header

palletnumber(1)

pallet_lines

pallet_line

palletlinenumber(1)

pallet_line

palletlinenumber(2)

pallet_line

palletlinenumber(3)

</pallet>

<pallet>

pallet_header

palletnumber(2)

pallet_lines

pallet_line

palletlinenumber [i want](1)i am getting(4)

pallet_line

palletlinenumber [i want](2)i am getting(5)

pallet_line

palletlinenumber [i want](3)i am getting(6)

</pallet>

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank you my quesition resolved.

Former Member
0 Kudos

Hi

It is causing due to context only. Move to a higher level.

Also you can try index if it solves your purpose as

from http://help.sap.com/saphelp_nw70/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm

counter

O = Number of calls for this target-field mapping where you specify the initial value and the increment of the counter in the function properties.

index

R = Index i of Xi. In the function properties, you specify the following: the initial value of i, the increment, and whether the index value is to be reinitialized at the beginning of every new context, or whether it is to have the same value for the entire source structure.

Regards

Raj

Former Member
0 Kudos

Hi Maridu,

Change the context of your source field (put a higher segment) befour "Count", and you will be able to manage properly your PalletLineNumber, because the Count is reinitialised when you change of context, which is your case with your Idoc segment

regards.

Mickael

Edited by: Mickael Huchet on Oct 13, 2011 10:40 AM