
Applies to:
SAP BPC 7.5 / SAP BW 7.3x
Summary:
This document is a step by step guide to implement a BPC Data Manager Package to download data to a FTP server
Author(s) : Lijo John
Company : Infosys Limited
Created on : 09 August 2013
Author Bio:
Lijo John works as Senior SAP Consultant with Infosys Limited. He has 7 years of experience in IT Consulting Industry and during this time he has worked majorly on SAP NetWeaver BW, Business Objects and BPC. He has worked on multiple implementation projects.
Table of Contents
We have a SAP delivered Data Manager package in BPC 7.5 for uploading flat file data into a BPC application directly from an FTP server. However a similar standard package for downloading data directly into an FTP server in flat file format is currently not available. This document tries to address this limitation by providing a step by step guide to create a custom data manager package to implement this functionality.
Before getting into the details of the custom package, let’s look into the standard ways of downloading transactional data in BPC 7.5.
The two standard approaches of exporting transactional data to a flat file in BPC 7.5 are…
Approach 1 : Export transactional data to file service and then download to local computer
Approach 2: Export transactional data to the backend BW application server and then download to local computer through BW transactions/Database level file transfer
Limitations
The idea here is to create a flexible BAdI based custom data manager package that can overcome the above said limitations and download data directly to an FTP server.
Key functionalities of the custom package
Limitations of the custom package
Login to your BPC excel client and create a new data manager package as shown below.
Once the package is created and saved, open the package again with modify option as shown below and navigate to the advanced section
Copy paste the below PROMPT and TASK definitions into the editable area in the advanced section.
PROMPT(SELECTINPUT,,,,"GEOGRAPHY,PRODUCT,YEAR")
PROMPT(TEXT,%FTPLOC%,"FTP Server :")
PROMPT(TEXT,%FTPUSR%,"FTP User ID :")
PROMPT(TEXT,%FTPPASS%,"FTP Password :")
PROMPT(TEXT,%FOLDER%,"Folder to save the files :")
PROMPT(TEXT,%FILENAME%,"File name to use :")
PROMPT(RADIOBUTTON,%NUMREC%,"Maximum Number of Records Per File :",1,{"1 Million"," 0.75 Million"," 0.5 Million"},{"1","2","3"})
PROMPT(RADIOBUTTON,%DELIM%,"Delimiter to use :",1,{"COMMA"," SEMICOLON"},{"1","2",})
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(/CPMB/G_D_M_TD_NC_SMP_WSO_LOGI,TAB,%TAB%)
TASK(/CPMB/G_D_M_TD_NC_SMP_WSO_LOGI,EQU,%EQU%)
TASK(/CPMB/G_D_M_TD_NC_SMP_WSO_LOGI,SUSER,%USER%)
TASK(/CPMB/G_D_M_TD_NC_SMP_WSO_LOGI,SELECTION,%SELECTION%)
TASK(/CPMB/G_D_M_TD_NC_SMP_WSO_LOGI,SAPPSET,%APPSET%)
TASK(/CPMB/G_D_M_TD_NC_SMP_WSO_LOGI,SAPP,DEMO_APPLICATION)
TASK(/CPMB/G_D_M_TD_NC_SMP_WSO_LOGI,LOGICFILENAME,FTP_DOWNLOAD.LGF)
TASK(/CPMB/G_D_M_TD_NC_SMP_WSO_LOGI,REPLACEPARAM,FTPLOC%EQU%%FTPLOC%%TAB%FTPUSR%EQU%%FTPUSR%%TAB%FTPPASS%EQU%%FTPPASS%%TAB%FOLDER%EQU%%FOLDER%%TAB%FILENAME%EQU%%FILENAME%%TAB%NUMREC%EQU%%NUMREC%%TAB%DELIM%EQU%%DELIM%)
Once done, click OK and Save the package as shown below.
Login to the BPC Administration client and navigate to the script logic section of the application for which the package is being developed.
Create a new script logic as shown below.
Copy paste the below script logic definition into the editable area. Once done validate and save the logic as shown below.
*START_BADI FTP_DOWNLOAD
QUERY = OFF
WRITE = OFF
CHKOPT = $CHKOPT$
FTPLOC = $FTPLOC$
FTPUSR = $FTPUSR$
FTPPASS = $FTPPASS$
FOLDER = $FOLDER$
FILENAME = $FILENAME$
NUMREC = $NUMREC$
DELIM = $DELIM$
*END_BADI
In SE19 transaction, navigate to your enhancement spot for Custom Logic BADIs and click change
Create a new custom logic BAdI implementation by following the steps below
Click create BAdI implementation button
Provide the details as shown below. You can chose your own BAdI implementation name and class name.
Set the Implementation as Active
Create a filter value for the BAdI. The filer Value should be same as that of the BAdI name mentioned in the Script Logic START_BADI Keyword.
Once done Activate the BAdI.
Create an Implementation for the method as shown below.
You would be prompted to enter the method definition/Code. Copy paste the code that is provided in attachment 'FTP Download ABAP Code snippet.txt'.
Check for errors if any and correct them.
Activate the BAdI Implementation and the Enhancement Spot.
Running the new Data Manager Package
FTP Server : Name of the FTP server.
FTP User ID : User ID that has access to connect to this FTP server and save files
FTP Password : Password to connect to the FTP server with above user id
Folder to save files : The folder in the FTP server in which the files needs to be saved. This folder needs to be created before running the package
File name to use : Name of the target file in the FTP server that needs to be created/replaced with the data export
Maximum number of records per file : Allows the data export to be split into multiple manageable small files of desired number of records
Delimiter to use : Allows to select a COMMA or SEMICOLON as delimiter for the file
**You can always enhance the code to add more options like a PIPE separator etc.
The actual selection of the data that needs to be exported.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |