Javascript to Execute a button or planning function onload of WAD template

How do I call a javascript to execute a planning function or a button that has a planning function.
I tried creating a script using script web item and wizard to execute a planning function.  The wizard generated a javascript function that has two parameters currentState, defaultCommandSequence
I can call the function inside the body tag using OnLoad but what parameters do I need to pass for currentState and defaultCommandSequence.
Is there any other way of doing.   Any help is greatly appreciated.
Thanks

Hi Ravi
Whatever u hav done is correct. There is no need to transfer any values for the parameters
currentState and defaultCommandSequence .
They r automatically derived based upon the current state of ur WAD template and the sequence of commands that you executed till now..
Try this.. its working fine in my project since long time.

Similar Messages

  • How to execute process chains using planning function

    hi, i need to execute process chains from web. i know the steps to that needs to be followed for accomplishing the task.
    1) RSPC_CHAIN_START ( function module) into which process chain has to be passed
    2) create a planning function to invoke the said function module
    3) create a function button on web and assign the planning function.
    Now the thing is how to create the planning function in BPS. plz provide me a solution with steps. And how to pass the process chain into the function module and handle it.
    Thnaks

    Hi Anand
    RSPC_CHAIN_START is the standard function module to run a process chain which i want use. Now, how to use the said FM in planning function to achive my task. Do i need to maintain any parameter in planning function inorder to execute the FM. If you know the solution plz explain in detail.
    I am very new to BPS..bare me plz
    Thank you

  • Authorization problem in executing a Planning Function

    Hi All,
    We are facing an authorization issue  while executing a planning function in a WAD template.
    The error message is :
    The planning function ended with errors.
    The user does not have authorization on infoprovider YF2IGM37.
    But the relevant authorizations have already been provided to the said user for:
    S_RS_ALVL,S_RS_PLENQ ,S_RS_PLSE ,S_RS_RLSQ, S_RS_PLST        along with authorization for
    Cube, multiprovider, query as well as aggregation layer.
    Could anyone pls help us resolving the issue.
    rgds,
    Nandini.

    Check any authorization relevant infoobject user is not authorized for.
    For example, if company code is authorization relevant,and in your query any default company code is provided, user may not have the relevant access.

  • Need Information of how to Consume/Execute Planning Function & Planning Sequence in Design Studio

    Dear Colleague,
    We are trying to have a PoC demonstrating BW planning function and Planning sequence in SAP Business Objects Design Studio.
    1. In the process, we have built our own Planning function and Planning sequences in our BW system and they are working as per expectation in the BW system.
    2. We added the Planning function and Planning Sequence on to the Design Studio App.
    But now how to we add these Planning function and Planning sequence on to the Dashboard.
    Is there any container to add these planning objects on to the dashboard.
    Or how to execute or Consume these Planning functions and sequences in Design Studio dashboard.
    And any Document or Information in detail would definitely help a lot.
    Please answer the question underlined.
    Thanks,
    Vijay

    Hi Mustafa,
    Thanks for replying!
    But Since this is an Internal project. We are already using Version 1.3.
    Solving double purpose of evaluating the tool and coming up with the application as well.
    As I said in my previous description, we were able to add Planning Functions and Planning Sequences on to Design Studio using menu options available.
    But not sure of how to consume or execute them in the app. To get the rows of records, change values, Save and Transfer values as we do it with the Planning function with BW backend.
    Thanks,
    Vijay

  • Planning  function

    Hi all,
    how can i automatically execute planning function when the layout is open.
    is it possible in IP.

    Yes you can, as Mayank said, in the Web Analyzer is the option.
    Instead of Web Analyzer, if  you're using the Bex Analyzer, in the case of netweaver 2004's, I use the macro functionality (excel functionality).
    Once you are designing the workbook, you can specify in the "options Workbook" a macro that can be executed. first select the "General" tab, select the "Refresh workbook on Open", in the "Exits" tab, select "invoke macro on refresh" and specify the macro name. in the macro you can launch the same action to execute anything that you previously details in your buttons or planning functions.
    Hope it is suitable for you.
    Ebert

  • How to transfer data between planning functions in BPS

    Hi All,
    I have requirement, where user will enter the sales qty plan in manual planning function and need to read the zinfo object to distribute the sales qty accordingly to manufacturing plant and push into infocube.
    To fulfill above requirement, i'm thinking to create one manual plan and user will enter the total sales qty and create one more exit planning function to distribute the sales qty for each plant.
    For above approach, i need to get the data enter in mannual planning function to exit planning function.
    Can anyone let me know how to transfer data from one planning function to other planning function under same planning level and package.
    Thanks you,
    santosh.

    Hi Santosh,
    You can achieve the Distribute functionality using the Standard Planning Function for Distribute (Refer SAP Help for details).
    Moreover you would not have to do anything specifically to transfer data from one Planning Function to another. The application picks up the latest data records for processing whatever Function you are executing. If you want to execute a series of Planning Functions you could use a Planning sequence to achieve the same.
    Hope it helps

  • How to  pass a variable value into a custom planning function via a web

    Can some one tell me
    How to  pass a variable value into a custom planning function via a web template?
    What are the different types of Planning function parameters available and what is the difference between them?
    Thanks
    babu

    Hi Sutrtha,
    Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
    Am I missing something?
    Regards
    B

  • Executing Revaluate Planning Function Javascript Web Application Designer

    Guys:
    Using the Web Applicaiton Designer Javascript API, the best I could do about executing a Revaluate Planning Function is given below, JavaScript function invokeJSreval().
    My objective is to get the percentage from an INPUT_ITEM, INPUT_FIELD_ITEM_1, and pass it to the REVALUATE Planning Function, Z_PF_REVL, that uses a variable Z_RK_REVAL_PERCENT.
    Executing Revaluate works fine directly through command wizard, but I wanted to be able to use it with Javascript API.
    Also, SAVE_DATA command works just fine with JavaScript since its straight-forward one line code sendCommand("SAVE_DATA");
    I think the problem is passing nested parameters and vairables correctly for Revaluate function using JavaScript.
    Appearently, sending Reval command the way I am doing is not working, and the browser does not get anything in response and keeps hanging there.
    I wanted to get you guys' take on this.
    Thanks,
    -Ram
    function invokeJSreval(){
            //creating a command
            var commandREVAL = new sapbi_Command("EXEC_PLANNING_FUNCTION_SIMPLE");
           //creating a parameter
           var param = new sapbi_Parameter( "Planning Function", "Z_PF_REVL" );
          //creating child parameter list
          var childParamList = new sapbi_ParameterList();
         //populating child parameter list
         childParamList.addParameterNameValue( "Variable Type", "ITEM_INPUT" );
         childParamList.addParameterNameValue("Web Item Binding", "INPUT_FIELD_ITEM_1");
         childParamList.addParameterNameValue( "Variable", "Z_RK_REVAL_PERCENT" );
         //assigning child parameter list to parameter
         param.setChildList(childParamList);
         //supply the parameter to the command
        commandREVAL.addParameter(param);
    +     +
        +//send the command     +
        sapbi_page.sendCommand(commandREVAL);

    Hi Ram,
    your coding won't work for several reasons. I suggest to use the wizard to create the basic script. Simply click on the "Create with Wizard" button when you maintain the script item. Then enter the same command that you used for the revaluation button. The WAD will generate the JavaScript for you. It looks like this:
    function executeJS_EXEC_PLANNING_FUNCTION_SIMPLE_EAA( currentState, defaultCommandSequence ){
         //Create a new object of type sapbi_CommandSequence
         var commandSequence = new sapbi_CommandSequence();
         //Create a new object of type sapbi_Command with the command named "EXEC_PLANNING_FUNCTION_SIMPLE"
         var commandEXEC_PLANNING_FUNCTION_SIMPLE1 = new sapbi_Command( "EXEC_PLANNING_FUNCTION_SIMPLE" );
         var paramListSELECTOR_DATA_PROVIDER_REF = new sapbi_ParameterList();         
         var paramSELECTOR_DATA_PROVIDER_REF = new sapbi_Parameter( "SELECTOR_DATA_PROVIDER_REF", "DP_1" );
         paramListSELECTOR_DATA_PROVIDER_REF.addParameter( paramSELECTOR_DATA_PROVIDER_REF );
    commandEXEC_PLANNING_FUNCTION_SIMPLE1.addList( paramListSELECTOR_DATA_PROVIDER_REF );      
         var paramListPLANNING_FUNCTION = new sapbi_ParameterList();         
         var paramPLANNING_FUNCTION = new sapbi_Parameter( "PLANNING_FUNCTION", "PM_REVA_1" );
         paramListPLANNING_FUNCTION.addParameter( paramPLANNING_FUNCTION );
    commandEXEC_PLANNING_FUNCTION_SIMPLE1.addList( paramListPLANNING_FUNCTION );      
         var paramListVARIABLE_VALUES = new sapbi_ParameterList();         
         var paramVARIABLE_VALUES = new sapbi_Parameter( "VARIABLE_VALUES", "" );
         paramListVARIABLE_VALUES.addParameter( paramVARIABLE_VALUES );
         var paramListVARIABLE_VALUE1 = new sapbi_ParameterList();         
         var paramVARIABLE_VALUE1 = new sapbi_Parameter( "VARIABLE_VALUE", "" );
         paramListVARIABLE_VALUE1.setParameter( "paramVARIABLE_VALUE1", 1 );
         var paramListVARIABLE_TYPE = new sapbi_ParameterList();         
         var paramVARIABLE_TYPE = new sapbi_Parameter( "VARIABLE_TYPE", "ITEM_INPUT" );
         paramListVARIABLE_TYPE.addParameter( paramVARIABLE_TYPE );
         var paramListITEM_INPUT = new sapbi_ParameterList();         
         var paramITEM_INPUT = new sapbi_Parameter( "ITEM_INPUT", "" );
         paramListITEM_INPUT.addParameter( paramITEM_INPUT );
         var paramListITEM_REF = new sapbi_ParameterList();         
         var paramITEM_REF = new sapbi_Parameter( "ITEM_REF", "INPUT_FIELD_ITEM_1" );
         paramListITEM_REF.addParameter( paramITEM_REF );
    paramListITEM_INPUT.addList( paramListITEM_REF );      
    paramListVARIABLE_TYPE.addList( paramListITEM_INPUT );      
    paramListVARIABLE_VALUE1.addList( paramListVARIABLE_TYPE );      
    paramListVARIABLE_VALUES.addList( paramListVARIABLE_VALUE1 );      
    commandEXEC_PLANNING_FUNCTION_SIMPLE1.addList( paramListVARIABLE_VALUES );      
         //Adding the newly created command "EXEC_PLANNING_FUNCTION_SIMPLE" to the command sequence
         commandSequence.addCommand( commandEXEC_PLANNING_FUNCTION_SIMPLE1 );
         //Send the command sequence to the server
         sapbi_page.sendCommand( commandSequence );
    Regards,
    Marc
    SAP NetWeaver RIG

  • Macro Error while executing planning functions or saving data

    Dear All,
    I am getting following error in BEx Analyzer while executing planning function or pressing a save button.
    Note: Excel is 2007 version.
    Cannot run the macro "XXXXXX.xlsx". The macro may not be available in this workbook or all macros may be disabled.
    I changed the settings in Macro Settings (Office Button -> Excel Options -> Trust Center -> Trust Center Settings-> Macro Settings) eventhough it is showing that above message.
    selected ->
    Enalble all macros
    Trust access to VBA project object model.
    If anybody faced this issue kindly reply to this.
    Best Regards,
    SG

    Hello everybody,
    i am facing exactlythe same issue! I am currently running GUI Patch Level 14 and BI Add on Patch Level 10.
    I have also adjusted all necessary settings in Excel Options like Activate all Macros and Trust VBA Coding.
    Does anybody have another Solution.
    As mentioned before Gui Patch 13 and BI Add On Patch 10 obviously arent the solutiuon.
    Best regards
    Janos

  • Problem while executing planning function

    Hi All,
    I have created an input ready query which takes input for a key figure growth percentage and applies it to another key figure volume to get the new volume. For this calculation I have written a FOX formula:
    Initially all the records have growth per as zero. When I enter the value for one DU and transfer it, it is calculating the new volume, but if I enter the per for a new record, it is calculating for this record and also recalculating the volume based on already entered  growth percentage for the previous DU. PFB the example:
    Scenario 1:
    User enters the value for the first time
    Season      Brand                 DU                         Growth percentage         Volume               New vol
    SS09            ADIDAS        TENNIS                               10%                       100                   110
    SS09            ADIDAS         KIDS                                    0%                       500                   500
    Now he clicks the u2018TRANSFERu2019 button to which the planning function is assigned for performing the calculation. The volume changes to u2018110u2019.
    Scenario 2:
    User enters the value for next DU.
    Season      Brand                 DU                Growth percentage         Volume     New vol                
    SS09            ADIDAS        TENNIS                               10%             100             121
    SS09            ADIDAS         KIDS                                  10%              500             550
    So how can i avoid this problem of recalculating. Also if this data is saved ino the cube and the report is executed for the next time and if it picks up the growth percentages and recalculates again, it will be wrong planning.
    Request your inputs as how to solve/avoid this problem.

    Hi,
    you can use three keyfigure. The percentage value, the original value and the target value.
    target value = original value * percetage value / 100.
    Hope this helps ...
    Regards Matthias Nutt
    SAP Consulting Switzerland

  • Sequencing of variables when executing a planning function in IP

    I am using BI Integrated Planning and have created a web application that executes a u201CCopyu201D planning function on the click of a button. The u201CCopyu201D planning function has a number of variables to accept u201CThe Fromu201D and u201CTou201D values. When I click on the button, I am prompted for the variable values. However, I would like to re-sequence the list of variables that appear on the prompt.
    We are on BI 7.0 Support Pack 17.
    Any pointer is appreciated.
    Regards,
    Sanjay Kumar

    Hello Sanjay,
    I am afraid this is not possible. There is no option provided to arrange the order of input variables for a planning function.
    An idea would be to include a query in the web template containing the same variables and arranging them in the query properties; and hide this query in the web template.

  • Execute planning function in Web template for selected row in analysis item

    Hello all.
    I have been trying several different solution for this issue I have, but could not ,make it work. Hopefully, any of you can give me some ideas.
    Initially the scenario seems to be easy.
    I have a Web template were I show a query analysis item with costcenter, plan/act type, user and entry date. I allow single record selection in this item.
    I have a button that should execute a planning function from the plannig modeler.
    The planning function should be executed only for the costcenter and plan/act type which are selected in the analysis item.
    How do I have to link the two objects :analysis item and planning function, so that the planning function is executed with the correct filter? What should be the filter definition (if any expecific things to consider)?.
    Thanks in advance for your help.
    Best regards,
    Alfonso.

    Dear Deepti.
    Thanks a lot for your answer, but it did not solve my issue.
    The problem is that my query is not created over the same agregation level as the planning function is, and as per the link you have sent me it seems to be a prerequisite.
    Is there any other way to do it?
    More in detail, I am implementing a Lock/Unlock mechanissim for planning costcenters. I have a n ODS where I store my costcenetr status(lock or unlock) and I also have a cube where the planning values are stored.
    My query(to select the costcenter to unlock) is done from the ODS, and my planning function is done in an aggreagation level of my cube (this is to lock the costcenter in cube, to avoid incorredct updates while it is unlocked/locked).
    The issue that I have is that I can not find a way to send the selected information from the query to the planning function.
    I hope you have more ideas.
    Thanks a lot.

  • Execute planning function in Web template for selected item in anylisys ite

    Hello all.
    I have been trying several different solution for this issue I have, but could not ,make it work. Hopefully, any of you can give me some ideas.
    Initially the scenario seems to be easy.
    I have a Web template were I show a query analysis item with costcenter, plan/act type, user and entry date. I allow single record selection in this item.
    I have a button that should execute a planning function from the plannig modeler.
    The planning function should be executed only for the costcenter and plan/act type which are selected in the analysis item.
    How do I have to link the two objects :analysis item and planning function, so that the planning function is executed with the correct filter? What should be the filter definition (if any expecific things to consider)?.
    Thanks in advance for your help.
    Best regards,
    Alfonso.

    Dear Deepti.
    Thanks a lot for your answer, but it did not solve my issue.
    The problem is that my query is not created over the same agregation level as the planning function is, and as per the link you have sent me it seems to be a prerequisite.
    Is there any other way to do it?
    More in detail, I am implementing a Lock/Unlock mechanissim for planning costcenters. I have a n ODS where I store my costcenetr status(lock or unlock) and I also have a cube where the planning values are stored.
    My query(to select the costcenter to unlock) is done from the ODS, and my planning function is done in an aggreagation level of my cube (this is to lock the costcenter in cube, to avoid incorredct updates while it is unlocked/locked).
    The issue that I have is that I can not find a way to send the selected information from the query to the planning function.
    I hope you have more ideas.
    Thanks a lot.

  • Authorization issue in WAD when executing planning function

    Hi All,
    I am facing the bellow authorization issue-
    Termination message sent
    WARNING BRAIN (800): You do not have the authorization for component !!AZF2PO_AGR
    MSGV1: ZF2PO_AGR
    MSGV2: REP
    MSGV3: !!AZF2PO_AGR
    MSGV4: 16
    ABEND RSBOLAP (002): No Authorization
    I am getting this issue When Calling Planning function from WAD application using button. This authorization fail is happening in portal when the Planning function is executed.
    Error explains that there is no authorization for component u201C!!AZF2PO_AGRu201D.Where as in actual we donu2019t have any component as stated.
    Instead we have an aggregation level with technical name ZF2PO_AGR.
    We have already Assigned the below Planning objects-
    S_RS_ALVL
    S_RS_PLENQ
    S_RS_PLSE
    S_RS_PLSQ
    S_RS_PLST
    To Summarize-There is a web application with button linked to planning functuion.When clicked on this button after execution of web template we get the above error.
    Have found note 1000006,but it says Support package 12 and all but we in support package 20

    Hi Guys,
    I know this thread is answered but I have a similar problem I think.
    I have a WAD that is published to the portal. I have added the WAD to a page via a hyperlink, the page resides in KM. When a user opens the page, via a URL iView, the see the page, but when they click on the link to open the WAD, I get the following error:
    Portal runtime error.
    An exception occurred while processing your request. Send the exception ID to your portal administrator.
    Exception ID: 07:19_26/02/10_0067_18934750
    Refer to the log file for details about this exception.
    When I assign the Super Admin (UME Role) to the user, they can execute the WAD no problem.
    I am not an Authorizations person, so any pointers as to where I should start looking would be greatly appreciated.
    Thanks.
    Freddie.

  • How To... Execute Planning Functions and Sequences from MS Office Ribbon

    Dear all,
    I am working with a SAP how to paper, which is called:
    How To... Execute Planning Functions and Sequences from MS Office Ribbon.
    It is working absolutely fine and I am pretty satisfied, but as you probably know "Control the visibility of a button based on the visibility of a related crosstab: the  button just disappears once the related crosstab is not located on the active sheet."
    This means, when I insert different queries in different crosstabs, only one crosstab will have my own created ribbon. Is it also possible to set another specific ribbon with other buttons for another crosstab? Can I change the macro, included in the appendix of the how to paper, regarding this issue?
    Thanks in advance!
    Kind regards
    Dominik Drebinger

    Hey Martin,
    thanks for your reply, but I solved the problem on my own. Unfortunately my colleague did not see that the crosstabs had to be defined differently.
    Like this:
    Label
    Screentip
    Msolmage name
    Crosstab name
    Copy Initial Aligned
    Copy Initial Aligned
    CacheListData
    SAPCrosstab1
    Copy Initial Aligned 
    Copy Initial Aligned
    CacheListData
    SAPCrosstab3
    Copy Initial Aligned
    Copy Initial Aligned
    CacheListData
    SAPCrosstab5
    The macro, provided by the HowTo, is therefore working perfectly fine.
    Thanks though
    Dominik

Maybe you are looking for