reyemsaibot

SAP BI Blog about SAP BW/4HANA, Analysis for Office and SAP HANA - by Tobias Meyer

Start a Process Chain by VBA

If you want to start a Process Chain and you maybe haven’t got the rights in the BW, you can start a Process Chain by VBA. Use the following source code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
Private Sub PC_Start()

Dim FUBA_PC As Object 'Variable function module
Dim T_I_Options As Object 'Variable rfc_read_table options
Dim T_I_Fields As Object 'Variable rfc_read_table fields
Dim T_E_Data As Object 'Variable rfc_read_table data
Dim retn As Boolean 'Variable return value

'function module Process Chain start
Set FUBA_PC = R3.Add("RSPC_CHAIN_START")
With FUBA_PC
  .exports("I_CHAIN") = "TECHNICALNAME" 'Name of the Process Chain
End With

'Run function module
retn = FUBA_PC.Call
Set T_E_Data = Nothing
Set T_I_Fields = Nothing
Set T_I_Options = Nothing

End Sub

author.


I am Tobias, I write this blog since 2014, you can find me on twitter and youtube. If you want you can leave me a paypal coffee donation. You can also contact me directly if you want.

Kommentare

2 Kommentare zu „Start a Process Chain by VBA“

  1. Avatar von Artur
    Artur

    Thx for the Code! But you forgot this line „Set R3 = CreateObject(„SAP.Functions“)“

  2. Avatar von Tobias
    Tobias

    Hi Artur, you are right. Thanks for the hint. Best regards, Tobias

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert