Quantcast
Channel: SCN : All Content - ABAP for SAP HANA
Viewing all 831 articles
Browse latest View live

Recommended development approach for ABAP on HANA..

$
0
0

Hi all,

A couple of questions we're debating internally about the future direction/role of SAP HANA Studio for use with SAP apps on HANA.

 

With all the new features in SP5 for ABAP on HANA development, is that the future direction and eventually the only supported approach for SAP application development? i.e. do all the development for managed DB Procedures, CDS Views in the app layer and remove the need for Studio access to the db directly?

Will SAP consider now or in the future letting development folks have HANA Studio access is a bit of a back door to the database and circumventing the application level controls around security, lifecycle management etc? Or will it just be to left to each customer site to see if they are more comfortable with a top down approach (app layer development) or they can create db objects in Studio and equivalent data definition entries so the ABAP layer can work with them?


Next question is around XS custom access to the HANA db that is controlled by a SAP app. We have some XS apps right now that have dml access to custom objects in our HANA sidecar implementation, and in the next 6-9 months we hope to consume the replicated schema and custom development objects inside a BW on HANA database. Again if we're allowing a custom application with dml access to a SAP app HANA db (either a different schema or even SAP<SID schema) that has a different security model, independent db users that aren't replicated in the SAP app layer , will this be an issue for SAP support?


We’re trying to minimize re-work so any help here appreciated..


Thanks,

Sean.



Model a Gateway-Service-based on Business Entities

$
0
0

Now, SAP NetWeaver 7.40 SP 5 provides useful tools to create OData services for read-only scenarios via a model-based approach. This gives you the great chance to assemble a standard, optimized implementation of a Gateway Service. The attached document provides you a tutorial, based on the Enterprise Procurement Model (EPM). Here, you will find a detailed guidance on how to join business entities in order to integrate them into a service via the Gateway Service Builder.

View Document

Fine-Tune the Execution of SADL-Based Gateway Services

$
0
0

SADL (Service Adaptation Definition Language) enables fast read access to data for scenarios on mobile and desktop applications based on HANA, by means of a query push-down. As part of the query push-down, all the user's input is collected through consumer APIs and used to configure the request for the database. The SADL engine combines both categories of inputs and adds the resulting restriction to the condition for the database select (WHERE-clause). This document provides a detailed guide on how to use the query options in order to parameterize and fine-tune the execution of your SADL-based SAP Gateway Services.

View Document

Enforce Authorizations for SADL-Based Applications

$
0
0

SADL (Service Adaptation Definition Language) enables fast read access to data for scenarios on mobile and desktop applications based on HANA by means of a query push-down. As part of the query push-down, all users' input is collected through consumer APIs and used to configure the request for the database. Specifically, the authorization enforcement in this process is interposed between query specification by application or end user and data retrieval from the database. This document provides a detailed guide on how to use the SAP authorizations in your SADL-based applications.

View Document

SAP CodeJam Istanbul

$
0
0

Great event at an awsome location!

 

Istanbul was the first location to host the ABAP on HANA CodeJam this year. With 40 registered attendees we decided to send not one but two experts to the event... and so Jens Weiler and me went there... If you followed Jens (@ABAP4H) on Twitter (#SAPCodeJam) you already heard about it... it's an awesome place (completely overwhelming!!).

 

So with a full packed room of 40+ CodeJamers we started the event - thanks again to Ibrahim Gunduz, Cigdem Gunduz, and Abdulbasit Gulsen (sorry I'm lacking the Turkish characters...) for the great organization! We had an awesome chatty and networking atmosphere at the event - really great, thanks so much for your hospitality (Turkey is famous for that but to experience is even better ).

 

Already thinking and talking about further CodeJam events let me just say - I'd love to come back and do further events!!

 

Again, thanks a lot - hope you enjoyed it as much as we did!

 

  Jasmin

 

 

Just a glance at the event (more pics to come on http://facebook/sapcodejam):

IMG_3997.JPG


And as you can see... even a broken leg could not stop Ibrahim from joining the event :-)
IMG_3979.JPG

Hands-On with the SQL Monitor Part 3: Analysis of Individual Database Tables

$
0
0

Hey folks. I’m back again with another hands-on scenario for the SQL Monitor. Last time we focused on SQL statements accessing huge volumes of data and empty FOR ALL ENTRIES tables. Today I will show you how to use the SQL Monitor to analyze individual database tables.

 

Imagine the following situation: In our system we have a custom database table ZSQLM_TEST_ORDER which is central to a number of our business processes. Since we are curious about the actual usage of this table in our productive system, we pose ourselves the following questions:

 

  1. Which request entry points (that is business processes) have accessed the table and which of them is most expensive in terms of SQL executions and database time?
  2. What is the table’s SQL operation (SELECT, INSERT, …) profile and does the table qualify for table buffering?

 

Question 1

 

"Which request entry points (that is business processes) have accessed the table and which of them is most expensive in terms of SQL executions and database time?"

 

As in the previous hands-on scenarios, the starting point of our analysis is the data display transaction SQLMD. The first question asks us to find the list of request entry points that have accessed our database table ZSQLM_TEST_ORDER. For this purpose we enter the table name in the selection screen field “Table Name” and select to aggregate the result by request in section “Aggregation”. Depending on the number of requests you expect, it might also be advisable to clear the field “Maximal Number of Records” to avoid truncation. However, for our particular case the default value of 200 will be more than sufficient. The configured selection screen looks like this:

Capture_New1.PNG

Screenshot 1: Selection screen of transaction SQLMD configured for the first question

 

After hitting F8, we are then directly presented the list of request entry points we looked for. As you can see in the screenshot below, there are three ABAP reports and an RFC function module that have accessed our database table.

Capture_New2.PNG

Screenshot 2: List of all request entry points (business processes) that have accessed the database table ZSQLM_TEST_ORDER.

 

For the second part of the first question we need to find the most dominant request out of the list. This can easily be achieved by evaluating the columns “Executions” and “Total Time”. A quick check reveals that the record at the very top of the list (ZSQLM_TEST) causes about half of all SQL executions on the table and accounts for about 50% of the total database time spent on the table. So if, for instance, we wanted to reduce load on this specific database table, we would first analyze SQL statements triggered by this top request entry point.

 

Question 2

 

"What is the table’s SQL operation (SELECT, INSERT, …) profile and does the table qualify for table buffering?"

 

Question number two seeks for the SQL operation profile of our database table that means the distribution of the number of SQL executions over SELECT, INSERT, UPDATE, … operations. In addition, the second part of the question is concerned with the possibility of table buffering. Therefore, we will also need to know how the number of accessed database records spreads across the different operation types. In order to obtain this information, we need to return to the selection screen of SQLMD and make some adaptions. First, we disable aggregation by selecting “None” in section “Aggregation”. Moreover, we clear the field “Maximal Number of Records” in order not to truncate any records. Here is the resulting selection screen:

Capture_New3.PNG

Screenshot 3: Reconfiguration of the selection screen of SQLMD for the second question.

 

Hitting F8 now brings up a list of all unaggregated SQL Monitor records that involve the table ZSQLM_TEST_ORDER. Note that here unaggregated means that the monitoring records where not grouped by source code position or request entry point. The reason for choosing this representation is that now we can see the SQL operation type directly in the top-level list (column “SQL Operation Type”) without having to drill-down.

 

To obtain the distribution of SQL executions and accessed database records over the different SQL operation types, we can now use the standard ALV functionality for calculating subtotals. All we need to do is select the column “SQL Operation Type” and click the “Subtotals…” button in the ALV toolbar. Afterwards we can select the columns “Executions” and “Total DB Records” and click the “Total” toolbar button to calculate the relative amounts. The final result is shown in the following screenshot.

Capture_New4.PNG

Screenshot 4: List of all unaggregated SQL Monitor records that relate to the database table ZSQLM_TEST_ORDER . The column “Total DB Records” was dragged to the front. The subtotals for the columns “Executions” and “Total DB Records” were calculated using the standard ALV functionality. The groups for INSERT and DELETE statements were collapsed.

 

As you can see from the screenshot above, more than 99% of all SQL executions on our table are SELECT statements while DELETE and INSERT operations account for significantly less than 1% (see column “Executions”). This almost looks like a read-only scenario. However, despite being negligible in terms of SQL executions, DELETE and INSERT statements are still responsible for more than 40% of all accessed database records (see column “Total DB Records”).

 

So what does this mean in regard to buffering the table? In general, writing accesses are disadvantageous for the table buffer since they lead to potentially costly synchronization processes between application servers. In our particular case a relatively high amount of database records are accessed in a number of DELETE and INSERT statements that is vanishingly small with respect to the vast number of SELECT statements. On average each individual writing access modifies 100,000 records (divide “Total DB Records” by “Executions” in Screenshot 4) and, thus, leads to a complete invalidation of the buffered table. Hence, the following buffer synchronization can be performed in a block operation which is relatively fast as compared to updating the records individually. Since this happens only once for every 35,000 SELECT statements (divide number of SELECTs by number of INSERTs and DELETEs in screenshot 4), it is an acceptable overhead. In total we can conclude that buffering our database table will very likely result in a significant speed-up of reading accesses.

 

Before activating the table buffer for your own database tables you should, however, be aware of the fact that data that is read from the buffer might not be up-to-date. This is because synchronization across multiple application servers due to writing accesses can take up to several minutes. Consequently, you should not use buffering when reading obsolete data is not acceptable for your application. Depending on your specific case this might even have legal implications.

 

Wrap-Up

 

In today’s hands-on scenario I showed you how to analyze your recorded SQL Monitor data on the level of database tables. With great ease, we have obtained a list of request entry points – that is business processes – that have accessed a specific database table. In addition, we employed standard ALV features to construct our table’s SQL operation profiles for the number of executions and the number of accessed database records. These profiles led us to the conclusion that buffering should be considered an option for our particular table.

 

It is important to note that as an application developer you could have had a hard time getting this insight from your source code alone. While you might know how many reading and writing database accesses are in your code, you usually will have no way to determine how often these operations occur and how many database records they access during productive use of your application. It might even get more difficult if your application doesn’t have exclusive access to the database table. The SQL Monitor greatly simplifies this task.

 

Finally, let me remark that the table filtering feature of transaction SQLMD has a wide range of additional use cases. For instance, it can help you to find each and any development object that has accessed a particular database table. This might be important when you want to analyze the encapsulation and security of your data. In addition, the table filtering can also assist you in locating lock situations caused by concurrent accesses to a table from different processes.

 

That’s enough for today. If you still can’t get enough of SQL monitoring make sure not to miss my next post in ABAP for SAP HANA.

SAP HANA Studio won't load after software installation failure

$
0
0

Hi,

I've been trying to follow the End to End Development Example for ABAP with HANA at End to End Development Example with SAP NetWeaver 7.4 & SAP HANA

However I have now come to a dead-end as my HANA studio won't load after trying to install the required plug-ins for the SAP Gateway Product Accelerator and the UI Development Toolkit for HTML5 (I already had the ABAP Development tools successfully installed).  When I installed these from https://tools.hana.ondemand.com/juno I got messages about registry errors and when I tried to exit it just got into a loop repeating the error messages.  I eventually had to cancel the application using Task Manager.

 

Since this error I am unable to load the HANA studio.  When I open it it starts to load - I see messages such as Loading Workbench, and I see very fast message mentioning eclipse (which is so fast I can't read it), but then it just closes down.

 

I have tried:

Uninstalling & re-installing the studio - the re-installation seems to be successful (clean log, no error messages), but no joy

Uninstalling & re-installing the studio and hana client- no joy

Doing a Windows system restore to about one week prior to this installation - no joy

Doing a system restore with uninstall and re-install- no joy

 

Prior to this I had a working version of the studio with which I could access my HANA on AWS and was able to browse around the abap development objects and the HANA database procedures etc.  But the End to End Development Example mentioned that these extra plug-ins were required so I tried installing them.

 

I am on Windows 7 and the HANA studio and client I was using were Win 64 Rev 68.

Also I had been advised NOT to install my HANA studio in C:\Program Files, so it was installed in a folder C:\SAP\hdbstudio

 

I am stumped at the moment, so would really appreciate some advice on how to move forward.

Thanks

Andy

How do we handle translation in HANA when calling from ABAP

$
0
0

Hi

I call the HANA procedures/views from ABAP and I would like to send the locale language as parameter. But I couldn't achieve this unless i do a language select from each and every table and compare to the parameter.

Here's what I observed, In HANA, there's a text join and you choose the language under the language column. It always picks up the locale which is set in the logon screen. But there's no way to pass the language from ABAP.

 

Your help is appreciated.

Regads, Chaitanya


New ABAP for HANA features in SAP NW 7.4 SP5

$
0
0

With the newly released AS ABAP 7.4 SP5 we have deepened the interplay between the ABAP and SAP HANA and enhanced the capabilities of the ABAP for HANA development. Following the code to data paradigm we have focused on enabling you to innovate faster and better with ABAP for HANA..


So what is inside this release for ABAP on HANA developers?


Performance Worklist Tool

 

The SQL Performance Worklist (Transaction: SWLT) allows you to correlate SQL runtime data with ABAP code analysis to plan optimizations using results from the new SQLMonitor and CodeInspector.

swlt.png


More details on the Performance Worklist Tool can soon be found in a detailed document here in SCN (The SQL Performance Worklist Tool ).

 

 

 

CDS Viewbuilding

 

CDS Viewbuilding is drastically improving the existing viewbuilding mechanisms in ABAP. It offers a broad variety of features you maybe know of the SQL92 Standard like all kind of join consitions, support of union, expressions, associations and much more. And also important we will continue to extended the feature set in the upcoming releases. CDS viewbuilding is completely syntax based and the design time with syntax checks, code completion and many more features is directly integrated in the ABAP Development Tools.

 

cds.png

 

More details on CDS Viewbuilding can soon be found in a detailed document here in SCN ( CDS Viewbuilding ).

 

 

 

Extended OpenSQL

 

Open SQL has been enhanced with new features, especially a lot of limitations have been removed, the JOIN functionality has been enhances as have been arithmetical and string expressions. Moreover, a new Open SQL syntax has been presented with incorporates e.g. the escaping of host variables, comma separation of the field list and so on and so forth.

 

OSQL.png

 

ABAP managed Database Procedures (AMDP)

 

AMDPs enables you to create database procedures directly in ABAP using e.g. SQL Script. And to seamlessly integrate it in modern ABAP development an AMDP can be implemented using an ABAP method. Curious how this look like ? Here we go:

 

AMDP.png

As you can see in the picture above the choice if the method is classical ABAP or SQL Script is in the method implementation and not in the definition. Making it possible to redefine an existing method implemented in ABAP with SQL script and the other way around.


The Lifecycle-Management of an AMDP is exactly the same as any other ABAP method. The ABAP server will take completely care for the deployment and activation of the procedure on the database.

 

More details for AMDP will follow soon and can be found in a detailed document here in SCN ( ABAP Managed Database Procedures ).

 

 

 

Transparent Optimizations

  • Fast Data Access (new data exchange protocol)
  • optimized SELECT... INTO ITAB and SELECT SINGLE
  • optimized FOR ALL ENTRIES-clause

 

So that's it - hope I made you excited. If you want to try it out, the new AS ABAP 7.4 SP5 Developer Edition will be available beginning of February - See here SCN Trial Editions: SAP NetWeaver Application Server ABAP 7.4.  Please check back on this ABAP for SAP HANA Space. We will continuously deliver detailed information of the new features and how-to use them.

 

Stay tuned & have fun with ABAP

 

Jens

Error "NiHLGetNodeAddr" when accessing GUI from Studio

$
0
0

Hello folks

I just installed the ADT in my HANA Studio and now wanted to access an SAP Transaction out of the Studio. However, I do get the error "NiHLGetNodeAddr".

SAP GUI Installation is working fine when using it in the "Standard way".

What is missing or what I am doing wrong?

(System Connection is via "Application Server")

 

Thanks & regards

bivision

Featured Content for ABAP for SAP HANA

$
0
0

What's new in SAP NetWeaver AS ABAP 7.4 SP5?

The newly released AS ABAP 7.4 SP5 brings the interplay between ABAP and SAP HANA to another level and provides enhanced capabilities in regards to the ABAP for HANA development following the “code-to-data” paradigm. Find more information about the new ABAP for HANA features in Jens Weiler's blog here. January 23 2014

 

Cookbook SAP Business Suite on SAP HANA

Recently we have published a new version of the SAP Business Suite powered by SAP HANA Cookbook.You find it here. It includes a lot of interesting information for developers. You find interesting information related to code migration and optimization there. Moreover you find also nice overview videos. January 13, 2014

 

SQL Monitor Unleashed

Have you heard about the SQL Monitor already? It can be used to detect custom code which can be optimized (in the context of the migration to SAP HANA, but also independent of that). If you like to learn more, read Johannes Marbach's blog series. You find the first blog here. November 18, 2013

 

SAP ICC: Readiness Assessment for ABAP Add-Ons

As software solution provider you can get help from the SAP Integration and Certification Center (SAP ICC) for making your add-on ready for SAP HANA. If you are interested, you can find more details here. November 18, 2013

ALV on HANA - Feature Matrix

$
0
0

The videos (ALV and FPM on SAP HANA, ALV transformation) and document concerning ALV on HANA are using features which we delivered in NW7.40. But as we are continuously developing the tool, it is not always clearly stated in which support package they are available. This matrix will help you to get an overview on the availability of features in SAPGUI for Windows.

 

FeatureNext SPNW 7.40 SP5*** NW 7.40 SP4NW 7.40 SP3NW 7.40 SP2NW 7.40 SP0*
Basic consumption scenario
Consumption of DDIC views and tables with query push down, paging, filtering, sorting, grouping and aggregation in the ALV GridXXXXXX
API: selection parametersXXXXX
API: Initial GroupingXXXXX
API: Initial AggregationXX
Integrated authority-check on SAP HANAXXXXX
Unified consumption API for all databases - capability serviceX
Special SAP HANA features
Text and fuzzy search on SAP HANAXXXXX
Definition of the search scope for text searchXX
Consumption of DDIC external viewsXXXXX
Support for HANA native data types representing DDIC types (e.g. date, time)X
API: Support for SAP HANA view placeholderXXXXX
Field catalogue API: setting of texts (directly or using a data element)****XXXX
Field catalogue API: setting of refererence fields (currency and unit relationship)****XXXX
Default sorting with locale, binary search electableX
Layouting and Personalisation**
Basic layouting features (enabling, disabling of columns) in API and gridXXXXX
Fixed key columnsXXX
Personalized toolbar buttonsXXX
Field display options (as button, icon, link) and their cell actionsXX
Table display options (title, alternating row pattern)XX
Non persistent personalisation (settings dialogue)XXXXX
Persisted personalisation (ALV variants)XXXX
Functions
Single row selection and application functionsXXXXX
Double click enablementXX
Printing and Excel Export (limited to 10 000 selected rows)XXXXX
Disabling of standard functions for business reasons (e.g. aggregation of status codes not allowed)XX

Special features

Complex where conditionsXXXXX
Treating null values as initial values in database selectionXXXX
Calculated fields in ABAP (e.g. determination of icons)XXXX
Constant Currency for all values in a columnXXX
Integrated fullscreen modeXX

 

*NW 7.40 SP0: ALV on HANA is not released for productive usage - only for test purposes

**Frontend Features require SAPGUI 7.30 Patch 5 (see note 1883738)

***NW 7.40 SP5 delivered with SAPUI 7.40 SP06

****Fields in SAP HANA views do not refer to data elements, hence there are no texts or further DDIC conveniences available. These elements must be handled via the field catalogue API. These features can also be used for DDIC views and tables, but normally they are not necessary in this context

What is the main difference between Variable/Input parameters under semantics and Input Parameters under Columns

$
0
0

Hi Friends any one can let me know.

 

Thanks & Regards,

Sreenivasa Reddy

Video Tutorials about ABAP for SAP HANA

$
0
0

This page provides a collection of video tutorials about ABAP for SAP HANA developement based on SAP NetWeaver AS ABAP 7.4 (and higher). More information, guides and tutorials can be found here: http://scn.sap.com/docs/DOC-35518.

 

 

ABAP for SAP HANA Reference Scenario - Overview

This video gives a brief overview of the demo application Open Items Analysis (OIA) which is intended to provide developers with how-tos around the native ABAP consumption of the new powerful HANA-related capabilities introduced with SAP NetWeaver 7.4 powered by SAP HANA. It shows how to access and used the delivered ABAP and HANA developement entities.
Access the video here.

 

Implementing ABAP Managed Database Procedures on SAP HANA (New)

This tutorial demonstrates how to implement an ABAP Managed Database Procedures (AMDP) on SAP HANA, based on SAP NetWeaver AS ABAP 7.4 Support Package 5.

Previously watch the video "Introduction into ABAP Managed Database Procedures on SAP HANA".

 

 

Building Core Data Services Views in ABAP on SAP HANA (New)

This tutorial demonstrates how to build Core Data Services (CDS) views in ABAP on SAP HANA, based on SAP NetWeaver AS ABAP 7.4 Support Package 5.

Previously watch the video "Introduction into Advanced View Building in ABAP on SAP HANA".

 

 

Consuming SAP HANA procedures in ABAP

In this video tutorial, we see how to use database procedure proxies to  natively consume SAP HANA procedures in ABAP in order to build a quick "Top and Flop" customer list.

For more information on this topic, please visit the SCN document.

 

Consuming SAP HANA Views in ABAP

In this video tutorial, we see how to use external views to natively consume SAP HANA views in ABAP.

For more information on this topic, please visit the SCN document.

 

 

Using the HANA Transport Container

In this video tutorial, we see how to transport ABAP and SAP HANA content using the HANA Transport Container.

For more information on this topic, please visit the SCN document.

ABAP for HANA and "Code Push-Down"

$
0
0

With the brand new NW AS ABAP 7.4 SP5 we are adding a new possibility for ABAP Developers to leverage HANA capabilities ( New ABAP for HANA features in SAP NW 7.4 SP5).

 

The whole ABAP for HANA story began last year with our first release of NW AS ABAP 7.4 introducing a new coding paradigm (at least for ABAP): “code pushdown”.

codepushdown.png

 

So what does this mean?

Code pushdown means delegating data intense calculations to the database layer. It does not mean push ALL calculations to the database, but only those that make sense. An easy example is if you want to calculate the amount of all positions of invoices. You should not select all positions of those invoices and calculate the sum in a loop. This can be easily done by using an aggregation function (here SUM()) on the database.

 

However, pre ABAP 7.4 releases only provided very limited support for such an approach. In the 7.4 SP2 release we did our first step to overcome this limitation. We introduced new ABAP artifacts to consume HANA views and procedures in ABAP: The “Bottom-Up approach”.

 

bottomup.png

 

Sounds perfect? Yes, but unfortunately it has some drawbacks. First of all, as a developer, you have to work in both worlds (HANA and ABAP). This requires a database user, which alone is quiet tricky in some enterprise environments. You also have to keep the HANA and ABAP artifacts in sync and take care of the lifecycle management.

 

With the new SP5 release we are taking the next step to enabling code pushdown with ABAP for SAP HANA: The “Top-Down approach”. It is based on your feedback and our own experience using ABAP for SAP HANA. It enables developers to continue working in their ABAP environment and still have similar possibilities to leverage the power of SAP HANA.

 

topdown.png

 

This approach comes with a huge bag of goodies, like writing SQL Script or being able to create database views with new join and aggregation capabilities directly in ABAP. We will describe these features in detail in more blogs that will follow soon.

 

By the way: this does not mean you do not need the Bottom-Up approach anymore. There are still special cases which you won’t be able to tackle with these new “Top-down”-features. But we are continuing to enrich the ABAP possibilities with every SP. Stay tuned.

 

If you are interested in those new features there is are already great videos available in our YouTube Channel: ABAP for SAP HANA - YouTube

 

Cheers

 

Jens


Tutorial: How to Debug an ABAP Managed Database Procedure

$
0
0

Remarks before you start

  1. All screenshots have been made in an AS ABAP System with SID “HANAABAP” installed in the HANA Database Schema “SAPHANAABAP”.
    Please consider to adapt this based on the System ID (<SID>) and schema of your system.
  2. The screenshots have been created based on HANA Studio version 1.0.7000 and might differ with respect to other HANA releases.

What’s in this document

This document describes how to debug an ABAP-managed Database Procedure in SAP NetWeaver 7.4 SP5 and higher.


Prerequisites

In order to debug an ABAP-managed database procedure (AMDP) in AS ABAP 7.4 SP5, an ABAP user as well as a HANA user is required.

 

We assume that the AMDB is executed via an ABAP report and is subject to a debugging procedure initiated by the HANA user DEBUGUSER.

 

For the ABAP user the standard ABAP authorization to execute the corresponding report is required.

 

For the HANA user DEBUGUSER, the authorization to read the catalogue needs to be granted by the SYSTEM user:

    

     grantcatalogreadto DEBUGUSER;

 

Additionally, debugging authorizations are required as described in SAP note 1942471 (http://service.sap.com/sap/support/notes/1942471). According to the note, for SAP HANA releases >= SPS7, three authorizations are required:

  1. Authorization to debug the procedure
  2. Authorization to execute the procedure
  3. Authorization to attach the debugger to a SAP<SID> user session


The corresponding grant statements to be executed in the SQL console of the SAP HANA studio (as SAP<SID> user) for the ABAP-managed DB procedure <AMDP_NAME> are:

grantdebugon"SAPHANAABAP"."<AMDP_NAME>"toDEBUGUSER;

grantexecuteon"SAPHANAABAP"."<AMDP_NAME>"toDEBUGUSER;

grantattachdebuggertoDEBUGUSER;

 

Alternatively, the grant statements for the authorization to debug any ABAP-managed database procedure in the schema SAPHANAABAP are:


grantdebug  onschemaSAPHANAABAPtoDEBUGUSER;

grantselectonschemaSAPHANAABAPtoDEBUGUSER;

grantattachdebuggertoDEBUGUSER;

   

Remark: For SAP HANA release SPS6, only the authorization to execute SYS.DEBUG is required.

 

Since ABAP Managed database procedures are created in the HANA catalogue at first execution – during ABAP class activation – you might need to generate the catalogue object before you can start the debugging. For this purpose you can execute the ABAP report RSDBGEN_AMDP.

 

Step-by-Step Guide: Debug an ABAP-managed DB procedure

 

Set a Breakpoint

  1. Go to the SAP HANA Development perspective and open the ABAP-managed database procedure (AMDP) catalogue object you would like to debug:
    01a_SetBP_ProjectExplorer.png

  2. Set the breakpoint:
    01b_SetBP_EditorView.png

External Debugging: Attach the SQLScript debugger

 

  1. Go to the Debug perspective and create a debug configuration:
    02a_DebugConfigDropDown.png
  2. Create a new SAP HANA Stored Procedure debug configuration and insert the information depicted in the screenshot:
    02b_DebugConfig_Create.png
    For the debugging process described in this document, we use the option “Debug an External Session”. The debug user can be selected from the drop down list, in our case the DEBUGUSER. The filter attributes should be as specific as possible. We debug an external session of the “HANA User” SAPHANAABAP, i.e. the user assigned to the primary database connection when running the ABAP report. The user DEVELOPER executes the ABAP report, for this purpose we apply the optional filter on the “Application User”. Finally, click on Apply and start the debugging process via the Debug
    button.
  3. If everything worked fine you should now see in the debug view that the external debugging is running, and you should additionally see the active break point in the Breakpoints view:
    02c_DebugConfig_DebuggerReady.png

 

 

Execution of the ABAP report

 

In this document, the ABAP report ZR_DEMO_AMDP is executed. In the report the call of the class method zcl_demo_amdp=>get_open_so_inv_for_customer leads to the call of the corresponding AMDP procedure. The coding for both, the ABAP report and the ABAP class, can be found in the attached files.

 

  1. Switch to the ABAP perspective and execute the ABAP report ZR_DEMO_AMDP (alternatively also the execution of the AMDP via transaction SE24 is possible).
  2. The debugger attaches to the running session and stops at the breakpoint. Switch to the Debug perspective to use all debugging features (this is not mandatory but might become handy):
    03a_DebuggerLaunch.png
    You can now use the tools provided by the SQLScript debugger, e.g. you can investigate the values of variables in the Variables view or a data preview of tables
    et_so_inv_h via right-click on the table:
    03b_VarView.png
    The data preview is displayed in a corresponding window:
    03c_DataPreview.png
    You can proceed to the next breakpoint (if available) via F8 or just end the current debugging cycle of this procedure (via F8 if no other breakpoints are given).
  3. After this process, the debugger will be in the state described in paragraph "External Debugging: Attach the SQLScript debugger", i.e. the debugger is in external debug mode. Therefore, you can repeat the debug procedure by re-execution of the ABAP report.

 

Remark: Please explicitely terminate the debugging process once you are finished. The debug procedure described attaches externally to a running session based on certain filter criteria (in our case "HANA user" SAPHANAABAP and "Application user" DEVELOPER) and if an active breakpoint is set. Therefore, you might accidentially/unintentionally debug a colleagues' report execution if the criteria are matched - your colleague then either has to wait until you press F8 or until the debugger time out helps .

 

Related Content

How to get hands on netweaver 7.4 running on HANA

$
0
0

Hey Guys,

 

Well, Let me start by wishing you all. Hope all are rocking.

 

For some time i have been following developments and revolutionary things happening in SAP world with HANA and new UI technologies. After going through few blogs and example tutorials able to understand SAP vision for their business suit and a lighting fast in-memory computing data base.

 

I would like to get my hands on Netweaver 7.4 running on HANA, SAP UI5, Netweaver gateway, Hana Studio. would love to get few questions answered.

 

1) Can i install 7.4 on a local PC. I have gone through all the setup methodologies given for installing 7.4 none actually discuss about installing on PC.

2) Can we see 7.4 with HANA as a downloadable version(Like Mini SAP offerings) in future.

3) Can hana studio be used to fetch and update data from  business suit running on hana instead of going via ABAP.

4) What extend does SAP River may influence ABAP development over HANA. Can SAP river be used in-case of hana and 7.4 situation.

5) I wonder After All technical changes, can we really expect a new kind of GUI or a new methodology to access SAP transactions at front end(For end users).

 

Appreciate if some one can clarify my doubts.

anybody tried ABAP 7.4 with HANA Trial on AWS ?

$
0
0

ABAP 7.4 with HANA , pls help me to complete,.

Generate DB Procedure Proxies

$
0
0

Hello colleagues,

 

is it possible to generate/create DB procedure proxies dynamically within ABAP?

So we know the DB procedure name and want to create a DB procedure proxy dynamically in ABAP.

 

Regards

André

Implementation of Analytics UIBB for Open Item Analytics Dashboard using FPM Application

$
0
0

Analytical UIBB is a new offering contained in SAP Business Information Warehouse. It provides the capability to analyse data from a BEx Query. The data can be viewed in the form of a chart or a data table. The Analytical UIBB has many components which can be used when building an FPM application.Each of the components has a reference to its own feeder classes like CL_FPM_RUIBB_BICS_GRID and CL_FPM_BICS_CHART_FEEDER respectively. The feeder classes take the same BEx Query as input so that both components show the same data to be analysed. Also, a filter on the query data should trigger changes in display of both the chart as well as the data table.

View this Document

Viewing all 831 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>