on 09-22-2014 9:45 PM
Hi Experts,
Before posting this question, I spent lot of time on google and SCN portals, however I didn't find any suitable document/hint hence posting this question.
Could you please let me know how to write Expert Script in BW (HANA DB) transformation.
Please provide any sample code.
Thank you,
Nanda
Hi Nanda,
Check the process below to create HANA expert routine.
The HANA expert routine can be written via HANA studio for that the prerequisite is ABAP Development Tool KIT(ADT) should be installed in your HANA studio.
Create Transformation and edit the same
EDit-->Routine--> SAP HANA Expert Script
Then Copy the Class/Interface name
Now go to HANA studio Open the ABAP perspective
navigate--> Open ABAP Development Object
Then paste the Class or interface name
Now you can start writing your expert routine. As in our ABAP expert routine all the source and Target fields will be accessible and you can start manipulating those values.
In my above example I have mapped the source fields to target filed directly.
I hope this answers your query.
Thanks & Regards
A.Dinesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dinesh,
Thank you so much for quick response.
I went through the procedure however still I have few questions. Could you please try to answer the following.
1 Can we write code in SAP BW editor(when double lick on "SAP HANA Script processing" ) as you shown in first image or do we need ABAP Development Tool KIT(ADT) compulsory because we are are working on SAP BW HANA database.
2 How to get Class/Interface name
Regards,
Nanda
Hi Nanda,
check the answers below:
1) In earlier release they allowed you to write the code in ABAP, but in latest release its mandatory to use ABAP Development Tool KIT(ADT) .That's what I have mentioned in the first line of my previous post.
2) check the second screen shot of my previous post.
Thanks & Regards
A.Dinesh
Hi Nanda,
I don't know what version you are on, but as Dinesh mentioned, regarding use of earlier versions:
On BW 7.4 SP5, when you edit the HANA expert routine from within SAPGUI (not using Eclipse) you get a popup where you can enter SQLScript directly. Screenshots is like below, you edit the SQLScript in the lower half of the screen:
Regards,
Kevin.
check the HANA SQL refrence guide http://help.sap.com/hana/SAP_HANA_SQL_Script_Reference_en.pdf
Hi Kavin,
We are also same version, written same code what you put in image.
When activating Transformation, its throwing following error.
Code: which in transformation.,
outTab = SELECT "FISCPER", "FISCVARNT", "CURRENCY", "CALMONTH", "RECORDMODE", "AMOUNT", FROM :inTab;
@5C@ | sql syntax error: incorrect syntax near "AS": line 1 col 221 (at pos 221) |
@5C@ | |
@5C@ | Error in substep |
@5C@ | An exception was raised |
@5C@ | Error during generation |
@5C@ | Error when activating Transformation 0EHMQVP8BBN231OIZQARR58RZICX6R2X |
Any clue.
Regards,
Nanda
Hi Nanda,
This expert script is like a stored procedure. Access all the source data from inTab and do all data manipulation and assign it to outTab. There is no specific document available to show case how to write Expert script because its as simple as writing the stored procedure. We all should come little bit out of ABAP world and should learn to write stored procedure. Thanks & Regards A.Dinesh
Hello Dinesh,
when i trying edit section METHOD PROCEDURE and END METHOD in ABAP expert routine, I get a message «Carry out repairs in non-original system only if they are urgent»:
and after that next message about the need to register object and enter the access key:
Did you encounter similar? If yes, how to solve this problem?
P.S. Our system is SAP BW on HANA 7.4 SP8
Hi Dimitry
Beside the note suggested by Silvio i would suggest to apply all notes from this page:
HANA Transformations - Known problems and fixes - SAP NetWeaver Business Warehouse - SCN Wiki
Those notes are essential, so the HANA processing framework is up to date.
br
Roland
Hi Dinesh,
thanks for pasting the pictures of your script, it is great,
can you give us an example if we need to do if "EC_.." = .. then ... end if;
I'm trying to modify the value of inTab before posting it in outTab, it doesn't work, I'm sure I miss something
another question: can we work with temporary table before updating outTab ?
Thx
hi Guys,
Any idea if HANA SQL script can support deletion of certain data from source package?
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dinesh/Kevin,
Both of you assigned points.
Regards,
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We already have developer key. In this case system require access key for every new procedure created with "SAP HANA expert script" command in SAP GUI menu of transformation. It is look like a bug. We already have an application to support. But to find a workaround would be great. Thank you.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.