on 10-20-2011 3:34 PM
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.
Regards,
Quinn
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
$[$38.U_ServiceFeeTotal.Number]
, 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
8 | |
8 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.