on 2016 Aug 19 9:41 PM
Environment: SAP EPM 10.0 NW
We submit dimension member information as comment from workbook along with data, which will be used in the custom logic BADI to do further processing on that data.
We trigger the custom logic BADI in the default logic to process incoming data on the fly as they get submitted.
Even when data and comments get submitted , BADI doesn't see the latest comment when queried for processing from comment table.
Looks like the comment is not saved by the time default logic is triggered. Is our understanding correct, if so, how to read the in flight comment.
Appreciate your help and suggestions
~Dilkins
Request clarification before answering.
Hi Andrew,
If I remember well comments are saved before the custom logic badi code is executed.
What I believe is happening in your case is that you may have more than one entry for the same region, and your select is getting the first one (Oldest comment). Remember that comments are saved with a timestamp, which means it will keep all comments entered for that region. In that case, you need to get last timestamp. Therefore, select from the commentary table and then SORT by TIMESTAMP DESCENDING...
Cheers,
Lucas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right... I did not remember well.
But I knew I had achieve this in the past.. Looking at my stuff I found what I did to workaround this. I used a macro to "save twice the data" without the user notice... Andrew, you'll need to save a different value so I recommend using a "dummy" account to do this.
Private Sub saveData()
EPM.SetUserOption "HideSubmitWarning", True
EPM.SaveWorksheetData
Range("L58").Value = Range("L58").Value + 1
EPM.SetUserOption "HideSubmitWarning", False
EPM.SaveAndRefreshWorksheetData
End Sub
Nope,
If he saves it using the same region (Entity, Categ, Time...) only replacing account by the dummy account...
About the timestamp I did not get your point. Timestamp will be used only to get the latest version of comment within a data region...
When I used this approach, I used comments to update dimension members description through excel. So the users would type the description - that would be saved as comment and in the badi I'd update the member description.
If the point here is to use comments to send dimension properties to use in the calculation, there are better and more efficient ways using ABAP.
Of course not, and don't need to be..
As I said, "Use a dummy account"..
The dummy account is the trigger having all filters necessary to retrieve the rest of the information. The accounts with the comments are the accounts used in the calculation...
> Save the data and comments
> Skip the calculation (badi) if not trigger acc
> Save the trigger (dummy acc)
> Retrieve the data for the accounts needed in the calculation
> Retrieve comments from commentary table
> Calculate
Sorry but incorrect.
Sample:
You have report with 100 rows of Products with EPMSaveComment for each row.
User changed comments for 5 rows and launched VBA Save procedure.
5 comments will be saved.
Then dummy account for some single row will be incremented and saved.
BADI will not know the 5 Products to be updated.
Sorry but can be easily handled with vba as well... putting the dummy account in the expansion and using local members to identify the changed products.
After refresh -> copy values local members
After first save -> check which products are different then before
-> save against dummy to perform calculation
BADI "will know the 5 products".
Again, not ideal but possible. Things get more complicated if the input form has a big expansion.
"Looks like the comment is not saved by the time default logic is triggered. Is our understanding correct, if so, how to read the in flight comment."
It's correct and there is no badi to trigger when comment is saved.
The only way is to modify BPC code but I don't like this idea
P.S. And this question was discussed already in this forum...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 11 | |
| 11 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.