cancel
Showing results for 
Search instead for 
Did you mean: 

BPS - Executing planning function with SAVE

Former Member
0 Kudos

We are trying to use BPS for a slightly different purpose. We need a front-end to enter sonme data into a transaction cube. The issiue we are facing is we wish to execute a plnning function just before SAVING without having the user press any other button. Could anybody tell me if that is possible & how it can be achieved.

Would appreciate any help.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

you can create a planning sequence, put your planning function before the save function.

The save function hould be user exit which is include the FM UPC_FUNCEXEC_SAVE.

Regards,

Former Member
0 Kudos

We have created a planning sequesnce. But I am not clear about how we can call the SAVE function. Could you explain that please ? We are using the Standard Save function thru the Web Interface Builder.

Former Member
0 Kudos

You could include the planning function in the folder & change it's attributes as "Execute Funciton before layout display" or "Execute function before layout change" as per your requirements.

You could use planning funciton as automated planning funciton in the LAYOUT BUILDER also.

Should the results (from automated planning function) be visible to users?

It all depends on your scenario. we could answer more if you could elaborate more on your scenario.

Former Member
0 Kudos

Actually, what we are trying to do is perform some validations before the user can Save what is entered. The validations are quite simple e.g. User is required to enter 2 dates - From & To . One of the validations is To Date must be >= From Date. The problem is if it a valid date the user can still Save his entry. We want the validations to be performed when the user hits Save & give an error message if the validation fails. We are using a fox formula function to perform the validations.

Former Member
0 Kudos

Anita,

You just need to include fox formula planning funciton in the folder & make it's function attributes as "Execute funciton before layout change".

I just tested same sceanrio but in SAP GUI not in web & it works fine.

lemme know if it doesn't work for you.

hope it helps.

Former Member
0 Kudos

Thanks a lot. That solved our problem. We actually changed the attributes to 'Execute function before saving'.

Former Member
0 Kudos

Hi Anita,

Looking at the scenario you describe, I am afraid your error message from FOX is not going to prevent saving even if validation fails, because the value is still valid by SAP criteria. Also, multiple planning steps could have been carried out before the validation. You are dealing with the entire buffer. Usually it would take a custom FM to handle this. Please share your method if it works.

William

Former Member
0 Kudos

Hi William,

The method worked but only in the SAP GUI. When we Web-enable the planning folder , it switches the function attribute to 'Execute function as a Push Button' even though we select 'No' when it pops up a message for adjusting.

To answer your question below, a hard error in the fox formula prevents the save so that part works.

Former Member
0 Kudos

In your message in FOX, if you use E(rror) it would not save. I(nformation) or W(arning) would allow allow save.

Former Member
0 Kudos

Mary,

Could you explain a little more? Sorry but i am new in BPS.

Former Member
0 Kudos

I have to apply this functionality to save my Web Planning Folder after the execution of a function which is a fox formula.

I call the function UPC_FUNCEXEC_SAVE at the end of my Fox Formula as explain above but the save is not complete... Or I have wrong ?

************************************************************

                                  • Save Planning Data *******************

************************************************************

FLAG = ' '.

CALL FUNCTION UPC_FUNCEXEC_SAVE

EXPORTING

I_NO_TRANSACTION_DATA = FLAG

  • IMPORTING

  • ET_MESG =

  • ET_MESG =

.

Could you help me?

Thanks in advance,

Ramak

Former Member
0 Kudos

Why don't you guys use the "best practice" described in the how-to document

"How to Run Planning Sequences on Save and Other Events -WEB"?

In the planning sequence you can put a validation function which is e.g. a FOX. It works!

Hope it helps!

Regards, Aki

Answers (2)

Answers (2)

Former Member
0 Kudos

Is there a way to execute the function after save?

This option 'Execute function before saving' could be great but i need to execute function after save.

The function i made move data from a transactional cube (Tx) to another cube and if the data is not save the function dont send data.

Former Member
0 Kudos

Hi Anita,

How would the system know it is time to execute the function?

William

Former Member
0 Kudos

When SAVE is executed.