SAP BW - Functions AfO Upload BAdI for BPC explained

Chris

Written By: Chris - 23 February 2024
(updated on: 05 July 2024)

Users who use SAP Business Planning and Consolidation (SAP BPC) together with Analysis for Office (AfO) have the option of uploading local CSV files to planning applications using the BPC planning function "Upload files from AO" (0RSPL_FILE_UPLOAD_AO). We have explained how this works in detail in the article "Planning function 'Upload files from AO' explained". In this article, we take a look at the BAdI BADI_RSPLFA_FILE_UPLOAD. This allows the CSV file to be customised using the ABAP programming language.

The BAdI allows access to the filter values, the file name and the values contained in the file. The following parameters are available.

Parameters

Type

Type Description

I_R_MSG

Importing

 Messages

I_SRVNM

Importing

Name of the executed planning function

I_INFOPROV

Importing

Name of the aggregation level

I_T_DATA_CHARSEL

Importing

Contains the filter values

I_T_DATA_NODE_SEL

Importing

Hierarchy Information of the filter

I_FILENAME

Importing

The relative file path with the file name

C_TH_FILE

Changing

The values contained in the file

 

However, it must be admitted that this information is only of limited use. If the filter values are unique, i.e. only one value has been defined per InfoObject in the target ADSO, these are filled automatically from SAP BW7.5 SP23 at the latest. It is not necessary to use the BAdI for this.

Derivation of values via characteristic relationships

The BAdI is also less suitable for the automated derivation of values, as SAP has a dedicated tool for this with the characteristic relationships. You can choose between various options. You can implement characteristic relationships using ADSOs, hierarchies, attributes or exit classes. In the first variant, the relationships between the characteristics are stored in an ADSO. The derivation is based on the defined combinations. Alternatively, an existing hierarchy can also be used. This must contain external characteristics. When deriving via attributes, existing master data is used for derivation. All these options utilise the standard SAP functions and do not require any programming.

Finally, customised implementation with customer-specific logic is also possible within the characteristic relationships. This allows maximum flexibility and can be implemented with ABAP or SQL Script. Thanks to the built-in buffer mechanism, a higher performance is achieved than with the Upload BAdI. In the case of realisation via SQL Script, you benefit from direct execution on the HANA database.

Possible uses of the BAdI

In practice, the BAdI is used to read the file name, as this can contain information about the entity to be uploaded, such as country or company, based on a defined naming convention. In this case, the BAdI could be used to read the file name, derive the entity and fill the corresponding field in the ADSO.

Unfortunately, the BAdI is not able to check and automatically correct the values contained in the file. This is because the values contained in the file are validated by the system against the master data before the BAdI is executed. If the values are incorrect, an error occurs and the BAdI is not even executed.

NextTables as an alternative

If you have such requirements for an upload process, our NextTables tool could provide a remedy. It is an SAP add-on that is fully integrated into the SAP landscape and requires no additional hardware. NextTables supports all ADSO types as well as normal tables. One of the core functions of NextTables is a flat file upload via an intuitive user interface. Thanks to the user-friendly operation, the upload can be carried out by users from the business department without the involvement of the IT department.

2024-02-23-nexttables-import-dialog

                                                  Import options in NextTables


SAP Planning Tools compared!
Download the whitepaper here! 

Neuer Call-to-Action


Typical problems with uploading

Experience has shown that there are often problems with the content of the files during upload. For this reason, NextTables includes various checks as standard and others can be implemented on a customer-specific basis using the BAdI (Business Add-In) provided. For example, currency and measurement units can be automatically removed from the key figures. It is also possible to recognise whether a description is imported instead of the key and then replace it with the correct key. If no value with the imported description is available, a fuzzy search algorithm can also be used to search for a value with a similar description. The user is notified of the changes made and can either accept them or adjust them manually.

Upload process in NextTables

angular-import-de

       NextTables Import from Excel

Thanks to the integrated status display, you always have an overview of the current import process. This is particularly helpful for large files with many values.

                                Uploading large files to NextTables

As soon as the upload has been successfully completed, you will receive a comprehensive overview of all the steps performed and the validation results. You also have the option of activating or deactivating the master data check as required with just one click. The validation results can also be conveniently downloaded as an Excel file.

                     Validation results of the import


Validation results

If errors occur during an import, you will immediately receive a detailed overview of all errors and warnings. This saves you the time-consuming search for errors. With smaller files in particular, you have the option of correcting the errors immediately, which speeds up the import process considerably. In contrast to Analysis for Office Upload, you do not have to cancel the import to correct the source file, but can continue with the import process seamlessly after correcting the error.

Particularly noteworthy is the option to adjust the import settings, such as decimal separators and thousands separators, directly during the upload. These settings can also be saved in the user profile and used automatically the next time.

2020-08-30_09_12_23-user-settings                   User settings in NextTables

 

NextTables also offers the following advantages:

  • Possibility to import from files (Excel and CSV) as well as from the clipboard with immediate validation report
  • Warning for existing data records with the same key
  • Import dialogue that can be integrated either as a stand-alone display or in any table view
  • Variable assignment of InfoObjects to file columns
  • Formatting independence through automatic column recognition via the column header
  • Download of an Excel template in the appropriate format for import
  • Inline editing, search help and fuzzy search

If a smooth upload process is important to you and you are looking for a simple and freely configurable solution, NextTables could be a suitable alternative for you.

AfO Upload BAdI for BPC and an alternative - Our conclusion

This blog article looks at the use of the BAdI BADI_RSPLFA_FILE_UPLOAD in SAP BW. When uploading CSV files, this enables this data to be customised using ABAP programming. However, it has been shown that the BAdI provides very little added value in many cases, as many scenarios are already covered by automated SAP functions or dedicated tools such as characteristic relationships. For specific customisations, NextTables offers an integrated solution with comprehensive validation options and user-friendly operation. With functions such as automatic error correction, customisation of import settings and variable assignment of InfoObjects, NextTables offers an efficient alternative for a smooth data upload process.

Do you have questions about planning topics, NextTables or any other topic? Simply get in touch with us - we look forward to exchanging ideas with you!

Learn all about SAP BPC

Topics: Master Data & Data Import in SAP BW, SAP Planning

Share article