当前位置:网站首页>Expert routine of BW conversion based on AMDP
Expert routine of BW conversion based on AMDP
2022-07-18 13:28:00 【xiaomici】
Today, I was confused .
Originally, I want to add a navigation attribute .so easy.
So I'll take a look , The expert routines used in this attribute conversion . Or use of HANA runtime.
This is my knowledge blind spot again , I can't .
But all the answers , You have to be brave again . Ah .
No, it's just SQL Well , If we don't believe it, we can't fix it .
Here is the custom directory title
1. What is based on HANA Of BW transformation
Everybody says HANA Is to move the code down to the database , Then how did it move down ? When to move down ? Why does it move down , What are the prerequisites ?
Follow ABAP Than , It's just that it's not here application server Go inside and deal with open sql 了 , People are sql. No need to pass application server To translate into native SQL Go to the database to get the number . And deal with it by package , Not one by one . Just like a thief .
Here we are . I almost know that ABAP Code and AMDP Code differences . In fact, it's for ABAP Call directly in the program SQL Language .
If your conversion is all ABAP Code , Start and end fields or expert routines , Then it can't be pushed down .
2. Take a look at the transformation SQL How is the sentence written
stay HANA The conversion DTP What happens in the process of being executed ?
Just look at me HANA The transformation of DTP, Its execution mode is part HANA Serial processing . In the process ,SQL Statements are generated from source Take the number and insert it directly into target In go to .
The whole process is actually : The transformation logic is transformed into a calculationscenario, And then this calcScenario Built in a columnview in . When fetching from the source ,DTP Created based on this columnview Of select sentence . And then this calcscenario The processing logic of is applied to the source , Through one step insert as select stay HANA The database handles data transmission .( It reads messy , In order to use directly SQL,SAP give it one's best shot ) But as a code scum ,SQL I'm not very familiar
When the conversion is activated , be-all HANA The running object is generated .

This is actually in the conversion attribute Analysis Process And a Active Routine Class. Look closely, it's a stored procedure .
Then take a look at this expert routine How does it say , There must be some restrictions , To get to the database . Damn it , It's like those who engage in finance have to make their names so awkward .AMDP It sounds like a tall man ...
Ginseng with entry intab And ginseng outtab
The input parameter is obviously the source packet , The output parameter is the result packet .
If we are average ABAP Writing , That's it Loop Source data to working range , Then deal with it one by one .
however AMDP Is to press a block Come on insert as select Treatment method . It's actually AMDP class .
This AMDP class It can't be in SE24 perhaps SE80 Last change , Only in BW Modeling Tools Inside ABAP Development Tools Go inside to modify . Namely ADT Shangnong .
This one is very simple , Namely ADT Right click New ABAP class. If you can't find it other. And then build another one program To call .
But we are in the conversion , In fact, it is built automatically , Input and output parameters are source package and target package.
If you already have a conversion , There is code 了 . Then create another one expert routine Will be asked to delete the existing logic . That is, you start the routine , Field routines , The formula , The end routine will be deleted .
In fact, this is right AMDPclass The interface of IF_AMDP_MARKER_HDB The implementation of the .
READ ONLY shi It can only be used DML Language , Out-of-service DELETE,UPDATE,INSERT.
Look at the example. The grammar is very simple .
What is grammar like ? Take an old example : This is a 1 Yes 1 Transformation , Didn't do anything . After you make changes , You need to activate this method , Then exit into the conversion and activate the conversion .
Here is a problem , Because we often have to do in the routine look up.
That actually requires other watches . Then why am I here AMDP Go inside and read ABAP Table of 、 View ,FM Well ?
That must be stated . That is to add USING.
Let's take another example .
The number in the following figure 3 A small mark , It's you who really implement AMDP When , Backstage will give you intab and outtab Build a view, At the same time, build a temporary... For your internal table view. We don't care what happened to the bottom . We just need to add one Using, You can use it DDIC The table .
3. How to analyze 、debug One AMDP expert routine Transformation
As mentioned above, actually this SQL Is in ColumnView Of CalculationScenario Inside quilt Calculation engine Executive .DTP The filter value of will be passed by placeholders to calc engine. therefore DTP The filter value of will not be like ABAP runtime That appears in where It's in the condition .( This is in DTP Of log What you can see in )
Routines in conversion Debug, In fact, I'm still confused . I usually expert mode Go to debug. But this kind of AMDP It seems different . It has no generated abap ah , It's not like program You can go directly to debug. So how to deal with it ?
For a database to run SQL Transformation , Yes? debug? For one use SQL Script It's written in AMDP Class AMDP Method . When the logic is pushed down to the database layer for execution , At first glance ? First of all, we have to know AMDP Debugger.
First , Go to the technical information you converted :
Click on this A Version of :
Where there is a blue block on the line of the code segment , Right click to open debugger.
Then double click the break point .
Gray breakpoint :Debugger not active
Green breakpoint :Debugger Activate , Breakpoint confirmation
Blue breakpoint :Debugger Activate , Breakpoint confirmation
After the breakpoint is set , Go to DTP Run in debug. You can also choose a location . Of course I won't choose .
And then it goes to sql script debugger 了 . Here head heel ABAP Of debugger It's a little different . But the function is still close .
This transformation is often covered , Under this point , The switch to SQL debugger Go to .
Next into debug.
Then run down :
F8: Next breakpoint or end .
Red Square : end debugger
disconnect: Disconnection
F5: One step run
F6: Run to the next , If the next one is call Of method What? , Finish the whole run , Don't go in .
F7: Put this in now method Go straight back to caller. Or run to the end .
F8: Run to the cursor line .

Go to variable Look at the value . Just can't go like ABAP Same change value . Because it's all over .
Double click to view intab and outtab Value .
边栏推荐
- 【软件测试】08 -- 黑盒测试方法(边界值分析法、因果图与决策表法)
- MulterError: Unexpected field
- Basic UNIX domain protocol programming
- MATLAB学习第三天(数据类型、运算符以及多种运算)
- 全球位置编号GLN申请攻略
- "Harmonyos" explore harmonyos applications
- 蓝牙技术|首批蓝牙LE Audio兼容设备年内上市,蓝牙耳机续航将突飞猛进
- 剑指 Offer 04. 二维数组中的查找
- [HBZ sharing] TCP protocol explanation
- Template_ Real dichotomy
猜你喜欢

力扣暑假刷题

How to customize an annotation?

【机器学习】自动编码器 - Autoencoder

剑指 Offer 18. 删除链表的节点

What is the ECS framework? Explain + practice to get you started ECS framework
![[RT thread] NXP rt10xx sfud and fal component construction and use](/img/1e/aa636c7a986f24b715b7f30e9c0c98.png)
[RT thread] NXP rt10xx sfud and fal component construction and use
![[machine learning] decision tree](/img/ae/7dac0bddc7f55ecabe49ab5ef4b429.png)
[machine learning] decision tree

Community summit pulsar summit old golden peak conference topic highlights exposure!

剑指 Offer 27. 二叉树的镜像

static变量看着有点晕,gdb汇编清醒清醒
随机推荐
超微主板各项参数汇总
Exploratory software testing
QA机器人第一节——介绍
批流融合升级:Apache Flink 1.15.0 发布 Pulsar Flink Sink Connector
[programming compulsory training 9] the number of schemes in the grid (recursion) + alternative addition (bit operation)
[software testing] test slang, the advice given to you by ten-year old employees
傲梅轻松克隆系统盘备份
static变量看着有点晕,gdb汇编清醒清醒
Language AI originally knew whether his answer was correct! New research in Berkeley and other universities is hot, netizen: dangerous, dangerous, dangerous
Jincang database kingbasees SQL language reference manual (3.1.1.6. boolean type, 3.1.1.7. bit string type)
内网部署EDUSOHO遇到的问题
[machine learning] random forest
Today's job insights
Opencvsharp (C openCV) pointer method reads and modifies image pixel values (with source code)
【机器学习】PCA - 主成分分析
【软件测试】08 -- 黑盒测试方法(边界值分析法、因果图与决策表法)
Mysql5.7 create user error: error 1364 (HY000): field 'SSL_ Cipher 'doesn't have a default value solution
OpenCvSharp (C# OpenCV) 指针方法读取和修改图像像素值(附源码)
软件测试月薪28K大厂面试题 (经面试官允许可以拿走试卷)
[programming training 5] continuous maximum sum + statistical palindrome