cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

EPMAddInDMAutomation Objects Not Recognized In AO?

former_member523998
Participant
0 Likes
704

Is there a trick to defining an EPMAddInDMAutomation object in AO?

I have a customer with an issue similar to this post where the API EPMAddInDMAutomation is not working in AO 2.7.x. This issue does not exist in EPM.

The error shown below would indicate that the object is not set correctly:

The method being used to set this object is:

Dim dBase As New FPMXLClient.EPMAddInDMAutomation

This seems to work properly as the object instantiates with the expected properties and variables. However, when it executes the line of code where the API is supposed to run a package, the above error is thrown.

Strangely, when I create the most frequently used object of EPMAddInAutomation, I receive the same error. This isn't a problem because I'm creating this object similar to vadim.kalinin " Universal Code" to generate this object. However, when I declare a different class such as ADMPackage (shown below), it works as expected.

Dim eeADM As New FPMXLClient.ADMPackage

eeADM behaves as expected with Debug.Print returning defined .FileName

I have tried some round-about hacks without any success such as the following:

Set dBase = cofCom.GetPlugin("com.sap.epm.FPMXLClient.EPMAddInDMAutomation")

My objects' library shows no difference between these classes, which leads me to believe that this blog from 2017, may be correct in saying that EPMAddInDMAutomation is simply not available in AO.

Here's more screenshots and a subset of my code if useful.

If anyone has any suggestions, I give 👍 to almost anyone who replies. Thanks.

Sort of what my code is.......

Private Sub ExampleDataPackage()

Dim iLoveRussia_ADM As New FPMXLClient.ADMPackage
Dim aFileName As String: aFileName = "thisisCorrect"

'iLoveRussia_ADM responds as expected with commands 
'such as debug.print iLoveRussia_ADM.Filename

With iLoveRussia_ADM
    .Filename = "afilename"
    .groupId = "Group id"
    'etc
End With

Dim dbase As New FPMXLClient.EPMAddInDMAutomation

    'error is thrown on next line even though 
    'VBA is recognizing the object type by pre-populating Dbase properties
    dbase.RunPackage iLoveRussia_ADM, aFileName

End Sub

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor

Simple answer: why do you need EPMAddInDMAutomation at all?

In my blog https://blogs.sap.com/2017/06/16/simple-vba-function-to-pass-parameters-to-dm-packages/ I have updated the code to work only with EPMAddInAutomation using function: DataManagerAdvancedRunPackage

former_member523998
Participant
0 Likes

You're correct! I can't see a need for EpmAddInDMAutomation with DataManagerAdvancedRunPackage. I wasn't aware of this API, looks like it came out in December of 2017. I should really read the updates...

Answer accepted. Thanks for replying on a weekend!

Answers (0)