Showing results for 
Search instead for 
Did you mean: 

Help With UDF & FMS

Former Member
0 Kudos

Hi All,

I am having a little trouble with a UDF and a FMS search at the moment and am hoping somebody can help me.

The UDF created on the OCRD is a Service Fee that gets applied when a customer purchases a few selected items. There are three service fees namely 6.38, 11.28, and 0.00 that I have created.

I have created the same UDF on Marketing Document Rows and with a FMS that field gets populated without any problems. I have created another UDF on Marketing Document Rows called Service Fee Total. This field times the quantity by the Service Fee UDF without any problems.

Here comes the problem.

If I create a document with more than one line item and both line items have a Service Fee Total I want them to be added together and then the total inserted into the discount field so that the amount can come off the total of the document.

A FMS that I use has a query attached to it that looks like this

SELECT SUM($[$38.U_ServiceFeeTotal.Number])

however this does not work as it only sums the first line.

If anybody understands what I am trying to do here could you please give me some advice on how to get this working.

Any help appreciated.



Accepted Solutions (1)

Accepted Solutions (1)

Active Contributor
0 Kudos

Sorry to say, but your problem can not be solved by FMS.

There is no possibility for an FMS to reference more rows of the actual transaction. The standard SQL expressions can access the data already stored in the data base, and the special references (with the $...) can access only the header level and the actual (or the first) row data.

Former Member
0 Kudos

Hi Istvan,

Thank you for you reply.

That's not what I wanted to hear but I guess I will have to accept it.

Is this possible through SDK?

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Quinn,

To be honest, I never encountered such case as yours, but even if I encountered it, I won't bother to do it using FMS. I don't think that FMS could do the aggregate things such as your case. When you type


, actually SAP will replace that with certain value from the form. It couldn't automatically read from first line to last line. I think the only way to achieve what you want here is to use SDK.

Best Regards,

Hendry Wijaya

Former Member
0 Kudos

Hi Henry,

Thanks for the reply.

Yes it is quite a unique way that the customer wants to do things.

I will speak to our developers and see if they can come up with a solution to this problem.