Simple General Query for Data Extraction

  • Last update:November 07, 2024
  • Overview

    Similar to SQL statements, simple general query is used to retrieve data from certain column in a table and list some conditions that the data needs to satisfy. Unlike SQL statements, simple general query is not entirely implemented through statements. Table Name and Selected Column are completed through visualization, while Filter Condition is implemented through statements.

    iconNote:
    Simple general query only supports single-table query, which means you can only query one table at a time.

    Procedure

    Before creating an SAP dataset, you need to connect to SAP successfully. For details, see SAP Dataset Plugin.

    Adding an SQL Dataset

    1. Add an SAP dataset, as shown in the following figure.
    2024-06-18_15-44-07.png

    2. Select a data connection and select Simple General Query from the drop-down list of Function, as shown in the following figure.

    • Table Name: Enter a table name existing in the SAP system. Fuzzy search is not supported. Only complete input is allowed.

    • Column Selected: Select the names of the data columns that need to be output.

    • Filter Condition: Set the condition to filter the content of the selected columns that need to be output.

    Selecting Tables and Columns

    Enter the table name (not supporting fuzzy search; requiring you to input the exact table name), and select the required data columns in the table, as shown in the following figure.

     

    iconNote:
    If you cannot retrieve data after entering the table name, it is because the table has too many data columns. You need to increase the length of SAP's TAB512 to retrieve data normally. (For details about TAB512, see Table TAB512 and TAB512 Introduction. You can make changes by referring to SAP official documentation.)

    Setting Filter Conditions

    Click Preview. The following figure shows data without filter conditions.

     2024-06-18_16-06-06.png

    Filter Condition Without Parameters

    Filter out data where column C is not empty. You can view the filter conditions by clicking Format Description. The syntax here can refer to the syntax of OPEN SQL.

    Enter the filter condition C <>'', as shown in the following figure.

     2024-06-18_16-05-48.png

    Filter Condition with Parameters

    When writing filter conditions, you can use parameters (similar to those used in database query) to allow the condition values to changes dynamically.

    1. Write a conditional statement with a parameter, for example, C='${c}', as shown in the following figure.

     2024-06-18_16-05-01.png

    2. Click Preview. You can view that data in column C is the parameter value 3, as shown in the following figure.

    2024-06-18_16-18-26.png

    Completing the SAP Dataset Adding Process

    After confirming that the preview is correct, click OK to add the dataset to FineReport.

     

    Attachment List


    Theme: Data Preparation
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy