Quantcast
Channel: SCN : Discussion List - ABAP for SAP HANA
Viewing all 429 articles
Browse latest View live

ABAP CDS views - SQL trace

$
0
0

Hi,

We have plans to write ABAP CDS views to standardize business logic/data extraction so that development team can make simple queries on CDS views. So we are writing generic CDS views means without many "WHERE" conditions.

I'm trying to understand how it works and impact on the performance when these CDS views are consumed for any particular Plant or Company code.

 

Let us  say I have below CDS view called "ZCDSV_TEST"

select * from vbak inner join vbap on vbak.vbeln = vbap.vbeln  { <fields> }.

 

I would like to understand when it is consumed in 2 ways in terms of performance (SQL)

Select * from ZCDSV_TEST  <<<<  1M records

Select * from ZCDSV_TEST WHERE Vkorg = '0001'  <<<< 25K records.( Does this extract 1M records first and then apply WHERE condition to get to 25K.

 

Would like to understand these type of technical details. Appreciate your inputs.

 

Cheers.

Laks


Table name with special character '/' in from clause of select query of AMDP procedure.

$
0
0

Hi All,

 

I have created AMDP procedure and trying to consume in AMDP class which is implementing  the required AMDP interface and everything is working fine, but  in my procedure i am trying to use one table name (which has special character '/' in it) which is giving an error.

 

Please find my procedure as follows:

 

      METHOD my_hana_procedure by database procedure

      for hdb

      language sqlscript

      options read-only.

      using /CPD/D_PFP_TEST.

 

               table = select  * from  /CPD/D_PFP_TEST;  /*------ Here i will get an error saying SQL SCRIPT : &a0&a1&a3&a4.......&a9   */


     ENDMETHOD.

 

Note: The above mentioned table /CPD/D_PFP_TEST is in system SID schema.

FYI, If i am using any table which do not contains special character '/' in it will work without any error.

 

Did anyone faced the same issue?, at least here error information should be meaning full we can correct our errors inside AMDP procedures.

 

Thanks in advance,

 

Avinash

Consumption of ABAP CDS view in BW

$
0
0

Hi colleagues,

We have an ABAP CDS view with key figures. When using @Analytics.dataCategory: #CUBE annotation, the transient query gets created but the key figures are not getting included in the infoprovider. How do i solve this?

CDS - Primary key

$
0
0

hi,

 

I have created a CDS view but the problem in that is all fields defined are marked as primary key. I have defined the "key" for only the first two fields but the other four fields are set as primary as well. How to avoid it?    

 

Regards,

Prem

Problems on CDS Views performance

$
0
0

Hi Guys,

 

I'm having problems with CDS View now, I have a table ACDOCA which has 400 million rows, and in the CDS View(say CDS View Main),  ACDOCA(only some fields are used) is used to join 3 other tables.

And I found in PlanViz that all 400 million rows are used to do the join, it consumes a log memory and VERY SLOW.

 

I write a CDS view(CDS View Agg) in which I select the used fields from ACDOCA and do the aggregation, the result is about 1 million rows, then I use CDS View Agg in CDS View Main to replace ACDOCA.

 

I thought this should solve the performance problem, but it didn't. In PlanViz I still see 400 million in join.

 

Please help how to avoid doing such weird thing, I don't think there's any benifit in it.

 

Regards,

Blangero

Getting error 'Unhandled event loop exception' during activation of Attribute/Calculation views in SAP HANA Studio

$
0
0

Dear all,

 

I'm getting error as 'Unhandled event loop exception' during activating Attribute/Calculation view in SAP HANA Studio.

 

Could you please help me to resolve this issue ?

 

Error is coming as follows(attached file also):

 

java.lang.NoSuchFieldError: CONNECTION_STATUS_KEY

  at com.sap.ndb.studio.dwb.tools.core.internal.destination.SapSystemDestination.getState(SapSystemDestination.java:159)

  at com.sap.ndb.studio.dwb.tools.core.internal.destination.SapSystemDestination.ensureLogon(SapSystemDestination.java:253)

  at com.sap.ndb.studio.dwb.tools.changetracking.providers.DestinationInfoProvider$DestinationInfo.<init>(DestinationInfoProvider.java:42)

  at com.sap.ndb.studio.dwb.tools.changetracking.providers.DestinationInfoProvider.<init>(DestinationInfoProvider.java:149)

  at com.sap.ndb.studio.dwb.tools.changetracking.providers.DestinationInfoProvider.getInstance(DestinationInfoProvider.java:158)

  at com.sap.ndb.studio.dwb.tools.changetracking.providers.ChangeTrackingProvider.getChangeInfo(ChangeTrackingProvider.java:70)

  at com.sap.ndb.studio.modeler.actions.ActivateAction.singleObjectActivationFromEditor(ActivateAction.java:719)

  at com.sap.ndb.studio.modeler.actions.ActivateAction$3$1.run(ActivateAction.java:562)

  at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:187)

  at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:156)

  at org.eclipse.swt.widgets.Display.syncExec(Display.java:4734)

  at com.sap.ndb.studio.modeler.actions.ActivateAction$3.run(ActivateAction.java:557)

  at org.eclipse.jface.action.Action.runWithEvent(Action.java:519)

  at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)

  at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)

  at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)

  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

  at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)

  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)

  at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)

  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)

  at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)

  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

  at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)

  at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)

  at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)

  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)

  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)

  at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)

  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)

  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)

  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)

  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

  at java.lang.reflect.Method.invoke(Method.java:483)

  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)

  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)

  at org.eclipse.equinox.launcher.Main.run(Main.java:1465)

 

eclipse.buildId=unknown

java.version=1.8.0_20

java.vendor=SAP AG

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US

Command-line arguments:  -os win32 -ws win32 -arch x86_64

Problem with cl_salv_gui_table_ida

$
0
0

Hello,

 

I'm using the new ALV 'cl_salv_gui_table_ida' combined with a Core Data Service. I've activated the toolbar text search and enabled the search for a plenty of columns:

 

    go_alv_display->field_catalog( )->enable_text_search( 'NAME1' ).

    go_alv_display->field_catalog( )->enable_text_search( 'ORT01' ).

    go_alv_display->field_catalog( )->enable_text_search( 'PSTLZ' ).

    go_alv_display->field_catalog( )->enable_text_search( 'INFNR' ).

    go_alv_display->field_catalog( )->enable_text_search( 'LIFNR' ).

    go_alv_display->field_catalog( )->enable_text_search( 'LIFNR_2' ).

    go_alv_display->field_catalog( )->enable_text_search( 'MAKTX' ).

    go_alv_display->field_catalog( )->enable_text_search( 'SMTP_ADDR' ).

    go_alv_display->field_catalog( )->enable_text_search( 'ORT02' ).

 

The search is working for the fields NAME01, ORT01, PSTLZ, MAKTX, ORT02, The other columns don't work in the search.

 

I've checked the coding and found out that the search_scope is just filled with the working columns.

 

Class: CL_SADL_ABQI

Method: _GET_SEARCH_SCOPE

 

But I couldn't find the coding where the scope is filled.

 

Thx for your help!

Frank

I am looking SAP CATS test cases

$
0
0

Can some one share , SAP CATS to Field glass test scenarios?

 

and CA PPM to SAP CATS, SAP PS test cases?


CDS View for a range- how to create one?

$
0
0

hi all,

 

I can not create a CDS view like this:

@AbapCatalog.sqlViewName: 'zddl_test2_hana'

@AbapCatalog.compiler.CompareFilter: true

@AccessControl.authorizationCheck: #CHECK

@EndUserText.label: 'test2'

define view Zddl_Test2

(vbeln,vkorg,vkgrp,erdat)

as

select from vbak {

'I' AS sign,

'EQ' AS option,

  vbak.vbeln AS low,

  ' ' AS high

} where augru <> ''

Its says that optıons is a reserved word which it

Error at update statement in AMDP procedure

$
0
0

Hi All,

 

I have created the AMDP procedure as follows:

 

 

METHOD my_hana_procedure by database procedure

                           for hdb

                           language sqlscript.

 

lt_temp_tab = select *from :i_view;     -----> copying an entire data from importing parameter i_view to temporary table lt_temp_tab 

 

begin

     declare cursor c_cth_data for     -----> Declaring cursor to loop through result set of table

      select * from :lt_temp_tab;

       for r1 as c_cth_data do

     

         update :lt_temp_tab                    -----> Here we are getting an error (some weird error as SQL script error : &a1&A2&a3&A4).

          set S_FPCA = (r1.S_FTCA * 0.014)   -----> logic here is to update row field of a temporary table to some new value

             where S_FRES = r1.S_FRES;

            

       end for;

end;     

 

 

ENDMETHOD.

 

instead of importing temporary table if i use any other table like SFLIGHT i will not get any error.

Is there any restriction that we cannot use update for temporary table (lt_temp_tab) as explained above in procedure in AMDP procedure?

Please suggest me here .

 

Thanks in advance,

Avinash

HASH_SHA256 function in ABAP CDS views

$
0
0

Hi,

Is there a way to use the HASH_SHA256 SQL function in CDS views built on ABAP for HANA?

 

Kalyan

Where is table BUT050 in CRM on HANA ?

$
0
0

Newbie question, Where is table BUT050 in CRM on HANA ? Is it accesible from hana studio ? Thank you.

sum 16 starting error in SAP HANA S/4 1511 CORE

$
0
0

Hi All,

 

I have installed SAP HANA S/4 1511 CORE (Back end server) on Linux SUSE Power PPE 64-bit with SAP_BASIS version as 750. and SP is 00. I am in process of update the SP using SUM16. But when I am executing command ./STARTUP confighostagent <SID> and log in in chrome with user id <SID>adm and its password, it is giving error as below :

Internal Server Error

Operation [id=8676251155141EE5BEDCF9ABA942DF8B] terminated with errors : 127 (null)

 

I have upgraded the hostagent 7.21 to patch 12. But still getting the above error.

 

Can anyone please help.

 

Thanks,

Sarang.

 

 

Untitled.png

is internal table processing faster in AMDP?

$
0
0

Hi all,

 

Is internal table processing faster in AMDP?

 

Context :

We have abap code which is currently taking up ~80% of execution time.

When analyzed we see it's all looping into internal tables in abap.  Calculating and updating the same internal tables.

Is it a good idea to do these calculations in AMDP ? Will that give us any benifit ? i doubt...

Refresh ALV IDA with CDS

$
0
0

Hello,

 

I'm using the SAP Listviewer with Integrated Data Access (ALV with IDA) with a core data service. I implemented a toolbar function to delete purchase order sets. After the user deleted a purchase order set I want to refresh the ALV to display the updated data.

How does it work?

 

Thanks!

 

Best Regards

Frank


What are the possible scenario's in SAP HANA Side Car Approach

$
0
0

Hi Everyone,

 

Looking for some information on below situations in case of SAP Hana Side Car Approach.

 

    • Which of the ways are suitable/feasible in Side Car Approach - AMDP's, ADBC's and Creation of CDS views.
    • In a Side Car Approach, how do we leverage HANA Capabilities to Standard API like BAPI's, FM's and Stadard Programs/Reports.

 

Your help on above questions is highly appreciated.

 

Thanks,

Sraveen Reddi.

Cant find methods in the class CL_MMPUR_REQ_CONTEXT

$
0
0

Hello guys .
I was trying to implement the NOTE 2285354 in wich is described to do a manual activity to these methods


IWBEP/IF_MGW_REQ_ENTITYSET~GET_CRP_PLACEHOLDER_INFO

IWBEP/IF_MGW_REQ_ENTITYSET~GET_CRP_PLACEHOLDER_VALUATION

IWBEP/IF_MGW_REQ_ENTITYSET~GET_CRP_PROVIDER_REQUEST

IWBEP/IF_MGW_REQ_ENTITYSET~is_crp_cached_request

IWBEP/IF_MGW_REQ_ENTITYSET~IS_CRP_REQUEST_CACHING_ALLOWED


but when i check the interface IWBEP/IF_MGW_REQ_ENTITYSET  cant find the above methods.


Have tried to create them manually but don't know the specifications for the parameters to insert on each of them . ,

 

If anyone has faced this problem before,or has already implemented this note please
either tell me if there is any prerequisite note to be installed in order to create the above methods
or please check the parameters on each of these 5 methods and reply  to  my thread with them .

 

Thanks in advance .
BR
Elton

Type mismatch in AMDP with Fuzzy Search

$
0
0

HI,

 

I am implementing a full text search using AMDP and I want to return also the result of the HIGHLIGHTED function.

But I always get a type-missmatch between the result of the function, and the definition of the output of my AMDP-class.

 

This is the definition of the outpup-structure:

      BEGIN OF ty_struc,

        score         TYPE za_hana_score6_5,

        text          TYPE /bobf/text_content,

        snippet      TYPE string,

        highlighted   TYPE string, " /bobf/text_content,

        host_key      TYPE /bobf/conf_key,

        text_type     TYPE za_bopf_text_type,

        text_subtype  TYPE za_bopf_text_subtype,

        language_code TYPE spras,

      END OF ty_struc,

 

And this is the SELECT-statement:

    rt_table = SELECT

         score() as score,

         content.text ,

         SNIPPETS (text) as snippet,

         highlighted (text) as highlighted,

         collect.host_key,

         hdr.text_type,

         hdr.text_subtype,

         hdr.language_code

 

This is the error I get:

 

return type mismatch: Type "79"  of attribute "HIGHLIGHTED not compatible to type "56"  of attribute "HIGHLIGHTED"

 

where "56" is the definition out of the SELECT.

The SNIPPET works perfectly ...

The original type ( /bobf/text_content ) is also a string.

 

Has anyone any idea how I should define the highlighted-field in the output structure of my class, to avoid this mismatch.

Kind Regards.

Krisz

/namaespace/J_ST is too long(>4096)

$
0
0

Hello Experts,

 

I am getting an error like /namaespace/J_ST is too long(>4096) when tried to activate a CDS view. This view has relationship with lots of other views and I have created the associations and joins with them. Does this error mean ABAP CDS view has limitation in number of association or joins that can have in a view. Please advice.

 

Regards,

Nithin

Using OData custom query options (URL parameters) in Gateway

$
0
0

Hi,

 

I created a CDS view with explicitly defined parameters and generated a Gateway OData service on top using SADL. Now I want to use OData custom query options to map them to the CDS parameters. I'm quite sure that this will not work automatically.


I'm already able to set the CDS parameters in the OData service DPC_EXT class manually, using the method if_sadl_gw_query_control~set_query_options.


METHOD if_sadl_gw_query_control~set_query_options.

     IF ( iv_entity_set = 'POIPARAMSet' ).

          IF sy-subrc = 0.

               io_query_options->set_entity_parameters(

                    it_parameters = VALUE #( (

                         entity_alias = 'POIPARAMSet' parameters = VALUE #( (

                              name = 'P_PurchaseOrderNetAmount' value = '10'

                         ) )

                    ) )

                )

          ENDIF.

     ENDIF.

ENDMETHOD.

 

However, I want to use custom query options (URL parameters) and want to map them to CDS parameters within the DPC_EXT class.

 

The URL looks like:

...ZBF_POIPARAM02MAN_SRV/POIPARAMSet?P_Material='STANDARD'

 

Unfortunately, these custom query options are obviously not parsed by Gateway. I can't find them anywhere in the data structures of MR_REQUEST_DETAILS or MO_CONTEXT. Fields like PARAMETERS, MT_PARAMETERS or URI_PARAMETERS are empty or containing other stuff. The custom query options only appear in the ~request_uri header parameter in a non-parsed way like

 

....?param1=1&param2=2&param3=3....  [figure01]

 

Of course I can parse the query string myself but I believe there must be an other way to access them. However, I also read in a SCN post from 2012, that SAP doesn't support this aspect of the OData standard. Is this still true?

 

>> Query parameters in CRUD operations

 

Kind regards, Tobias

Viewing all 429 articles
Browse latest View live


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