on 2020 May 22 5:36 AM
Hi,
I use AFO for BI IP solution. I have a SAVE Button and the macro executes following 3 steps:
1. SAVE Data
2. Planning Sequence
3. SAVE Data
After each Step BICS_PROV_GET_RESULT_SET ist called for the whole Workbook (3 Queries) - and therefore the performance is not the best.
How can I avoid e.g. the first 2 calls of BICS_PROV_GET_RESULT_SET as from my point of view it would be only necessary after the last step?
I tried to use "SAPSetRefreshBehaviour" with parameter "OFF" before 1. Step and with "ON" after 3rd step, but it had no effect.
Best regards
Gunter
Hi, sorry, here is the macro:
******************************
Sub ART_GRP_SAVE()
Dim lResult As Long
Dim lResult1 As Variant
lResult = Application.Run("SAPSetRefreshBehaviour", "Off")
'1. Save data
lResult = Application.Run("SAPExecuteCommand", "PlanDataSave")
'2. distribute data
lResult = Application.Run("SAPExecutePlanningSequence", "PS_1")
'check if PS_1 was successful
lResult1 = Application.Run("SAPListOfMessages", "ERROR")
If IsArray(lResult1) Then
If UBound(lResult1) > 0 Then
MsgBox ("Distribution to material level ended with error (Planning Sequence PS_1)")
Exit Sub
End If
End If
'3. If step 2 successful: Save data again
lResult = Application.Run("SAPExecuteCommand", "PlanDataSave")
lResult = Application.Run("SAPSetRefreshBehaviour", "On")
End Sub
******************************
I added the "SAPSetRefreshBehaviour" command, but in RSTT I can see that BICS_PROV_GET_RESULT_SET is still executed. The only effect I can see is that BICS_PROV_GET_DATA_CELL_MASK is not executed during OFF phase.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.