cancel
Showing results for 
Search instead for 
Did you mean: 

Automate file uploading process in BPC

former_member590808
Participant
0 Kudos

Hello,

Is it possible to automate the file uploading process which we do from data manager in BPC ? Can we automate this via a macro ? We have a requirement that a csv file named prov_2020_07 stored in a folder called /Provisions gets automatically uploaded via the macro.

I have written below line of code which triggers the upload file prompt automatically but the user still has to click browse and fetch the file and upload on server folder. Can we automate that part too ?

Sub upload()
Dim cofCom As Object
Dim epm As Object
Dim api As Object
Set cofCom = Application.COMAddIns("SapExcelAddIn").Object
cofCom.ActivatePlugin ("com.sap.epm.FPMXLClient")
Set epm = cofCom.GetPlugin("com.sap.epm.FPMXLClient")

epm.DataManagerOpenFileUploadDialog
epm.DataManagerRunPackage "IMPORT", "Data Management", ""
epm.DataManagerOpenViewStatusDialog

End Sub

Regards,

Neha

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Just define the network folder in AL11.

Then you will be able to import data directly from the file located in AL11 folder. And you can use vba macro. I have written about it number of times.

former_member590808
Participant
0 Kudos

i have tried to automate the import process by writing below macro. My doubt was suppose this file is opened in user machine, will the user execute step by step package once initially so that the local response file gets created in his machine at the mentioned path and executions post that will not have any prompts . ?

Sub upload()


Dim cofCom As Object
Dim epm As Object
Dim api As Object
Set cofCom = Application.COMAddIns("SapExcelAddIn").Object
cofCom.ActivatePlugin ("com.sap.epm.FPMXLClient")
Set epm = cofCom.GetPlugin("com.sap.epm.FPMXLClient")
Dim filesPath(0) As String

filesPath(0) = "D:\Provision Automation\\Upload file.csv"
epm.DataManagerFilesUpload "", "PROVISIONS", filesPath
epm.DataManagerAdvancedCreateLocalResponseFile "/CPMB/IMPORT", "Data Management", "Import", "IMPORT_V2", "Process Chain", "", "0001", "D:\Provision Automation\\Test.xml"
epm.DataManagerAdvancedRunPackage "/CPMB/IMPORT", "Data Management", "Import", "IMPORT_V2", "Process Chain", "", "0001", "D:\Provision Automation\\Test.xml"

former_member186338
Active Contributor
0 Kudos

nehayadav0911

Sorry, but I am unable to understand what you are doing...

Search my posts about import from A11 path!

Are you able to manually load transaction data from the file in AL11?

If yes, then write a macro.

Answers (1)

Answers (1)

maulik
Contributor
0 Kudos

Neha,

Yes you can do it. It's pretty straight forward.

1) Create / Define an event in SAP BPC using tcode SM62.

2) Your script should execute an "event" Get more info on events here .

3) In SAP BPC you should schedule job that is "event" based from tcode SM36.

So when an event is triggered, the background job will automatically execute and load the file.

I would recommend that you add a notification when the job completes. SM36 has a button to specify the email recipient.

Drop a note here if you require more information.

former_member186338
Active Contributor
0 Kudos

Sorry, but your answer is not related to the question...