on 12-14-2016 4:47 PM
Hi,
In Design Studio 1.6 we have a button raising a planning sequence and save data.
In the planning sequence we do some checks (eg amount negative) and in that case we raise an error message. I would like to prevent the command save to be run if some errors occurs in the planning sequence. How could I achieve this in DS ?
thanks in advance
Mat
Hi,
I tested the following code behind a button and it worked.
PS_1.execute();
if ((PS_5.execute()== false)) {
APPLICATION.alert("error in PS"); }
else{ Planning.save();
APPLICATION.alert("Data saved"); }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Thanks for your answer. I don't think it will solve my issue. And I do not want to have abap function as planning sequence does the job.
My planning sequence has three steps :
- calculate depreciation
- Check that no negavite amounts have been input
- calculate currency conversion
If I use it as is in Design Studio, data are saved even if the second step is in error. That's why I was looking for a way to retrieve messages and prevent from saving in case of error messages. We did that in Analysis for office the following way (VB) :
Sub Depreciation()
Dim lResult As Long Dim
lResult1 As Variant lResult = Application.Run("SAPExecutePlanningSequence", "PS_1")
lResult1 = Application.Run("SAPListOfMessages", "ERROR")
If IsArray(lResult1)
Then If UBound(lResult1) > 0 Then 'MsgBox ("Planning Function ended with error")
Exit Sub
End If
End If
lResult = Application.Run("SAPExecuteCommand", "PlanDataSave")
End Sub
Mat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi FR ALTI,
For planning through design studio, you must have planning functions with predefined code that does writing data to your cube and more.
Those functions will call the ABAP codes written in it in BW.
So if you have added the code to check data as first step and terminate it with error if negative there is no need to define a sequence.
Or if you have the check as separate function in BW, you can add a if..else in code and call the write function in planning only when the check is successfull.
Thanks,
Poovarasan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please see blog https://blogs.sap.com/2014/05/29/planning-in-ds-13-using-different-script-methods-for-planning/ - in theory you could place some IF statements to check for these conditions and show application alerts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.