Skip to content
NextLytics
Megamenü_2023_Über-uns

Shaping Business Intelligence

Whether clever add-on products for SAP BI, development of meaningful dashboards or implementation of AI-based applications - we shape the future of Business Intelligence together with you. 

Megamenü_2023_Über-uns_1

About us

As a partner with deep process know-how, knowledge of the latest SAP technologies as well as high social competence and many years of project experience, we shape the future of Business Intelligence in your company too.

Megamenü_2023_Methodik

Our Methodology

The mixture of classic waterfall model and agile methodology guarantees our projects a high level of efficiency and satisfaction on both sides. Learn more about our project approach.

Products
Megamenü_2023_NextTables

NextTables

Edit data in SAP BW out of the box: NextTables makes editing tables easier, faster and more intuitive, whether you use SAP BW on HANA, SAP S/4HANA or SAP BW 4/HANA.

Megamenü_2023_Connector

NextLytics Connectors

The increasing automation of processes requires the connectivity of IT systems. NextLytics Connectors allow you to connect your SAP ecosystem with various open-source technologies.

IT-Services
Megamenü_2023_Data-Science

Data Science & Engineering

Ready for the future? As a strong partner, we will support you in the design, implementation and optimization of your AI application.

Megamenü_2023_Planning

SAP Planning

We design new planning applications using SAP BPC Embedded, IP or SAC Planning which create added value for your company.

Megamenü_2023_Dashboarding

Dashboarding

We help you with our expertise to create meaningful dashboards based on Tableau, Power BI, SAP Analytics Cloud or SAP Lumira. 

Megamenü_2023_Data-Warehouse-1

SAP Data Warehouse

Are you planning a migration to SAP HANA? We show you the challenges and which advantages a migration provides.

Business Analytics
Megamenü_2023_Procurement

Procurement Analytics

Transparent and valid figures are important, especially in companies with a decentralized structure. SAP Procurement Analytics allows you to evaluate SAP ERP data in SAP BI.

Megamenü_2023_Reporting

SAP HR Reporting & Analytics

With our standard model for reporting from SAP HCM with SAP BW, you accelerate business activities and make data from various systems available centrally and validly.

Megamenü_2023_Dataquality

Data Quality Management

In times of Big Data and IoT, maintaining high data quality is of the utmost importance. With our Data Quality Management (DQM) solution, you always keep the overview.

Career
Megamenü_2023_Karriere-2b

Working at NextLytics

If you would like to work with pleasure and don't want to miss out on your professional and personal development, we are the right choice for you!

Megamenü_2023_Karriere-1

Senior

Time for a change? Take your next professional step and work with us to shape innovation and growth in an exciting business environment!

Megamenü_2023_Karriere-5

Junior

Enough of grey theory - time to get to know the colourful reality! Start your working life with us and enjoy your work with interesting projects.

Megamenü_2023_Karriere-4-1

Students

You don't just want to study theory, but also want to experience it in practice? Check out theory and practice with us and experience where the differences are made.

Megamenü_2023_Karriere-3

Jobs

You can find all open vacancies here. Look around and submit your application - we look forward to it! If there is no matching position, please send us your unsolicited application.

Blog
NextLytics Newsletter Teaser
Sign up now for our monthly newsletter!
Sign up for newsletter
 

Filename determination in SAP BW4 Transformation - Flatfile Datasource

It is often required with flat file interfaces that files should not be processed twice. Ideally, the files are processed once after writing to the application server of SAP BW. In the following I explain a method how this can be done.

The procedure for dynamic determination of files to be loaded, can be achieved by routines. These routines use some logic to change the filenames in the adapter setting in the DTP so that different files can be loaded in the application server by the DTP.

Usually a logic is used, in which the routine recognizes whether a file was already loaded. For this we store via a transformation routine the already loaded filenames in the target aDSO. By means of these entries we can recognize whether a file was already processed and accordingly load the unprocessed file.

Saving the filenames in aDSO

RSFILENAMEDONE EN

To store the filenames of the already loaded files in the target ADSO, we use the SAP table RSFILENAMEDONE. In this table the filenames are stored with their corresponding request IDs.

This allows us to fill a variable with the filename of the loaded file in the start routine of the transformation. This is possible by selecting the 'filename' from the table RSFILENAMEDONE via the 'request'. Now this variable has only to be passed to the field via a field routine.

if sy-batch is initial.
break-point.
endif.

if g_filename is initial.
Select Single filename from RSFILENAMEDONE
where request = @request into @g_filename.
endif.

A comparison of SAP BW, HANA Native and SAP DW-Cloud -  Download the Whitepaper here! 

Neuer Call-to-Action


Dynamic fileupload

If the filenames have been stored in the aDSO, we can use them to check during DTP execution whether a file has already been processed. To do this we compare the filenames from the directory of the application server with the filenames from the aDSO and only load files that are not yet listed in the aDSO.

In the second step we check if the found file is still uploaded to the application server by comparing the file size every five seconds. If the file size is identical it means that the file has been completely stored on the application server and we can load it.

Do 2 times.
      IF sy-index = 1.
        LOOP AT it_files ASSIGNING FIELD-SYMBOL(<ls_files>).
          p_filename = |{ lv_dir_name }{ <ls_files>-name }|.
          SELECT SINGLE filename
            FROM /bic/afilnatest2
            WHERE filename EQ @p_filename
            INTO @DATA(l_filename).
          IF sy-subrc NE 0. " File has not been transferred yet
            ls_files = <ls_files>.
            EXIT. " consider first filename, that is not found in target yet.

          ENDIF.
        ENDLOOP.

        WAIT UP TO 5 SECONDS.
      ELSE. " Second part of logic
        LOOP AT it_files ASSIGNING <ls_files>
          WHERE name = ls_files-name.
          IF ls_files-size = <ls_files>-size. " file size has not changed in last 5 seconds, therefore it is considered not being transferred anymore
           
p_filename = |{ lv_dir_name }{ ls_files-name }|.

            p_subrc = 0.

          ELSE.
            CLEAR p_filename.
          ENDIF.

        ENDLOOP.
      ENDIF.
    ENDIF.
enddo.

Do you have questions about how to get the best use out of your BW? Are you trying to build up the necessary know-how in your department or do you need support with a specific question? We are happy to help you. NextLytics is always at your side as an experienced project partner.

Learn more about SAP BW

avatar

Argy

Argy joined Nextlytics in 2021 as an SAP BW / BI consultant. He has gained experience as a BW/4HANA Modeler and ABAP Programmer during the last year. In his free time, he likes to watch basketball games and he enjoys reading books.

Got a question about this blog?
Ask Argy

Blog - NextLytics AG 

Welcome to our blog. In this section we regularly report on news and background information on topics such as SAP Business Intelligence (BI), SAP Dashboarding with Lumira Designer or SAP Analytics Cloud, Machine Learning with SAP BW, Data Science and Planning with SAP Business Planning and Consolidation (BPC), SAP Integrated Planning (IP) and SAC Planning and much more.

Subscribe to our newsletter

Related Posts

Recent Posts