Please refer to the post for the intial part of the discussion
BI-IP Syntax For CALL FUNCTION Statement in FOX?
Scott, thanks for the reply. I have a fox code which calculates net revenue. This fox code is attached to a Display Only template as Execute Function Before Layout Display. Now when the user opens the template and leaves it, he will be asked whether he wants to save the changes. Since it is a Display Only template this is leading to confusion. Of course, this can be dealt with the user training but I was thinking whether I can automatically save the data that is calculated by the function using API_SEMBPS_POST so that when the user leaves the template there is no data in the buffer that needs to be saved and hence he will not be asked to save the data.
Couple of more things on FMs in FOX: What is the syntax to execute a FM inside FOX code and what are the simple FMs that marc was referring to that can be used in FOX? As the FOX code runs on the data sets [xt_ref_data] formed by non-changing characteristics, I think it is not advisable to use DB save feature on each data set. To explain further, my FOX code has only the Key figure name in the fields to be changed. So data sets [xt_ref_data] are formed based on the unique combinations of non-changing characteristics like company code, material, plant etc. If I use [eventually] API_SEMBPS_POST in the FOX formula then for each combination of company code, material and plant the FM will try to save the buffer to DB, which I think is undesirable. Let me know how I can handle this situation.