cancel
Showing results for 
Search instead for 
Did you mean: 

How to find DM Package status programmatically from EPM Front End

mark_dean
Explorer
0 Kudos

Hi guys,

We have built an EPM Excel application whereby a user goes in and can change work status globally and in a more flexible way across multiple models. This is achieved from firing off the UJ_CUSTOM_LOGIC BADI which then runs a custom class to validate and update the Work Status.

In the EPM Front End we had a wait of 10 seconds, after firing off the above BADI. Then using the EPMWorkStatus function, the work status was re-checked and if different from the before status a success message was issued. If not change, i.e. an error then message was issued asking user to look at log i.e. Bottom up rule violated, User not an Owner / Manager etc.

The problem was after moving into Production, often the backend BADI was still running after the 10 seconds and of course then the EPMWorkStatus would return no change and a disconcerting error message. Tried increasing the Wait time but this is not that reliable. One time the BADI was still running after 30 seconds.

What I want to achieve is when receiving back the EPMWorkStatus function result and no change from previous work status, then to check if package is still running. If so, then wait, i.e. have a loop and repeat after a small wait before re-checking the EPMWorkStatus result. Only after the Package has stopped running and there has not been any Work Status update, then to display the error.

So, the question is how to read the backend UJD_STATUS table? Is it a case of utilising the EPMExecuteAPI Excel function and how to get the parameters.

Much appreciated for any help / suggestions.

Mark

Accepted Solutions (0)

Answers (2)

Answers (2)

mark_dean
Explorer
0 Kudos

Thanks very much Vadim. I will look into the way you suggested. Kind regards. Mark

former_member186338
Active Contributor
0 Kudos

Instead of custom logic badi you can use write back badi - with synchronous reporting of results.

In write back badi check for writing to some dummy member intersection to start work status change:

For example create account WSCHANGE and save data from Excel to this account (integer data - equivalent to required work status).

Write back badi will get this data before writing to the cube and will perform required WS change (your code).

In case of error you can program error message and it will be shown in Excel popup window or can be analyzed using VBA.

P.S. DM packages are running asynchronously - you can't get notification in Excel