Skip to Content
Author's profile photo Kodanda Pani KV

Process Chains triggering through Macro in Excel

Process Chains triggering through Macro in Excel

I have got requirement recently working on the Excel based process chains. Everyday new records will be added into the excel sheets and we need to trigger all these files into the BW server through process chain automatically. As we have all these Excel files in the desktop.

I found the solutions

1. Save the files in AL11 (SAP Directories) by using the below function modules.



If we use the above FM you have develop the ABAP program in SE38.

2. Writing the logic in Excel Macro. (No need ABAP Program)

Select the excel sheet go to view menu -> select the Marco -> click on Marco->

Create the new Macro -> give the new Macro name -> select Macro

Next screen will appear.


Sub saveSheetsAsCSV()

Dim i As Integer

Dim fName As String

Application.DisplayAlerts = False

For i = 1 To Worksheets.Count

fName = “D:\usr\sap\DEV\DVEBMGS03\work\STAFFING_PROJECT\ ” & i

ActiveWorkbook.Worksheets(i).SaveAs Filename:=fName, FileFormat:=xlCSV

Next i

End Sub

above code will convert xls format to csv format automatically while running the Macro by user

user will update the excel sheets and every day they will run the Macros

It will automatically overwrite the records while running the Macro in excel.

We saved the excel sheet in AL11 – SAP Directories.

Check the data source path – AL11 Directories


Note: I am not explaining the how to create the DSO, CUBE, Process chains.

Please look at the Process chains daily scheduling.

Process chain triggered daily once a day and every day it will load full. I used the delete PSA request and

delete data target content form cube before loading to cube

Check the daily scheduling

in start process i given the time every morning 6:00 AM.

Hope it will help.



Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo M Tibollo
      M Tibollo


      maybe I misunderstand the tittle of the post, but I don't see where in the xls/macro you trigger the chain. No action is set in your example, hence no chain is triggered, i would think. So, can you please explain where the chain is triggered, or maybe change the tittle if you can't.



      Author's profile photo Phani KV
      Phani KV
      Blog Post Author


      End user will run the Macro in excel it will automatically convert to XLS to CSV  format.

      we have shared drive user will put all excel sheets there only.

      process chain will trigger through start variant and i add screen shot please check.



      Author's profile photo M Tibollo
      M Tibollo

      ok got it. The tittle of the blog is not reflecting the content.

      according to the tittle i would expect a macro raising an event in BW or something similar...



      Author's profile photo Phani KV
      Phani KV
      Blog Post Author

      Thanks for asking Mr Tibollo.

      Macro not raising an event. in process chain i am not created an is simple process chain.

      user will run the macro it will automatically convert to XLS to CSV format.

      all files i saved in the AL11 - SAP directories.



      Author's profile photo Former Member
      Former Member


      It looks like Blog line and content is entirely different.



      Author's profile photo Ilse Van Loocke
      Ilse Van Loocke

      Title is very confusing and not compliant with the content 🙁

      Any idea if it is possible to trigger a process chain through a macro in Excel?