cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Where is the byte file saved using BPC 10.1 Function Download EPMAddInDMAutomation

former_member652218
Discoverer
0 Kudos
347

Try to use the subject download function through VBA code:-

Function Download(module As String, subModule As String, subFolder As String, FileName As String, [_teamId As String]) As Byte()

Where is this Byte file saved? How to convert byte file into txt file and save into a designated file path?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member186338
Active Contributor
0 Kudos

Sorry, but looks like you are using very old epm client SP. In my current epm download is available in EPMAddInAutomation

And it's the correct way to download file.

How to save byte atray to file - easiest thing, why not to search Google yourself?

P.S. saving byte atray to file has no relation to EPM, it's a generic VBA knowledge.

former_member652218
Discoverer
0 Kudos

True, not hard to google to find answer on how to save byte into txt file, just need two steps 1. convert byte into string 2. Print to output file (can't use write which includes quotation mark). Code I used below achieves results expected:-

bytfile = objDMautomation.Download("DATAMANAGER", "DATAFILES", "", DL_FILE(I), "")
Strfile = StrConv(bytfile, vbUnicode)
Open UP_FILE For Output As #1
Print #1, Strfile
Close #1

former_member186338
Active Contributor
0 Kudos

yuhuangli

Have to repeat - using EPMAddInDMAutomation Download is a wrong approach! It's a not supported and not documented function.

If you try to use it with AO instead of standalone EPM client - it will not work!

Why not to use documented Download presented in EPM SP32????

https://help.sap.com/viewer/ec68e48b18a44a49abb12b8ee8ae306f/10.0.34/en-US/45f88fe9bf704eceb11664287...

New APIs to Manage Files on the Server

former_member186338
Active Contributor
0 Kudos

But why not to use another Download subroutine defined in FPMXLClient.EPMAddInAutomation:

Dim epm As New FPMXLClient.EPMAddInAutomation

epm.Download "C:\somefolder\ttt1.txt", "DATAMANAGER", "DATAFILES", "\", "acc1.txt"

It will download file directly to the local path!

former_member652218
Discoverer
0 Kudos

Thanks. In my EPMAddInAutomation, I did not find Download available. Only in EPMAddInDMAutomation.

former_member186338
Active Contributor
0 Kudos

"Where is this Byte file saved?" - in memory 🙂

Dim epmDM As New FPMXLClient.EPMAddInDMAutomation

Dim bytFile() as Byte

bytFile=epm.Download("DATAMANAGER", "DATAFILES", "\", "acc1.txt")

Then you can save Byte array to file...

P.S. Read my answer: https://answers.sap.com/questions/212643/epm-data-manager-download-data-vba.html

former_member652218
Discoverer
0 Kudos

Thanks. Can you share how to save byte array to a txt file? I read through the link you provided, and I did not find the answer.