How to call standard planning function in FOX code
Hi,
I want to call std. Distribution by reference planning function in FOX formula. Through CALL FUNCTION std planning functions can not be used.
My requirement is that because I need to execute this distribution function thousands of times with different variable values so I am planning to pass the values for these variables through FOREACH loop.
Any help is appreciated.
regards
Amit Jain
Hi Amit,
unfortunately calling a planning function inside a planning function is not possible. And calling a planning sequence from a planning sequence is not supported as well.
I think is is better if go for a more complex FOX or an exit-function if the planning function needs to be executed online.
Another way some customers are using to met similar requirements is writing a z-program which determines the variable values in a loop (e.g. by reading a z-table). Inside the loop they set the variables (in the variable container) and when this is done execute a planning sequence for the current variable setting. The whole thing could be executed e.g. in a process chain.
Hope this helps ...
Regards Matthias Nutt
SAP Consulting Switzerland
Similar Messages
-
How to implement this planning function using Fox formula
Hello,
I am new to Fox.
I want to implement this complex logic in a planning function
i have A (Kf X from infoprovider Z_A), B (Kf Y from infoprovider Z_B) & moreover there is one more condition,
If current FISCPER > variable value of FISCPER
KF Z = KF Z1 (from Cube C1)
Else KF Z = KF Z2 (from Cube C2).
for a particular calender week,
X = ( Y * Z ) / (summation of (Y * Z) for each week of the whole year)
I know it is complex.
but i have to implement this in a planning function.
The aggreagtion level is built on a multiprovider having A, B , C1 & C2.
Can someone help me out with the FOX formula for this? or is there any better way to do this.
Thanks johnHi Gerardo,
Thanks for that.
I have tried something similiar to it
DATA CHA_CALWEEK TYPE 0CALWEEK.
DATA CHA_COMP_CODE TYPE 0COMP_CODE.
DATA CHA_FISCPER TYPE 0FISCPER.
DATA VAR_PERIOD TYPE 0FISCPER.
DATA SUM_YEAR TYPE F.
DATA TEMP_D TYPE F.
DATA SUM_WEEK TYPE F.
CURRENCY IS LOCAL CURRENCY. FOR DATA SELECTION TO BE RIGHT, NECESSARY TO DERIVE FROM CC.
DATA UN_LOC_CURRCY TYPE 0LOC_CURRCY.
UN_LOC_CURRCY = VARV(Z_U_I100).
CHA_COMP_CODE = VARV(Z_U_I100).
To Calculate the D
VAR_PERIOD = VARV(Z_U_I010).
SUM_YEAR = 0.
TEMP_D =0.
IF CHA_FISCPER > VAR_PERIOD.
TEMP_D = {ZSA_BUD2X,CHA_COMP_CODE,CHA_FISCPER,YBUDG_01X,CHA_CALWEEK}.
FOREACH CHA_CALWEEK.
SUM_YEAR = SUM_YEAR + TEMP_D * {ZCREENTSV,CHA_COMP_CODE,CHA_FISCPER,ZIP_RREF1} .
ENDFOR.
ELSE.
TEMP_D = ({ZSAEXCUSV,CHA_COMP_CODE,CHA_FISCPER,YRT_C02X} - {ZCREENTSV,CHA_COMP_CODE,CHA_FISCPER,YRT_C02X}).
FOREACH CHA_CALWEEK.
SUM_YEAR = SUM_YEAR + TEMP_D * {ZIP_INDEX,CHA_COMP_CODE,CHA_FISCPER,ZIP_RREF1}) .
ENDFOR.
ENDIF.
But i am getting a syntax error
Formula error: } expected
Syntax error in row 21, column 20
i have marke line21 in bold. above.
I feel it is correct, still wonder why i am getting this error.
can you pls help ? -
IP - Is it possible to call exit planning function from ABAP Report..
Hi All,
Greetings.
Is it possible to call exit planning function from ABAP Report (t-code SE38) ? Or I mean is not limited only to be called from ABAP Report, perhaps from BSP / Web-Dynpro / Function Module.
If somebody here has been doing it before, I'm keen to ask to kindly share it. Particularly how to call and transfer data to that exit function.
Or if somebody has done in BPS, appreciate if it can be shared too .
Thanks a lot and have a good day,
Best regards,
Daniel N.Hi.
You can achive this as suggested by Mattias in your previous post.
Lets say you have next data structure:
CostCenter | Amount | PercentForDistibution |
Create input ready query in this format. Restrict cost center by variable type range.
Create WAD with analysis item.
When you run web page you enter range of cost centers (lets say you will enter 101004 to 101010).
I assume you have data only for 101004 in your cube (lets say 1000).
You will see only one record in your webpage.
CostCenter | Amount | PercentForDistibution |
101004 | 1000 | NOTHING
When you create WAD in analysis item properties set "NUMBER_OF_NEW_LINES" to lets say 1 (so in WAD you will see always one blank line for entering new data).
Just add 6 new records:
CostCenter | Amount | PercentForDistibution |
101005 | NOTHING| 10
101006 | NOTHING| 30
101007 | NOTHING| 20
101008 | NOTHING| 25
101009 | NOTHING| 5
101010 | NOTHING| 10
Then run planning FOX function like this:
FOREACH Z_COST_CENTER.
IF {Amount, Z_COST_CENTER} <> 0
Z_AMNT_TO_DISTRIBUTE = {Amount, Z_COST_CENTER}.
ENDIF.
ENDFOR.
FOREACH Z_COST_CENTER.
IF {PercentForDistibution Z_COST_CENTER} <> 0.
{Amount, Z_COST_CENTER} = Z_AMNT_TO_DISTRIBUTE * {PercentForDistibution Z_COST_CENTER}.
ENDIF.
ENDFOR.
It is not perfect FOX, but as an idead, it should work.
Regards. -
How to call a SQL function from an XSL expression
Hi
In R12, in Payroll Deposit adivce/Check writer, We need to sort the earnings tag <AC_Earnings> in to two different categories as regular and other earnings. In the DB and form level of element defintiion we have a DFF which differentiates between the two kinds of earnings. But the seeded XML that is gerneated by the check writer does not have this field.
The seeded template displays all the earnings in one column. How can we achieve this in the template without modifying the seeded XML.
The one approach i have is to write a function and based on the return value sort the data. For this I need to know :
1) How to call a SQL function from an XSL expression that is allowed in BI template.
If anyone ahs faced similar requirements please share your approach.
Thanks
SrimathiThank u..
but i'd seen that link wen i searched in google..
Is it possible without using any 3rd party JARs and all?
and more importantly plz tell me what should be preferred way to call a javascript function?
Do it using addLoadEvent() or Windows.Load etc
OR
Call it thru Xsl? (I donno how to do dis)
Thanks in Advance..
Edited by: ranjjose on Jun 3, 2008 8:21 AM -
How to call a Javascript function from backing bean without any event
Hi,
Someone knows how to call a Javascript function from backing bean without any event ?
thanksPlease review the following thread:
ADF Faces call javascript
Luis. -
How to call Standard Iviews in Webdynpro application?
How to call STD iviews in the wwbdynpro application.
can any of friends give the codeUse this snippet to call standard iviews from your webdynpro code :
//use LinktoAction UI element
onActionClick (com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent)
WDPortalNavigation.navigateAbsolute("ROLES://portal_content/folders/X.Iview", WDPortalNavigationMode.SHOW_INPLACE, (String)null, (String)null, WDPortalNavigationHistoryMode.NO_DUPLICATIONS, "Called iView Name", (String)null, (String)null);
Hope this helps.
Rgds
Prabhakar -
How to call standard report with in zprogram?
Hi Sap experts,
How to call standard report with in zprogram.
For example if country is 'US' then call Zprogram(zprog_US).Inside zprogram call standard report(rhecm_change_proc_status).If country is 'CA' then call zprogram.Inside zprogram call standard report.For same othercountres like 'PR','GB','ES'.Actually HR_ECM_READ_FEATURE_CARGP will having the input as employee id and will return the CAREA(County like 'US','PR'......).Kindly help me what is the procedure?
Regards,
Sujan>
sujan T wrote:
> Thanks for your reply.
>
> What is the logic to call the standard report from zprogram?Inside the zpogram how to call standard report?
>
> Regards,
> Sujan
no special logic is required
If u want to use
RPUAUDOO IN THE ZREPORT.
Put the submit button where ever required
ex: In zreport after certain process reacedu want to call then use
submit rpuaudoo and return.
Regards
Sas -
How to call java script function from JSP ?
how to call java script function from JSP ?
i have function created by java script lets say x and i want to call this function from jsp scriplet tag which is at the same page ..thanks
-
Standard Planning function Type
Hi,
Would anybody give some example of standard planning function type except COPY and REVALUATION.
Points will be awarded to the suitable reply
Regards,Hi ,
Kindly go through the below link for more details on all standard functions,
[http://help.sap.com/SAPHELP_NW04s/helpdata/EN/43/37d8c2af4c1bcbe10000000a1553f7/frameset.htm]
1. Unit conversion:
Consider that all your planned records are in "G" unit and if you want to convert this to any other unit like "Pound", then you can use this planning function. The prerequisite for this is, you need to create a suitable "Unit conversion type" using the tcode: RSUOM, for converting "G" to "Pounds".
2. Currency Translation:
Consider that all your planned records are in "EUR" currency and if you want to convert this to any other currency like "USD", then you can use this planning function. The prerequisite for this is, you need to create a suitable "Currency translation type" using the tcode: RSCUR, for converting "EUR" to "USD".
3. Deleting Invalid Combinations:
Consider that you did not have any characteristicc relationships in your project and hence you have invalid data in your planning cube. For example, you have 'Product' and 'Product Group' in your cube and the end user has entered wrong values for 'product group' for a corresponding 'product'. In this case you can create a characteristic relationship for 'Product' and 'Product Group' and then execute this planning function so that all the records with invalid relationships between 'Product' and 'Product Group' will be deleted.
4. Repost:
This is similar to 'Copy' planning function. But the only difference is 'Copy' copies the records from source to target. But 'Repost' moves the records from source to target, (i.e.) after the records are copied they are deleted in the source.
5. Repost (Characteristic Relationships):
This is similar to 'Deleting Invalid Combinations' but the only difference is, instead of deleting the invalid combinations, this function reposts the old relationships to the new correct ones based on active characteristic relationships.
6. Distribution by Key:
You can use the Distribution by Key function type to generate the characteristic combinations to which data is distributed in accordance with the master data and characteristic relationships. The key figure values are distributed according to the expressly specified distribution keys. These are distribution functions that determine the weighting of the distribution.
For example, you have planned revenue based on 'Country' but you have some part of the revenue which is "not assigned" to any country. You can use this planning function to distribute this "Not Assigned" revenue to any particular "Country".
7. Distribution by Reference Data:
You use the Distribution by Reference Data function type to generate combinations of characteristics that correspond to the reference data. The system distributes data in accordance with these combinations. The key figure values are distributed by percentage in accordance with the reference data. You use the table for key figure selection to select the key figures that you want to distribute.
For example, you have actual values for the year '2011' and you want to use this data to distribute it to the future year '2012'.
In this case you can use this planning function, to distribute the '2011' data to '2012'. The prerequisite for this is there should be planned data already available for the year '2012'. This function is used after the manual planning is done for the future year.
Hope this clears your doubt.
Regards,
Balajee -
How to call a .bat file from java code?
How to call a .bat file from java code? and how can i pass parameters to that .bat file?
Thanks in advancethanks for ur reply
but still i am getting the same error.
I am trying to run a .bat file of together tool, my code looks like below
import java.lang.Runtime;
import java.lang.Process;
import java.io.File;
class SysCall{
public static void main(String args[]){
String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
//String path="D://Borland//Together6.2//bin//Together.bat ";
Runtime r= Runtime.getRuntime(); //Declare the system call
try{
System.out.println("Before batch is called");
Process p=r.exec(cmd);
System.out.println(" Exit value =" + p.exitValue());
System.out.println("After batch is called");
/*can produce errors which must be caught*/
catch(Exception e) {
e.printStackTrace();
System.out.println (e.toString());
I am getting the below exception
Before batch is called
java.lang.IllegalThreadStateException: process has not exited
at java.lang.Win32Process.exitValue(Native Method)
at SysCall.main(SysCall.java:17)
java.lang.IllegalThreadStateException: process has not exited -
How to call web-service using only java code
Hello, how to call web-service using only java code. I can call it from BPM process or Web Dynpro Java Application, but if I need to call it from ejb component?
I'm found answer:
Java and SAP Portal blog: How to call web service from java code example -
How to call the 'DETAIL' function in ALV for a program?
Dear Friends,
I have a prf_tree (TYPE REF TO cl_gui_alv_tree), and I added below codes to add an new button for displaying the detail record, it works fine:
CALL METHOD prf_toolbar->add_button
EXPORTING
fcode = prf_tree->mc_fc_detail
icon = icon_detail
butn_type = cntb_btype_button
text = ''
quickinfo = 'Show Details'.
Everytime I click this new button, a window will popup and display the record details.
My question is: how to call this standard function ('DETAIL' function) in a program? for example:
CASE ldf_ok_code.
WHEN gcf_okcode_save.
PERFORM okcode_save.
WHEN 'SHOW_DETAIL'.
CHECK gdf_nodkey_9003 IS NOT INITIAL.
PERFORM SHOW_DETAIL.(How to write this code to display the detail data of the selected record?)
Thanks a lot!Hi,
Go for Interactive Reporting
like When u click on the output then it will show the Detail report u want .
for that purpose Pls
Use Hide command .
And call another report
by using SUBMITT Program -
How to call standard SAP method in the Custom Program ?
Hi,
i need to call sap standard method 'OpenItemRollinout' in my custom program. For the SAP Standard method 'OpenItemRollinoun' the BOR(Business Object) is 'PAYSCHEME'. So how to call the SAP standard method in the custom program ???Hi,
In the method that you have provided only one function module is being used so better use the FM and copy the remaining code based on ur requirement.
FM is ISU_S_PAYSCHEME_ROLLIN_ROLLOUT.
Regards,
Vijay. -
How to call a php function from java...
helllo fellow java developers!
Im trying to figure out how I can call a php function from my java code.
I know it sounds a bit unintiutive, seeing how java is a rich programming language, BUT java simply cannot do the task that the php script can do. It simply acts differently.
So I am trying to call a php function, that returns a string object, and capture that string object....
is this possible?
something like....
String strMyString = phpFunction( strVariable )
???????/ any ideaS?idea #1 - come up with a better plan that doesn't involve invoking php from java.
Give one example of something php can do that java can't.
idea #2 - forget java, and just write it in php.
Involving multiple frameworks/languages/runtime environments is a recipe for an overcomplicated solution that will be impossible to maintain.
I'd say keep it simple and stupid, and stick with one language.
If you're still hooked on the idea, maybe try [this link|http://www.infoq.com/news/2007/10/php-java-stack] -
How to Call Standard PO Form in my Z program
Hi All,
Could you please tell me, How to Call the Standard PO form in my Z program for print priview and printing.
My requirement is :
Create Z program with PO Number as Selection screen.When we give the PO Number and Press execute it will show the print priview with printer option.
Thanks & Regards
MuraliPlz refer this.
REPORT ZPPR_BOM1.
TABLES
TABLES : MAST. " Material to BOM Link
*& Internal tables Begin with it_
DATA : IT_MAST TYPE MAST OCCURS 0 WITH HEADER LINE.
DATA: fm_name TYPE rs38l_fnam.
CLEAR : IT_MAST.
REFRESH : IT_MAST.
*& Parameters Begin with pr_
*& Select-options Begin with so_
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: PR_MATNR LIKE MAST-MATNR OBLIGATORY,
PR_WERKS LIKE MAST-WERKS OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
SELECT * FROM MAST INTO TABLE IT_MAST " Get BOM number
WHERE MATNR = PR_MATNR
AND WERKS = PR_WERKS.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZPPS_BOM1'
IMPORTING
fm_name = fm_name.
CALL FUNCTION fm_name "'/1BCDWB/SF00000079'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
IT_MAST = it_mast
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Maybe you are looking for
-
How do I reboot my Macbook pro 2011 to a new internal hard drive?
I had to get a new internal hard drive and I can't afford to pay some one to do it for me. So I was wondering how do I install the operating system on to the hard drive? Thanks
-
Finally got it working Thanks!!!
Greatings, I finally got my Nano working again! Maybe this will help someone else. My iPod basically was not reconized by my computer so I followed the info posted elsewhere to reformat and then restore which did not fix my problem. I then reinstalle
-
I have a Google nexus 7 android jelly bean. I have several scanned in PDF forms that I need to be able to fill out in the field. How do I do this or what program do I need. Presen rt lay viewing them with acrobat reader. Any help is appreciated.
-
problem in photoshop cs6 beta on mac os x 10.7.3 when i try in my work space ctrl+click on object to make their layer active in layer window it select another layer sorry if my english not good
-
Ping blocks when looking up reverse dns PTR/RR
Hi! If someone could shed some light on this behaviour, it would really make my day! When using ping -s to ping an ip address that doesn't have a PTR RR, ping will timeout until dns timeout. This would be fine, except that when the replys do show, it