cancel
Showing results for 
Search instead for 
Did you mean: 

Counting the Fileds in the Mapping

Former Member
0 Kudos

Hi,

I have 30 fileds in my Receiver structure... and in that last filed is DataPopulatingCount . that means.. in this last filed i need to pass the how many fileds I'm getting the data in the above 29 fileds.. (suppose if some fileds I'm not getting data then by skipping those fileds.. and count the remaining fileds.. and give the count )

for this.. what can we do in the graphical mapping.. how can we achive this..

Regards

Jain

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, Jain:

I personally believe that COUNT function only return number of occurence for one particular node.

It will not meet your requirement.

You need to write your user defined function to achieve your purpose, you might need to use DOM or SAX to get the number of fields in your xml file, so I suggest search around the usage of DOM or SAX.

Regards

Liang

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Jain,

You can use COUNT function which you can find it under statistics.........

Thanks,

Madhu

Former Member
0 Kudos

Hi

I think Using SAP standard function count we can acheive this.

Just go through this blog for how to use count. I think it will help you for your requirement.

Regards

jayaram.g

Former Member
0 Kudos

Yes for this function you can simply use a standard function count in the statistics functions.

Just make sure that you have all of the fields you want to count in one context otherwise you will not get an accurate result.

Shabarish_Nair
Active Contributor
0 Kudos

its a simple logic.

The count is nothing but the count of the source fields that you use to map the target fields. So you can sum up all this count and then pass it to the last field of your target to achieve the result.