Showing results for 
Search instead for 
Did you mean: 

Two functionalities on the click of SAVE Button in the Planning Layout

0 Kudos

Dear all,

Please share your experience with me if you have had a similar requirement.

I have a Save button and a calculate button on a planning layout.Now the requirement is to include the functionality of the calculate Button in the SAVE button.

I have come accross a How-to Guide which talks about including a Global planning sequence after clicking a SAVE Button and Before executing the layout.

But how do i implement the same for including the functionality of another button (calculate) instead of the global planning sequence.

Your suggestions will be of great help to me.



Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ramya

In my case i hv created a global planning sequence of the function and made it to execute after saving.

Chirag S

Former Member
0 Kudos

Hi Ramaya,

If you would like to continue with your BSP Exit Class, then hope this would help you further!

In your Exit class create a variable (say lr_fun_cal) of referencing to your "Calculate" Function button! (Best would be to get reference one time in the LOAD method for the entire duration of your BSP-Session)

In the dispatch method check for the save Event and call the execute method of the function variable (lr_fun_cal).

Best regards!


Former Member
0 Kudos

Hi Ramya,

you could try to use some javascript:

<script language="JavaScript" type="text/javascript">
  function SetC()
  'Set a cockie to save data on refresh
  document.cookie = "save=true";

  function CheckC()
  'Checks if data should be loaded

    var temp=document.cookie;
    if(temp.substr(pos+6,4) == "true")
      document.cookie = "save=wrong";

  'Calls Check function on load

<div style="position:absolute; top:0px; left:12px; width:140px">
<a href="#1" onclick="javascript:SetC();bspSubmit('Calculate');" class="sapBtnStd" OnMouseOver="javascript:window.status = 'Save Data'; return true;" title="">
<nobr>Save Project Data</nobr>

You need to create a FunctionButton calling your 'Calculate'-function with Visible=false.

Also the SaveButton has to be included in the Web Interface. But you should hide it with 2 HTML-components containing the beginning of HTML-comment ('<!') and the end of the comment ('>')

I hope, I could help.

Please ask if you need some more comments on the coding...

Best regards