cancel
Showing results for 
Search instead for 
Did you mean: 

VBA - Datamanager Runpackage Import Data Mnanagment issue

abhishja
Explorer
0 Kudos

abhishja abhishja0 seconds ago

Hi team,

I can not find https://www.sap.com/documents/2015/08/f8fac683-547c-0010-82c7-eda71af511fa.html as blank..

I need DatamanagerRunPacxkage Import path including Transformation file before running automatically (finish) and see the view status in VBA. Please help me to correct the code asap.

I tried my code but not working

Sub Runpackage()

Dim epm As New FPMXLClient.EPMAddInAutomation

epm.DataManagerRunPackage "Import", "Data Management", "HYPPLAN_SENG_TSG_AGM_BPC LoadFile_FY_122P12_24062022.txt", "GBL_FPADM", "DataFiles\FY22"

End Sub

Please see the below step by step, we need datamanagerRunpackage "Import", "Data Manangment", The file, Transformation File before running Automatically (Finish)....

Thanks,

Abhishek

Accepted Solutions (0)

Answers (6)

Answers (6)

abhishja
Explorer
0 Kudos

kindly response asap, Thanks

abhishja
Explorer
0 Kudos

Hi Vadim,

let me explain what we need to automate in VBA code.

-- Open Run package - > select Import - > Click Run - > select the file (HYPPLAN_SENG_TSG_AGM_BPC LoadFile_FY_122P12_24062022.txt) from Browse -> click Next > Select the transformation file (HYP PLAN\GBL_HYPPLAN_Trans_CORPACTUAL Category.xls) -> Click each Next - > Click Finish

Screen shot mentioned step by step in process.

the Below code mentioned as per your advise. Please correct if i might be wrong with code.

Sub Runpackage()

Dim epm As New FPMXLClient.EPMAddInAutomation

epm.DataManagerAdvancedRunPackage "System Files\Import.dtsx", "Data Management", "Load external ASCII data in standard format", "Import", "File", "Company (Public)", "0001", "C:\Users\TE276089\Downloads\HYPPLAN_SENG_TSG_AGM_BPC LoadFile_FY_122P12_24062022.txt"

'epm.DataManagerAdvancedCreateLocalResponseFile ""

End Sub

abhishja
Explorer
0 Kudos

Hi Vadim,

Sorry, i am just correcting First Parameters:- "System Files\Import.dtsx". Please advise

former_member186338
Active Contributor
0 Kudos

Sorry, didn't understand that you are working with BPC MS!

Please remove duplicate post.

abhishja
Explorer
0 Kudos

Kindly response asap Thanks

abhishja
Explorer
0 Kudos

Thanks for your reply and support. However i am getting the below error message pop up :-

The below Code: -

Sub Runpackage()

Dim epm As New FPMXLClient.EPMAddInAutomation

epm.DataManagerAdvancedRunPackage "HYPPLAN_SENG_TSG_AGM_BPC LoadFile_FY_122P12_24062022.txt", "Data Management", "Load external ASCII data in Standard format", "Import", "File", "Company (Public)", "0001", "C:\Users\XXXXX\Downloads\HYPPLAN_SENG_TSG_AGM_BPC LoadFile_FY_122P12_24062022.txt"

epm.DataManagerOpenViewStatusDialog

End Sub

My questions :-

First :- while clicking "Import" we have to select the source file and click next select the transformation file in same Import page before clicking Finished (first run option).

Please advise.

Thanks,

Abhishek

former_member186338
Active Contributor
0 Kudos

Sorry, but what do you mean by first parameter:

"HYPPLAN_SENG_TSG_AGM_BPC LoadFile_FY_122P12_24062022.txt"

???

Has to be DM package chain:

epm.DataManagerAdvancedRunPackage strChain, strPackageCroup, strPackageDesc, strPackage, "Process Chain", strTeam, strUserGroup, strAnswerFileName
epm.DataManagerAdvancedRunPackage "/CPMB/EXPORT_MD_TO_FILE", "Data Management", "Export Master Data to File Service", "Export Master Data to File", "Process Chain", "", "0001", strAnswerFileName
former_member186338
Active Contributor
0 Kudos

You want to pass prompt parameters to you DM package (2 text parameters).

first use: https://help.sap.com/docs/EPM_ADDIN/ec68e48b18a44a49abb12b8ee8ae306f/235df065d0174eb9afd1a2566e0bff5...

to create LocalResponseFile

Then use your vba code to generate the same file but replacing file name strings with values you want and saving the file locally.

After the file is prepared use:

https://help.sap.com/docs/EPM_ADDIN/ec68e48b18a44a49abb12b8ee8ae306f/3e6ef9778df24f969ba503557569d1c...


Alternative way is to use my code (will perform file generation):

https://blogs.sap.com/2017/06/16/simple-vba-function-to-pass-parameters-to-dm-packages/