CN111444221B - Optimization method for flexible parameter transmission of SAP HANA and ABAP - Google Patents

Optimization method for flexible parameter transmission of SAP HANA and ABAP Download PDF

Info

Publication number
CN111444221B
CN111444221B CN202010417386.1A CN202010417386A CN111444221B CN 111444221 B CN111444221 B CN 111444221B CN 202010417386 A CN202010417386 A CN 202010417386A CN 111444221 B CN111444221 B CN 111444221B
Authority
CN
China
Prior art keywords
hana
parameters
abap
expression
view
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010417386.1A
Other languages
Chinese (zh)
Other versions
CN111444221A (en
Inventor
李林
冯曙明
颜培俊
王纪军
蒋王峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Jiangsu Electric Power Co Ltd
Jiangsu Electric Power Information Technology Co Ltd
Original Assignee
State Grid Jiangsu Electric Power Co Ltd
Jiangsu Electric Power Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Jiangsu Electric Power Co Ltd, Jiangsu Electric Power Information Technology Co Ltd filed Critical State Grid Jiangsu Electric Power Co Ltd
Priority to CN202010417386.1A priority Critical patent/CN111444221B/en
Publication of CN111444221A publication Critical patent/CN111444221A/en
Application granted granted Critical
Publication of CN111444221B publication Critical patent/CN111444221B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations

Abstract

The invention discloses an optimization method for flexibly transmitting parameters of SAP HANA and ABAP, comprising the following steps of S1: analyzing a bottom table to which the parameters belong, judging whether the different bottom tables have the same field name or not, namely passing parameter filtering, and establishing the parameters according to different conditions; s2 sets the filtering conditions: setting filtering conditions according to the result of S1 in the relevant nodes of the HANA view; s3 parses the expression: in ABAP, resolving the query condition input by a user into an expression applicable to the HANA computational view; s4 refers to HANA view: and filtering the HANA view to obtain a filtered result, and realizing the method based on the SAP HANA and ABAP platform flexible transmission parameter as an expression. The expression allowed to be transmitted by the invention is interval, single value, exclusion, null value and the like, is very flexible, can meet the condition requirement of the service, and improves the transmission efficiency.

Description

Optimization method for flexible parameter transmission of SAP HANA and ABAP
Technical Field
The invention relates to a cross-platform flexible parameter transmission method, in particular to a method taking flexible parameter transmission based on SAP HANA and ABAP platforms as expressions.
Background
The SAP HANA (High-Performance analytical application) is a software and hardware combination, provides a High-Performance data query function, and a user can directly query and analyze a large amount of real-time service data. The ABAP is a development language of SAP software and is also a development platform provided by the SAP software.
The business user generally does not directly use the HANA and the ABAP platform, the workflow generally develops a foreground interface for the ABAP, the user condition is transmitted to the HANA platform, the HANA performs complex data operation and provides a final result, and the ABAP development displays the result to the user.
The ABAP development platform needs to create parameters in the HANA and filter bottom table data, so that the conditions of the user can be effectively and accurately provided to the HANA.
In the SAP HANA platform, if parameters need to be newly built in a computational view, the types of allowed inputs are limited, and only single-value (═ single-value) and multiple-value (or) are supported. In practical workflows, the needs of the business are varied, as desired to support range selection (>, < etc.), support exclusion (| >), support singular value and exclusion, etc.
The current method is that ABAP developers break down the user's requirements into several values and then transmit them back to HANA, as the user input conditions: field <3, field >1, then field 1,2,3 is returned to HANA to satisfy the existing parameter conditions. This solution is allowed, but developers need to take all the requirements into account for disassembly, and need to transfer a large amount of data to the HANA, resulting in a large workload and inefficiency.
Disclosure of Invention
The invention aims to provide an optimization method for flexibly transmitting parameters between SAP HANA and ABAP, which realizes the transmission of parameter values as expressions by setting parameter conditions in the HANA and analyzing the query conditions input by a user as the expressions at the ABAP end, allows the transmitted expressions to be intervals, single values, exclusion, null values and the like, is very flexible, can meet the condition requirements of services, and improves the transmission efficiency.
The purpose of the invention is realized by the following technical scheme:
an optimization method for flexibly transmitting parameters of SAP HANA and ABAP is characterized by comprising the following steps: setting parameter conditions through an HANA end, analyzing query conditions input by a user into an expression suitable for an HANA calculation view in ABAP, and transmitting a related expression to parameters of the HANA view to realize transmission of the parameters as the expression; the method comprises the following steps:
s1 New parameters: analyzing a bottom table to which the parameters belong, judging whether the different bottom tables have the same field name or not, namely passing parameter filtering, and establishing the parameters according to different conditions;
s2 sets the filtering conditions: setting filtering conditions according to the result of S1 in the relevant nodes of the HANA view;
s3 parses the expression: in ABAP, resolving the query condition input by a user into an expression applicable to the HANA computational view;
s4 refers to HANA view: and filtering the HANA view to obtain a filtered result, and realizing the method based on the SAP HANA and ABAP platform flexible transmission parameter as an expression.
The method comprises the following specific steps:
1) analyzing the bottom table to which the parameters belong, and judging whether the different bottom tables have the same field name or not, namely, passing parameter filtering.
2) If 1) exists, parameters with different fields need to be established for different bottom tables, and if both the A table and the B table need to perform parameter transmission and filtering on the same field, two parameters, namely, a P _ A table _ field name and a P _ B table _ field name, need to be newly established.
3) If 1) does not exist, each bottom table only needs to establish a new relevant parameter, such as a P _ A table and a P _ B table.
4) According to the conditions of 2) and 3), parameters are newly established at the HANA end, the type of the newly established parameters is a character string, the length is 5000, and whether the parameters are required to be repaired or not and whether the parameters are selected more or not are not checked.
5) And setting a filtering condition in the HANA view related node in a case.
6) In case 2), filtering needs to be performed after the JOIN node, AND the language selects "Column Engine", AND the input $ $ P _ a table _ field name $ $ AND $ $ P _ B table _ field name $ $ AND other filtering conditions are entered.
7) Under the condition of 3), filtering can be directly performed on the node of the bottom table, and [ $ P _ table name $ ] can be directly input, so that the language also selects "Column Engine", and no other filtering condition is allowed to be added.
8) In ABAP, the query condition entered by the user needs to be parsed into expressions that are applicable for HANA computational views. The specific method comprises the following steps: resolving the input query condition into a parameter string applicable to the HANA VIEW by using the sap program zp0001xxxx, and converting the selection in the selection screen into the HANA VIEW parameter value
9) Parameter ABAP alone. Parameter in _1eq1 ═ X', if selection is empty, return (1 ═ 1).
10) After ABAP processes the expression, directly transmitting the parameter expression, filtering the HANA view through correspondence of a bottom table or field names to obtain a filtered result, and realizing flexible transmission of parameters as the expression based on SAP HANA and ABAP platforms.
The invention realizes the transmission of the parameter value as the expression by setting the parameter condition in the HANA and analyzing the query condition input by the user as the expression at the ABAP end, and the transmitted expression is allowed to be an interval, a single value, a removal, a null value and the like, thereby being very flexible, meeting the condition requirement of the service and improving the transmission efficiency.
Drawings
FIG. 1 is a flow chart of an implementation of the SAP HANA and ABAP flexible reference method of the present invention.
Detailed Description
The terms of the related art in the present invention are explained as follows: the parameter transmission is the process of transmitting the parameter value to the corresponding form parameter by the actual parameter in the program running process and then realizing the data processing and returning in the function.
An optimization method for flexibly transmitting parameters of SAP HANA and ABAP is characterized by comprising the following steps: setting parameter conditions through an HANA end, analyzing query conditions input by a user into an expression suitable for an HANA calculation view in ABAP, and transmitting a related expression to parameters of the HANA view to realize transmission of the parameters as the expression; the method comprises the following specific steps:
1) analyzing the bottom table to which the parameters belong, and judging whether the different bottom tables have the same field name or not, namely, passing parameter filtering.
2) If 1) exists, parameters with different fields need to be established for different bottom tables, and if both the A table and the B table need to perform parameter transmission and filtering on the same field, two parameters, namely, a P _ A table _ field name and a P _ B table _ field name, need to be newly established.
3) If 1) does not exist, each bottom table only needs to establish a new relevant parameter, such as a P _ A table and a P _ B table.
4) According to the conditions of 2) and 3), parameters are newly established at the HANA end, the type of the newly established parameters is a character string, the length is 5000, and whether the parameters are required to be repaired or not and whether the parameters are selected more or not are not checked.
5) And setting a filtering condition in the HANA view related node in a case.
6) In case 2), filtering needs to be performed after the JOIN node, AND the language selects "Column Engine", AND the input $ $ P _ a table _ field name $ $ AND $ $ P _ B table _ field name $ $ AND other filtering conditions are entered.
7) Under the condition of 3), filtering can be directly performed on the node of the bottom table, and [ $ P _ table name $ ] can be directly input, so that the language also selects "Column Engine", and no other filtering condition is allowed to be added.
8) In ABAP, the query condition entered by the user needs to be parsed into expressions that are applicable for HANA computational views. The specific method comprises the following steps: resolving the input query condition into a parameter string applicable to the HANA VIEW by using the sap program zp0001xxxx, and converting the selection in the selection screen into the HANA VIEW parameter value
9) Parameter ABAP alone. Parameter in _1eq1 ═ X', if selection is empty, return (1 ═ 1).
10) After ABAP processes the expression, directly transmitting the parameter expression, filtering the HANA view through correspondence of a bottom table or field names to obtain a filtered result, and realizing flexible transmission of parameters as the expression based on SAP HANA and ABAP platforms.
The following figure is a simple transfer example, and the number of parameters and the expressions inside the parameters can be adjusted according to the actual situation.
SELECT*FROM CAL_TEST
(‘PLACEHOLDER’=(‘$$P_BKPF$$’,
’((‘GJAHR’>”2015”AND‘GJAHR’<=”2020AND
‘GJAHR’!=”2019”)
AND(‘BELNR’>=”1200000000”OR
‘BELNR’=”1100000000”))’
))。

Claims (2)

1. An optimization method for flexibly transmitting parameters of SAP HANA and ABAP is characterized by comprising the following steps: setting parameter conditions through an HANA end, analyzing query conditions input by a user into an expression suitable for an HANA calculation view in ABAP, and transmitting a related expression to parameters of the HANA view to realize transmission of the parameters as the expression; the method comprises the following steps:
s1 New parameters: analyzing a bottom table to which the parameters belong, judging whether the different bottom tables have the same field name or not, namely passing parameter filtering, and establishing the parameters according to different conditions;
s2 sets the filtering conditions: setting filtering conditions according to the result of S1 in the relevant nodes of the HANA view;
s3 parses the expression: in ABAP, resolving the query condition input by a user into an expression applicable to the HANA computational view;
s4 refers to HANA view: filtering the HANA view to obtain a filtered result, and realizing a method based on SAP HANA and ABAP platform flexible transmission parameters as an expression;
the method comprises the following specific steps:
1) analyzing a bottom table to which the parameters belong, and judging whether the different bottom tables have the same field name or not as parameter transmission filtering;
2) if 1), establishing parameters with different fields aiming at different bottom tables;
3) if 1) does not exist, each bottom table only needs to be newly established with a related parameter;
4) according to the conditions of 2) and 3), parameters are newly established at an HANA end, the type of the newly established parameters is a character string, the length is 5000, and whether selection is necessary or not and whether selection is excessive are not checked;
5) setting a filtering condition in a relevant node of the HANA view according to the situation;
6) in case 2), then filtering is performed after JOIN node, language selection "Column Engine";
7) under the condition of 3), filtering can be directly performed on the nodes of the bottom table, the language also selects 'Column Engine', and other filtering conditions are not allowed to be added;
8) in ABAP, resolving the query condition input by a user into an expression applicable to the HANA computational view;
9) the Parameter ABAP is treated separately; parameter in _1eq1 ═ X', if Select option is null, return (1 ═ 1);
10) after ABAP processes the expression, directly transmitting the parameter expression, filtering the HANA view through correspondence of a bottom table or field names to obtain a filtered result, and realizing flexible transmission of parameters as the expression based on SAP HANA and ABAP platforms.
2. The method of claim 1, wherein in ABAP, the query condition entered by the user is parsed into an expression applicable to the HANA computational view; the specific method comprises the following steps: the sap program zp0001xxxx is used to resolve the input query condition into a parameter string applicable to the HANA VIEW, and the Select option in the selection screen is converted into the HANA VIEW parameter value.
CN202010417386.1A 2020-05-18 2020-05-18 Optimization method for flexible parameter transmission of SAP HANA and ABAP Active CN111444221B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010417386.1A CN111444221B (en) 2020-05-18 2020-05-18 Optimization method for flexible parameter transmission of SAP HANA and ABAP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010417386.1A CN111444221B (en) 2020-05-18 2020-05-18 Optimization method for flexible parameter transmission of SAP HANA and ABAP

Publications (2)

Publication Number Publication Date
CN111444221A CN111444221A (en) 2020-07-24
CN111444221B true CN111444221B (en) 2022-02-18

Family

ID=71655257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010417386.1A Active CN111444221B (en) 2020-05-18 2020-05-18 Optimization method for flexible parameter transmission of SAP HANA and ABAP

Country Status (1)

Country Link
CN (1) CN111444221B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779044A (en) * 2012-06-28 2012-11-14 用友软件股份有限公司 Analysis processing system and analysis processing method of expression
CN103279509A (en) * 2013-05-17 2013-09-04 北京首钢自动化信息技术有限公司 Fast inquiring method using dynamic inquiring language
CN106919630A (en) * 2015-12-28 2017-07-04 航天信息股份有限公司 A kind of risk indicator formula generation method and system based on SQL expression

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9361407B2 (en) * 2013-09-06 2016-06-07 Sap Se SQL extended with transient fields for calculation expressions in enhanced data models
CN106708972B (en) * 2016-12-06 2020-02-28 江苏电力信息技术有限公司 Method for optimizing ABAP program by utilizing SLT component based on HANA database
US10346418B2 (en) * 2016-12-16 2019-07-09 Sap Se Optimizing data access based on data aging

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779044A (en) * 2012-06-28 2012-11-14 用友软件股份有限公司 Analysis processing system and analysis processing method of expression
CN103279509A (en) * 2013-05-17 2013-09-04 北京首钢自动化信息技术有限公司 Fast inquiring method using dynamic inquiring language
CN106919630A (en) * 2015-12-28 2017-07-04 航天信息股份有限公司 A kind of risk indicator formula generation method and system based on SQL expression

Also Published As

Publication number Publication date
CN111444221A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN106991276B (en) Data interface dynamic generation method based on openEHR template
CA2518902C (en) System and method for query planning and execution
CN106250519A (en) Data query method and apparatus for parallel database
CN107506383B (en) Audit data processing method and computer equipment
CN104536997A (en) Method and device for data batch processing of client interface
CN110674163A (en) Heterogeneous data query system and method based on BS framework
CN110647323A (en) Code-free business application software development platform
CN111444221B (en) Optimization method for flexible parameter transmission of SAP HANA and ABAP
EP1782571B1 (en) Client provisioning with linking
CN102075964A (en) Method and equipment for acquiring performance data by using network management system
CN108363594A (en) A kind of method that participant parses in Workflow system
CN111966597B (en) Test data generation method and device
CN116578585B (en) Data query method, device, electronic equipment and storage medium
CN101183306A (en) Universal Tuxedo configuring method with across platforms and transplant
CN108573171A (en) Greenplum data desensitization method, device, equipment and medium
CN112214236A (en) Method for building management system of application architecture of software rapid development platform
CN116049254A (en) Data asset statistics method based on database
CN107480186B (en) Business model data processing method and computer equipment
CN114153866A (en) ES-based real-time data center configuration system and processing method thereof
CN109446263A (en) A kind of data relationship correlating method and device
CN112463382B (en) Heterogeneous data processing method and device under distributed scene
Ran et al. Architecting software with interface objects
CN112445472A (en) Workflow module based on Activiti and business interaction method
CN105808624A (en) Node data processing method and device
CN105938519A (en) System-based business health degree calculating method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant