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

Implement and consume your first ABAP Managed Database Procedure on HANA

$
0
0

This tutorial demonstrates how to use the new the "Top-Down"-approach for consuming HANA procedures provided by means of ABAP Managed Database Procedures delivered with SAP NetWeaver AS ABAP 7.4, Support Package 5.

You'll be guided in a step-by-step manner over the creation, implementation and consumption of an ABAP Managed Database Procedure (AMDP) on HANA.

 

For  a quick and comprehensive introduction into the ABAP Managed Database Procedures, read the Introduction into AMDP written by Jens Weiler and also check the ABAP Development Tools Help (menu entry Help > Help Content). Information, guides and tutorials about the development of ABAP for SAP HANAapplications - meaning applications built out of ABAP and HANA development entities-, visit our SCN Page.

 

Note that the purpose of this tutorial is not to introduce the SQLScript programming language. You will find more infomation on that topic in the SAP HANA SQLScript Reference.

 

 

Prerequisites

  • SAP NetWeaver AS ABAP 7.4 Support Package 5 (or higher) running on SAP HANA
  • SAP HANA Appliance Software SPS 05 (or higher)
  • SAP HANA DB SQLScript V2.0 (or higher)
  • ABAP Development Tools for SAP NetWeaver (version 2.19)

 

Tutorial Objectives

After completing this tutorial, you will be able to:

  • Declare an AMDP class
  • Declare an AMDP method
  • Implement an AMDP method
  • Consume an AMDP method in ABAP

 

Use Case Description

The Account Receivables accountant of your company want to be able to display the so-called top and flop customers in regards to their payment ability based on the gross amount of the open invoices.

The company accountant should be able to select how many customers have to be displayed per category and due to the regular update of the business data, the categorization have to be executed on-the-fly. Millions of open item invoices are typically processed in such tasks.

 

More information about the Open Items Analysis reference scenario underlying this use case is available under http://scn.sap.com/docs/DOC-41248.

 

Procedure Overview

ProcedureOverview.png

 

Step-by-Step Procedure

Step 1: Create an AMDP Class

 

In this step, you will create a regular global class and then mark it as AMDP class by specifying the tag interface for the SAP HANA database platform.

  1. Start the ABAP Development Tools (aka ABAP in Eclipse) - or your SAP HANA Studio - and open the ABAP perspective by selecting menu entry Window > Open perspective > Others…, and choosing the ABAP entry  in the appearing dialog box.

     

  2. Go to your ABAP project in the Project Explorer and create a new class in the package of your choice by selecting the context menu entry New… > ABAP Class

     

  3. Maintain the required information (e.g. ZCL_OIA_TOPANDFLOP as name and “EPM OIA: Best and Worst Customers” as description) and click on Next.
    Select a transport request if required and confirm the creation dialog.
    Step1_3.png

     

  4. Now go to the class definition and insert following line directly after PUBLIC SECTION:
          INTERFACESif_amdp_marker_hdb.

     

  5. Save.
    Toolbar_Save.png

    You've just created your first AMDP class!

Step 2: Declare an AMDP Method

 

You will now declare the method get_top_and_flop which will be implemented as AMDP method later on. This method has an importing parameter for specifying the number of customers to be retrieved for each category (top and flop), and two exporting parameters getting for the two requested result sets.

 

Info: An AMDP class can contain both regular ABAP methods and AMDP methods. An AMDP is declared like a regular static method or instance method in any visibility section. An AMDP method cannot be identified as such in the declaration part of the class. Nevertheless, the parameter interface of an AMDP method has to fulfill specific prerequisites. For example the parameters must be declared using VALUE for pass by value  and return values cannot be declared using RETURNING.

 

Before going ahead with the method definition, we first have to defined the type of the result sets.

 

  1. Define the two types ty_bupa_selection and tt_bupa_selection in the PUBLIC SECTION of the class definition - With ty_bupa_selection defining the table line of our return set, and tt_bupa_selection defining the type of the returned tables.
    For that just copy the below coding after the interface declaration done in the previous steps:

    TYPES:
      BEGIN OF ty_bupa_selection,
        company_name TYPE c LENGTH 80,
        gross_amount TYPE p LENGTH 8 DECIMALS 2,
      END OF ty_bupa_selection.

    TYPES:
      tt_bupa_selection TYPE STANDARD TABLE OF ty_bupa_selection WITH EMPTY KEY.

     

  2. Now define the public static method get_top_and_flop.
    Just copy and pase the coding below directly after the type definitions in the public section:

    CLASS-METHODS get_top_and_flop
      IMPORTING
             VALUE(iv_client)  TYPEmandt
        VALUE(iv_number) TYPE i
      EXPORTING
        VALUE(et_top)    TYPE tt_bupa_selection
        VALUE(et_flop)   TYPE tt_bupa_selection.

    Info: Analog to native SQL with ADBC and EXEC, the AMDP framework does not support automatic client handling. It means that in case of client-specific computations, the client context has to be passed to the AMDP method and used appropriately in the SQLScript coding.

     

  3. An error will be displayed in the editor due to the missing method implementation. Just use the Quick Fix (Ctrl+1) function “Add implementation for get_top_and_flop” to quickly solved this issue.

     

  4. Save your AMDP class.

 

Step 3: Implement the AMDP Method

You will now implement a relatively simple SQLScript-based AMDP method, which retrieves the best and worst customers depending on the gross amount of open invoices.

 

 

Info: Whether a method is implemented as ABAP or as AMDP method is not decided in the class definition, but rather in the class implementation.

An AMDP method is indicated as an AMDP method in the implementation part of the class using the addition BY DATABASE PROCEDURE of the statement METHOD. At the same time, the database platform where the method is used and the programming language used to implement the method are respectively specified with the additions FOR and LANGUAGE. Further additions are available.

 

  1. Mark the method implementation as an AMDP method.
    Go to the class definition and enhance the method with the required additions as displayed below:

    METHODget_top_and_flopBY DATABASE PROCEDURE
                              FOR HDB
                              LANGUAGE SQLSCRIPT
                              OPTIONS  READ-ONLY
                              USING snwd_so_i snwd_so snwd_bpa.

    ENDMETHOD.

    The compiler now knows, that the implementation of the method get_top_and_flop of the class ZCL_OIA_TOPANDFLOP is an SQLScript-based AMDP for the HANA database platform.The addition USING contains the name of the DDIC tables which will be used in the implementation.

     

  2. Now implement the database procedure by copying the SQLScript source below

    --retrieve the best customers
    et_top = selecttop :iv_number bp.company_name as company_name, sum(soi.gross_amount) as gross_amount
              from snwd_so_i as soi
              inner join snwd_so  as so
                on
    so.node_key = soi.parent_key and so.client = soi.client

              inner join snwd_bpa as bp
                on bp.node_key = so.buyer_guid and bp.client = so.client

              group by company_name
              order by gross_amount desc;

    --retrieve the worst customers
    et_flop =selecttop :iv_number bp.company_name as company_name, sum(soi.gross_amount) as gross_amount
              from snwd_so_i as soi
                inner join snwd_so  as so
                  on
    so.node_key = soi.parent_key and so.client = soi.client
                inner join snwd_bpa as bp
                  on bp.node_key = so.buyer_guid and bp.client = so.client
                group by company_name
                order by gross_amount asc;

    Note: The purpose of this tutorial is not to introduce the SQLScript programming language or to demonstrate how complex the logic of a database procedure can be. The above procedure implements a relatively simple data-intensive function, but of course very complex logic (making even use of the advanced HANA features and functions such as data mining and predictive analysis) can be implemented.

    As already stated, in case of client-specific computation, the client context has to be passed to the AMDP method and used appropriately in the SQLScript coding.


    Info: In order to quickly visualize whether a class contains AMDP methods and where, it is recommended to set a different background color for embedded languages – such as native SQL and SQLScript.
    To achieve this, go to the ADT menu entry Windows > Preferences and select the path General > Appearance > Color and Fonts > ABAP > Syntax Coloring > Embedded Languages (background color) and set the background color of your choice.

  3. Save and activate your AMDP class.

    You're now ready to test your AMDP method!
    AMDP_Class.png

Step 4: Create an ABAP Report consuming the AMDP method

We will now create and implement a simple ABAP report which call the AMDP method and display the result sets on the screen.

 

Info: An AMDP method is called like any other method in ABAP Objects. This requires, however, that the central database of the current AS ABAP is managed by the database system for which the AMDP method is implemented - meaning SAP HANA in our case. If not, a runtime error is produced. Detailed analysis of such error can be done using the tools of the ABAP Dump Analysis (ST22).

 

  1. Create the ABAP program ZR_OIA_TOPANDFLOP.
    Select the package of your choice, right-click on it and choose context menu entry New > ABAP Program.

    Enter the required information (name, a description - e.g. “Retrieve and Display Sales Order with Open Days and BuPa Data”-) and press Next.

    Select a transport request if required and press Finish to confirm the creation dialog.

     

  2. Now implement the report.
    For this purpose, just copy & paste the source code below into the ABAP editor.

    PARAMETER pnumber TYPE i DEFAULT10.

    DATA: lv_number TYPE  i.

    * set the value of the procedure input parameter

    lv_number = pnumber.
    * call  AMDP methods
    zcl_oia_top_and_flop=>get_top_and_flop(
                    EXPORTING iv_number = lv_number
                              iv_client = sy-mandt
                                                            
                    IMPORTING et_top =data(lt_top)
                              et_flop =data(lt_flop) ).
    * display the returned itab with TOP customers

    WRITE:/ 'Best customers:'COLOR COL_POSITIVE.
    LOOP AT lt_top ASSIGNING FIELD-SYMBOL(<f>).
      WRITE:/<f>-company_name , <f>-gross_amount.
    ENDLOOP.
    * display the returned itab with FLOP customers

    ULINE.
    WRITE: ' Worst customers:' COLOR COL_NEGATIVE.
    LOOP AT lt_flop ASSIGNING FIELD-SYMBOL(<g>).
      WRITE:/<g>-company_name , <g>-gross_amount .
    ENDLOOP.

     

  3. Save and activate your test report.

     

  4. You can now run the report (press F8) and see the result of your effort.
    Step4_4.png

Summary

Congratulations! You have just experienced how easy it is to implement an SQLScript-based AMDP and consume it in ABAP.

 

Regarding the transport aspect, AMDP classes are transported similarly to regular ABAP classes using the standard ABAP transport mechanism. No HANA artifacts have to be transported. This means that the HANA transport container and the HANA delivery units are not involved in this process.

 

You can have a look at video tutorials demonstrating how to create an AMDP and how to debug an AMDP here.

 

Tipp:As direct comparison to this "Top-Down"-approach, you can have a look at another step-by-step tutorial showing the "Bottom-Up"-approach for consuming the same HANA database procedures using an ABAP database procedure proxy.

 

Related Content


Handling Internal-table inside AMDP.

$
0
0

Hi All,

 

While developing AMDP class there must be a situation like how to handle internal table inside AMDP.

 

Well below is the example for that in short and sweet manner.

 

Before moving forward let's see an overview of AMDP and other intresting stuff is

here,

 

ABAP Managed Database Procedures - Introduction

Accessing tables from different schema through AMDP.

Call AMDP(ABAP Managed Database Procedure) Inside AMDP Method

 

Scenario :- 1.Suppose you have Airline code(Carrid) and connection number(Connid) in an internal table based on that you need to fetch data from inside AMDP.

 

Steps :

AMDP Definition :

 

 

 

Defination.PNG

 

AMDP Implementation :

 

 

Implimentation.PNG

 

Calling AMDP In Program :

 

Program.PNG

 

 

Output :

 

Output.PNG

 

 

Hope this will help,

 

 

Thanks & Regards,

Amol.

Embedded BW is the New Reality

$
0
0

When I said goodbye to life as a tenured employee and launched my own business 18 months ago, my driving force was a strong sense that the nature of application development in the enterprise was undergoing a profound change, and I wanted to be a part of that change and drive it forward.

blending.jpg

Fig.: Where previously separate things blend

 

I’m talking about the convergence of operational applications and analytics (hence the name, operatics). These used to be quite separate beasts in many ways: different systems, technology, programming models, data models, instances of the data, experts, users, user interfaces, clients, authorization concepts, and what have you. Two entirely different and separate worlds! Yet with the availability of HANA, this separation was becoming superfluous, and the job at hand was to remove the obsolete separation between the worlds of OLAP and OLTP both in a practical way and also to tear down the walls in people’s heads.


A full BW right under your nose!

I work mostly as a consultant for lead architects, senior developers, and IT department heads – people who know their stuff! In the past year, using BW on HANA in operational applications was a recurring theme at many of my engagements, but interestingly, most people didn’t know that there is a full BW right under their noses in every ABAP system – including ERP and CRM.

It takes just a few configuration steps to set up, and with various types of Virtual Providers at hand, it is easy to start reporting on any data you want. You don’t have to replicate any data into the BW stack, because you can directly access operational data both as transactional data (to replace traditional InfoCubes) and master data (to populate InfoObject texts and attributes), without necessarily creating any redundancies. (Note: If such redundancies serve your purposes, you’re of course free to create them, for example to establish sophisticated processes for managing data flows and data lifecycle management. But the decision is yours entirely.)

 

These are a few of my favorite things

You can do many things with it, and I will only highlight the best very briefly.

 

  1. Create BEx Queries right on top of operational data

Say goodbye to programming ABAP reports and to breaking your fingers creating your own Excel integration. Business Explorer (BEx) is a powerful tool for real-time slicing and dicing, and navigating through large and complex data sets.

 

  1. Leverage the power of formulae

Many people see this only at the second glance, but it’s quite a powerful feature and little-known outside the BW community: Part of the power of BEx Queries are complex formulae and structures. These are reusable objects that can be leveraged across multiple queries, and often the BW teams have a functional expert who is not a programmer and knows little about development, but is a wizard with BW formulae. These people know how to implement valuable business logic in BW formulae, and often this treasure is yours for the taking if you know how to tap their BEx queries or integrate their formulae into your own data flows. If the skills and the tools are readily available, you can also consider BW formulae as a building tools when implementing new business logic. It’s right there in the operational system and you can get hold of the data in many different ways.

 

  1. Access BW data locally with Easy Query

If you want to access the BW data programmatically from within the ABAP system, there are a number of different ways to achieve this, but Easy Query is probably the simplest. It requires you to tick a checkbox in the Query Builder, and as a result you get a function module that comfortably gives you the data in the query. You can then nicely encapsulate the function module (there are some tricks on how to do it dynamically so you will always be good even if the changes in the query force the function module to be re-generated, a new name is assigned, and so on).

 

  1. Publish BW data as OData services

This is my favorite. Again, there is just a checkbox that requires ticking in the query designer, and as a result you get a full-blown OData service that supports XML, JSON, complex filters, variables, aggregation, selecting the columns to be retrieved, and many other things. The OData services on top of BW queries are fast, flexible, and robust when the underlying queries or data providers change. It is very easy to access the data (among others) from web and mobile applications written in JavaScript, and to use fancy and powerful graphics frameworks to create amazing visualizations.

Once the data is available via HTTP and JSON, it is really unlocked, and you can let your developer muscles play.

 

  1. Combine classic OData services with BW-based OData services

Maybe you know how OData allows you to create associations between multiple entities. Tools like Web IDE use those associations to simplify the process of building Fiori apps in which the user can navigate across entities. From a developer perspective, that is already pretty fantastic. But it gets better. When you have OData services on top of BW queries, you can use associations to navigate from “normal” operational entities – typically representing single table records – to entities from BW queries, representing aggregations of billions of records that may even have gone through complex formulae. And the user in their Fiori app or freestyle dashboard won’t know the difference!

 

  1. Combine with HANA Cloud Platform

I’ve already mentioned how exposing BW queries as OData services really unlocks the data for flexible use in web applications and blending with line-item data. This is greatly facilitated by HANA Cloud Platform and the tooling around it: Just setup HANA Cloud Connector to give your HCP account (and only your HCP account) access to your Gateway services. Then start using Web IDE to build web applications and mobile apps to let your data off the leash and let it loose on your users.

 

The new reality

Thankfully, in the past few months, I have had several projects in which we used the Embedded BW to blend analytical aspects right into operational applications, locally and without the overhead that comes with having a separate BW system. Embedded BW is still one of the best-kept secrets of the SAP world, but it is in fact the new reality of architecting business applications. That is the convergence of operational and analytical applications occurring right here, right now.

Trigger BW Process chain from HANA

$
0
0

Hi,

 

I would like to know is there a way to trigger BW Process chain from HANA.

 

BW system will be on the same HANA instance.

 

Version: BW 7.4 SP 7

 

Appreciate any help on this!

 

Thanks and Regards,

Shravan Marathe

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 SAP GUI for Windows. Since SAP Basis SP11 the SAP GUI for Java 7.40 (as of revision 2) is also supported - the SAP GUI for HTML will follow.

 

FeatureNext SPSAP UI SP12SAP UI SP11SAP UI SP10SAP UI SP9SAP UI SP8SAP UI SP7SAP UI SP6*** NW 7.40 SP4NW 7.40 SP3NW 7.40 SP2NW 7.40 SP0*
Entities supported by ALV with Integrated Data Access (IDA)
DDIC views and tablesXXXXXXXXXXXX
Core Data Services(CDS) having simple projection (no analytics support) using native CDS name (don't use DDIC name)XXXXX
Basic Functions
Query push down, paging, filtering, sorting, grouping and aggregation in the ALV GridXXXXXXXXXXXX
API: Selection parametersXXXXXXXXXXX
API: Initial GroupingXXXXXXXXXXX
API: Initial AggregationXXXXXXXX
Integrated authority-check on SAP HANAXXXXXXXXXXX
Application defined authority providerXXXXXX
Unified consumption API for all databases - capability serviceXXXXXXX
Integrated text searchXX
Supported features of Core Data Services(CDS)
Usage of View ParametersXXXX
Support of Annotations(Key, Label, Currency+ Unit References)XXX
Exists Operator in CDS view Associations (Select Options compliant)XX
Special SAP HANA features
Text and fuzzy search on SAP HANAXXXXXXXXXX
Definition of the search scope for text searchXXXXXXXX
Consumption of DDIC external views ( Attribute Views only )XXXXXXXXXXX
Support for HANA native data types representing DDIC types (e.g. date, time)XXXXXX
API: Support for SAP HANA view placeholderXXXXXXXXXX
Default sorting with locale, binary search electableXXXXXXX
Influence the field attributes( Field catalogue API)
Setting of refererence fields (currency and unit relationship, setting of texts)****XXXXXXXXXX
Field display options (as button, icon, link) and their cell actionsXXXXXXXX
Setting of data elements exchanging the complete technical representationXXXXX
Set presentation mode 'Description' for a field having a DDIC domain fix value listXX
Layouting and Personalisation**
Basic layouting features (enabling, disabling of columns) in API and gridXXXXXXXXXXX
Fixed key columnsXXXXXXXXX
Personalized toolbar buttonsXXXXXXXXX
Table display options (title, alternating row pattern)XXXXXXXX
Non persistent personalisation (settings dialogue)XXXXXXXXXXX
Persisted personalisation (ALV variants)XXXXXXXXXX
Define a Start LayoutXX
Access of ALV variants in toolbarXXXXXX
Usability improvements (cell merging of sorted columns, empty table text)XXXXXX
Additional navigation possibilitiesXX
Functions
Single row selection and application functionsXXXXXXXXXXX
Double click enablementXXXXXXXX
Printing and Excel Export (limited to 100 000 selected cells)XXXXXXXXXXX
Support of Grouping lines in Excel Export (limited to 1 000 000 selected cells)X
Disabling of standard functions for business reasons (e.g. aggregation of status codes not allowed)XXXXXXXX
F1/F4 support in table cellsXXX

Additional features

Complex where conditionsXXXXXXXXXXX
Treating null values as initial values in database selectionXXXXXXXXXX
Calculated fields in ABAP (e.g. determination of icons)XXXXXXXXXX
Constant Currency for all values in a columnXXXXXXXXX
Integrated fullscreen modeXXXXXXXX

 

*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)

*** SAPUI 7.40 SP06 is delivered with NW 7.40 SP05 or separately. As UI delivers on a faster tact, we continue with the UI SPs

****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

ABAP for SAP HANA Reference Scenario - Video Tutorials

$
0
0

getting_started_bw.pngTutorials_bw.pngSupport_Packages_bw.pngVideos_co.png


This page provides a collection of video tutorials about ABAP for SAP HANA developements based on SAP NetWeaver AS ABAP 7.4 (and beyond). You can find more videos in the different playlists of the ABAP channel on Youtube.

 

Latest News : 

Feb 2, 2015: New videos available for CDS, AMDP and ABAP Channels.

 

 

ABAP Core Data Services (CDS)

Here are videos about the advanced view building based on ABAP CDS.

 

Introduction into advanced View Building - ABAP 7.4 SP5

Building CDS views in ABAP on SAP HANA - ABAP 7.4 SP5

CDS views with Input Parameters - ABAP 7.4 SP8 (New)

Modification-free Enhancement of CDS views - ABAP 7.4 SP8 (New)

 

Back to the top

 

ABAP Managed Database Procedures (AMDP)

The AMDP framework allows to create and manage database procedures from the ABAP environement. AMDPs are currently only supported in the SQLScript language for SAP HANA database.

 

Introduction into AMDP
- ABAP 7.4 SP05

Implementation of AMDP on HANA - ABAP 7.4 SP05

Debugging of AMDP on HANA
- ABAP 7.4 SP05

Modification-free Enhancement of AMDP using BAdIs - ABAP 7.4 SP08 (New)

Back to the top

 

Other Capabilities

SAP List Viewer with Integrated Data Access - ABAP 7.4 SP05

Search Help with Type-Ahead and Fuzzy Search - ABAP 7.4 SP05

 

 

Performance Tooling

Find optimizable Custom Code with the SQL Performance Tuning Worklist - ABAP 7.4 SP05

 

 

ABAP Channels (New)

All three videos below are based on AS ABAP 7.4 SP05.

 

Working with ABAP Push Channels (APC)

Working with ABAP Messaging Channels (AMC)

Implementing Collaboration Scenarios using APC & AMC

Back to the top

 

Proxy-based Consumption of HANA artifacts

This approach, aka Bottom-Up approach, should only be used in special use cases. The Top-Down approach based on ABAP Core Data Services or ABAP Managed  Database Procedures should be used instead. Read more...

All three videos below are based on AS ABAP 7.4 SP2.

 

Using native HANA procedures in ABAP (Related SCN document)

Using native HANA Views in ABAP

(Related SCN document)

Using the HANA Transport Container

(Related SCN document)

 


Back to the top

Analytic privileges when calling HANA Procedure in ABAP

ABAP on HANA Use Cases in Day to Day Project Development.

$
0
0

Hi Expert,

I am searching such a use cases where i can showcase Code Push down Technique. Do you have such use cases? I have already read about EPM and OIA use cases, but i am looking for real time Project development.

I think, this would be a custom report, which is doing some aggregate calculations on database record.

Thanks a lot for your support & help.


Execute ABAP Reports on HANA

$
0
0

Hello Experts,

 

Can we execute Existing ABAP reports directly on HANA.

Any method that can execute SQL Queries in ABAP reports on HANA without creating Secondary DB connection.

 

We are using HANA as sidecar approach. Do we need to follow any other approach for this?

Can HANA be set as primary database for ABAP, if yes then how?

 

 

Thanks and Regards

Jitin Kharbanda

TRILUX Faster and More Flexible Sales Planning and Forecasting with ABAP for SAP HANA

$
0
0

Explore how TRILUX stays among the leaders in the highly competitive lighting market with improved sales planning and forecasting, thanks to unmatched speed and analytical capabilities delivered by SAP HANA, providing faster processing, more flexibility, and greater accuracy in sales planning and forecasting.

View this Document

ATC not catching customizing table error

$
0
0

Hello Gurus,

     I created a program with code containing "Select * from T001" and ran ATC check. But ATC doesnt error for "Select *". Is it that ATC doesnt give "select *" error for customizing tables..?? Please help..

Questions on CDS Views with input parameters

$
0
0

Dear Experts,

 

1. Can we call a CDS View (or generated database view) with input parameters inside an AMDP? I am looking for something similar to the feature in HANA where we can consume calculation view with filters inside SQL Script?

 

2. I understand we can next CDS Views, but how we can next (call) a CDS View with input parameters inside another CDS View?

 

 

Thanks,

Giri

Is there a (supported) way of migrating regular ERP IDES system to HANA for use of Simple Finance?

$
0
0

We have installed a SAP ERP IDES system but we'd like to try out Simple Finance. We could do a fresh install of ERP but we like the demo data included in IDES system. Is there a simple SAP supported way of migrating our system (or data to be precise)?

raising cx_amdp_error

$
0
0

Hi

 

I am defining a method like this

 

METHODS retv_proj_rep

    IMPORTING

        value(iv_com)   TYPE bsik-bukrs

        value(iv_lifnr)  TYPE mseg-lifnr

      EXPORTING

        VALUE(et_proj_rep) TYPE tt_prj_rep

 

 

     RAISING cx_amdp_error.

 

It is throwing an error

Capture31.PNG

Any help on this would be useful.

 

Thanks and regards

Arun Kumar Menon

CDS View

$
0
0

Hi experts,

 

I have a problem, I'm trying to consume "DDL Source" which is a view of a table, the view contains parameters, but when attempting to activate from BW generates an error, but does not specify which error. It has something to do with

 

"W:The database feature "VIEWS_WITH_PARAMETERS" is used here (read the long text)"

 

I used

cl_abap_dbfeatures=>use_features(

                    requested_features = VALUE #( (

                    cl_abap_dbfeatures=>views_with_parameters ) ) ).


but still generates the error.

 

thanks for the help


ALV with IDA and background job

$
0
0

Hello,

 

However new ALV surpass old solutions in almost every aspect, I have noticed a small limitation.

When I run the report in background (either manually or via job), I get the short dump and job is cancelled.


I know that the purpose of paging is obvious in case of transactional use, but there are plenty of usecases, when users want to get the result of the whole list from the spool (e.g. as an attachment in the e-mail).

 

If background job is not supported, I think, it is worth to be mentioned explicitly.

I have gone through the reference in help.sap.com and there is nothing written about background processing in Restrictions tab.

 

 

Kind regards,

Radek Gref

Scripting Language with AMDP

$
0
0

Is SQL script the only language that can be used for AMDP with SAP HANA Database?Is SAP trying to accomodate other scripting langauges with AMDP going ahead?

ABAP : HANA : Connectivity

$
0
0

Dear All,

Am new to HANA. I’m a abaper. I’m trying to create abap program to access hana.

All I did till now is ,

Installed HANA and ABAP in Ecclipse.

Create account for trial version on SAP HANA CLOUD PLATFORM COCKPIT.

Create account in CLOUD APPLIANCE LIBRARY.

Now am trying to add System in IDE  so that I can access hana db. I need to give the host name. which is not available in the Cloud Appliance library.

 

1.jpg

2.jpg

3.jpg

4.jpg

 

Kindly help me out to solve this issue.

 

Regards,

Sindhuja

Secondary database connections in AMDP

$
0
0

Hi all,

 

I'm trying to write a simple method which will use a secondary database connection (new functionality available for AMDP - New in AS ABAP 7.4 SP8 - Use of Secondary Database Connection when calling AMDP Methods).

 

My sample code is as below:

 

CLASS Z_CL_JK_AMDP IMPLEMENTATION.

 

 

  METHOD classify.

    me->JK_CLASSIFY_AMDP(

      EXPORTING iv_client         = sy-mandt

                it_bp_id          = it_bp_id

                connection        = 'R/3*KJ1'

      IMPORTING et_classification = et_classification

       ).

 

 

  ENDMETHOD.

 

 

  METHOD JK_CLASSIFY_AMDP BY DATABASE PROCEDURE

                       FOR HDB

                       LANGUAGE SQLSCRIPT

                       USING snwd_bpa.

 

 

[some other code]

 

  call "KEANEJ"."JENINSERT"();

 

  ENDMETHOD.

ENDCLASS.

 

I have verified that the call to the procedure works on the default connection. The secondary database connection KJ1 exists, and the user with which it is associated has permissions on the relevant HANA parts to work (schema permissions, etc). However, the editor (in eclipse) shows an error that the procedure JENINSERT doesn't exist (which it does't on the ABAP system, but does on the DB to which the secondary connection exists).

 

Additionally, some testing on another ABAP system leads me to believe that there may be some sort of fallback functionality, that perhaps it defaults to the DEFAULT connection if it can't find the secondary connection? If I comment out the procedure call, for example, and run the method above, it runs correctly, although the call out to the KJ1 connection doesn't seem to happen. If I change the name of the connection to something that I am sure is not a connection, the method will still run, which is why I think it may be defaulting to the DEFAULT connection.

 

Has anyone used the secondary database connection functions? Have I gone wrong somewhere, perhaps in the format of my connection?

 

 

Thanks,

 

Jen

Concatenate in CDS

$
0
0

Hi,

 

I am creating CDS view and i have requirement like below.

 

I have one field suppose 1200 and other field is TEXT

The output should be 1200-TEXT

I am using concat(1200, '-', TEXT) but its not accepting.

 

 

Thanks,

Charu

 

Message was edited by: Jasmin Gruschke

Viewing all 831 articles
Browse latest View live


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