Skip to Content
avatar image
Former Member

Read package status from VBA

Hi guys,

Is there anyway to read the statuts package of an input form from VBA?

Thanks.

Amine

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Sep 20, 2017 at 11:56 AM

    You can read message only from write back badi:

    Option Explicit
    
    Public api As New FPMXLClient.EPMAddInAutomation
    Public submres() As FPMXLClient_OlapUtilities.SubmitResult 'Array!!!
    
    Public Sub SubmitData()
    Dim lngTemp As Long
    
    api.SetSilentMode True
    
    submres = api.SubmitWorkSheet(ThisWorkbook.Worksheets("Sheet1"))
    For lngTemp = 0 To UBound(submres)
        MsgBox CStr(submres(lngTemp).ErrorMessage)
    Next lngTemp
    
    api.SetSilentMode False
    End Sub
    Add comment
    10|10000 characters needed characters exceeded

  • Sep 20, 2017 at 10:32 AM

    There is no simple way to read package status from VBA! I have already answered this question and provided solution.

    In short:

    Create write back badi that will read package status if data is send to some special (dummy) combination of members.

    The badi will return error message containing status.

    VBA can read error message after data save.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 20, 2017 at 11:43 AM

    Hi Vadim,

    Thanks for your answer, how can i read this message error returned by the BADI from VBA?

    Let's say the message erros is : refresh failed

    Thanks.

    Amine

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 20, 2017 at 11:59 AM

    Thanks Vadim.

    Add comment
    10|10000 characters needed characters exceeded