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

How can we use general standard tables of sap like mara and marc for creating views in hana.I am having a trial access to AWS CAL system of hana for abap.

$
0
0

How can we use general standard tables of sap like mara and marc for creating views in hana.I am having a trial access to AWS CAL  system of hana for abap.When I create views  how can I Insert common and general tables of SAP in those views ?


Not able to add a table like LIKP to hana from ECC using SLT

$
0
0

>SLT configuration is already in place and destination schema

 

>I am going to hana modeller perspective and in quick launch selecting Data provisioning option

 

>after loading a table nothing happens

 

there is no LIKP table entry in the "DATA request management " window

 

>only change i can see is there is an entry in the RS_ORDER table for LIKP.

 

 

I want to replicate few tables from ECC to HANA

 

 

when I do Job  Health check at TCODE LTRC I get the following error logs -

 

Connection 013:R:C to target system is not active (MT ID 013)

No master job detected

The troubleshooting activity has detected critical issues


when I do TABLE  Health check at TCODE LTRC I get the following error logs -


Table LIKP not found in the control table DMC_MT_TABLES

Log table  not found in the sender system

Trigger LIKP is not active (trigger status is  0-INITIAL)

Trigger LIKP does not exist in the source system

The troubleshooting activity has detected critical issues



"Along with the problem please tell the solution also as I  am new to HANA" Thanks

'Order by' clause in CDS view

$
0
0

Hi,

as I didn't find it in the HANA developer guide/Google/Portal search:

is it possible to use the 'order by' clause in the define view statement?

Like :

define view xy as select from db_table ORDER BY field?

thanks and Kind Regards,
Tibor

hana as secondary database execute query limit

$
0
0

Hi All,

we are currently using HANA as a secondary database and use  execute_query  to call some of our SP's.

I am currently facing an issue where when we call around 30+ execute statements it gives an error on all subsequent executes.

 

Sample code to replicate issue. In my system it reach the break-point when the count is 31.

 

has anyone had an issue like this ?

 

DATA lr_exception TYPE REF TO cx_sql_exception.
 DATA lr_sql TYPE REF TO cl_sql_statement.
 DATA lr_result TYPE REF TO cl_sql_result_set.
 DATA lr_connection TYPE REF TO cl_sql_connection.
 DATA: lv_count TYPE I,       lv_NUM TYPE char4,       lv_qurrey TYPE string.
 lr_connection = cl_sql_connection=>get_connection( 'DEFAULT' ).
 CREATE object lr_sql
 EXPORTING   con_ref = lr_connection.
 DO 100 TIMES.   lv_count = lv_count + 1.   TRY.     lv_NUM = lv_count.     CONDENSE lv_NUM.     CONCATENATE 'CREATE LOCAL TEMPORARY TABLE #TMPDATA' lv_NUM ' LIKE MAKT'     INTO LV_QURREY RESPECTING BLANKS.     lr_sql->execute_query( LV_QURREY ).   CATCH cx_sql_exception INTO lr_exception.      BREAK-POINT.     lr_connection->close( ).     EXIT.     ENDTRY.
 ENDDO.

WebDynpro access to ADSO

$
0
0

Hi all,

 

I need your help regarding ADSO and WebDynpro.

 

In BW it's possible to set a DSO to direct update (ODSO) to edit the DSO data directly via function modules (like RSDRI_ODSO_MODIFY) or SQL statement without activation.

But on HANA I now want to use an ADSO for the same purpose.

Are there any function modules available for this scenario?

Is there any possibility to auto-increment my index-field when the data set is new?

Data are written into ADSO table /BIC/A…….1 (= New data), is it neccessary to insert RECORD or can I also use my specified index?

 

Many thanks for your help.

 

Best regards

Moritz

Error "The elements in the "SELECT LIST" list must be separated using commas"

$
0
0

Hello experts,

 

 

I am creating my first DDL's and Views but I'm having uam error mkensagem to generate resustados the same. Mensagemd and error as the image attached. It activates without error but does not generate results!

 

Could someone help me .. following image of error and code ...

 

 

codigo.PNGerro 1.PNG

Convert varchar column to numeric (int or decimal)

$
0
0

Hello,

 

By uploading a big flat file (1.5 GB) into HANA the columns are only recognized as varchar and I don’t have the possibility to change the data type.

 

I've already tried this: creating a table with the correct type (currencies as decimal (17,2) and quantities as decimal (17,2). But by uploading the table, the mapping doesn’t work. The error message said that I could not map from varchar to decimal. I tried with all numeric data type and it’s not working.

The problem is that the table is quite big. I cannot open it in excel or in notepad, notepad++, etc.

 

Could you please tell me how I can convert the data type of columns to a numeric type (integer or decimal)?

 

 

Big thanks!

 


Regards

Sylvan

Table input parameter for Class: CL_SQL_STATEMENT Method: SET_PARAM -> Example

$
0
0

Hello experts,

 

is there any example to pass an table input parameter for a stored procedure?

 

I would like to pass the following param in the screenshot from ABAP to the stored procedure:

 

PARAM.JPG

 

Thanks in advance and best regards,

Heinrich


Enterprise Searach on HANA Dev. Guide / Sample

$
0
0

Hello colleagues,

 

I'm quite new to the topics and I can not find a proper documentation and samples.

I'm looking for a nice developer guide describing E2E development procedures of the searches on Enterprise Search on HANA.

In past, the Enterprise Search models need to be created in ESH_COCKPIT and ESH_MODELER transactions.

Once everything is done, you index the model and you are ready to consume it e.g. with CL_ESH_IF_SEARCH_REQUEST.


Now i learned that on HANA we have some annotations, like "@Search", "@EnterpriseSearch." and "@EnterpriseSearchHANA.".


I created the following CDS:


@AbapCatalog.sqlViewName:'ZTEST_ODATA_CDSV'

@AbapCatalog.compiler.compareFilter:true

@AccessControl.authorizationCheck:#NOT_REQUIRED

@EndUserText.label:'Test OData CDS'

@OData.publish:true

@Search.searchable:true

@EnterpriseSearch.enabled:true

@ObjectModel.semanticKey:  ['CARRID']

 

 

defineview Ztest_Odata_Cds as

   selectfrom scarr as scarr {

 

    //-------------------------------------------------

    @EnterpriseSearch.presentationMode:  [#DETAIL]

    @EnterpriseSearch.usageMode:  [#AUTO_FACET]

    key

    scarr.carrid,

   

    //-------------------------------------------------

    @EnterpriseSearch.presentationMode:  [#TITLE]

    @Search.defaultSearchElement:true

    @EnterpriseSearch.usageMode:  [#SUGGESTION]

    @Search.ranking:#HIGH   

    @Search.fuzzinessThreshold:0.8 

    scarr.carrname,

   

    //-------------------------------------------------

    @EnterpriseSearch.presentationMode:  [#DETAIL]

    @EnterpriseSearch.usageMode:  [#AUTO_FACET]

    scarr.currcode,

   

    //-------------------------------------------------

    @EnterpriseSearch.presentationMode:  [#DETAIL]

    @EnterpriseSearch.usageMode:  [#AUTO_FACET]

    scarr.url

 

  };


After activation, it has created a new connector inESH_COCKPIT:  ZTEST_ODATA_CDSV / P4ALL~ZTEST_ODATA_CDSV~.

But no model under SAPCDS has been created. And of course it does not work, tested with report ESH_TEST_SEARCH.


I'm wondering, how this all should work?

Do you know any E2E development guide or very simple example, like mine?


I have posted the same query on Enterprise Search community, but no response so far -  Re: HANA Enterprise Search Developer Guide and Samples


Thanks and Regards,

Dima



 

 

 

If else based on tables in AMDP

$
0
0

Hello,

 

I need to compare three tables and determine a field from it i.e if the field is available in the table 1, retrieve the same else retrieve from table 2 or else from table 3.

 

Can someone give me pointers as to how to arrive at this logic?

 

Thank you.

 

Regards,

Prem

ORDER BY in Custom-Code for HANA

$
0
0

Hi,

 

we are currently checking our custom-code and the most painful finding is the missig ORDER BY Statement. Before we checked our code we've searched the internet for hints to adjust the abap-code for hana. But in our findigs there were no explicit hints to the ORER BY. The Document "Condiderations for Custom ABAP Code During Migration to SAP HANA" describes the implicit sorting but there is no REDLIGHT for that.

 

In my opinion this is the most frequently finding in custom-code!

 

So I have a question for all custom-coders: ow shall we deal with the ORDER BY? Adjust all findings (we have more than 2500 findings!!!)? Adjust only special findings - but what ist "special"? Or no adjustments an we will see what happens in our functional tests?

 

Regarding for your answers. Thx.

Andi

ATC Configuration

$
0
0

Hi All,

 

I have couple of questions relating to ATC.

 

1. While setting up the variant for ATC in SCI transaction, when we enable the search operation "Search DB Operations", it searches all the SELECT statements as well. Now, we will definitely require UPDATE / MODIFY to be searched so that we can ensure that LOCKING concept is applied wherever necessary but we will definitely not need SELECT statements to come up in the ATC results. What is the actual use of getting SELECT in the ATC result ?

2. In continuation with the first question - if we want to set up the ATC exemption approval workflow, then it puts lot of headache on the QA to exempt SELECT statement findings (though we have date control - we can put 31/12/9999). Similar concern is with other DB operation findings viz, OPEN, FETCH, CLOSE - where we do not address the finding and have to go for exemption.

 

Is there any way, we can avoid specific sub topics to be ignored during the ATC run itself ?

 

 

Thanks & Regards

Srinivas Rao.

Fiori/UI5 + CDS + BOPF - For beginners Part 1

$
0
0


This blog is for developers who wants to get started with the UI5/Fiori + OData + CDS + BOPF.


Prerequisite: 

1) Concepts of Core Data Services(CDS)

2) Basic Understanding of OData service

3) Concepts of BOPF

4) Conceptual knowledge of Fiori(Smart Template)


The Fiori/Ui5 is for the UI part, the CDS is for the data retrieval(code push down) while the BOPF is for handling DB activities.

 

Technically in the S4 Hana world, with the Code-Push down paradigm the intense business logic should happen in DB layer rather than in ABAP Application server.  This blog is for pure test demo using CDS + BOPF to display the Fiori App. The performance optimization is not the intention here, but rather on how to use CDS + BOPF to get started with in S4 Hana Cloud.

 

Am using Web IDE environment with cloud connector to display the Fiori app. Let me quickly show how does the app look like.

App Look and feel.jpg

The + and Delete buttons are part of the BOPF framework while the other action is manually created in BOPF. We shall get into the details later on.

 

 

 

Lets get started with the development.

 

 

Initial set up required

1) You need HANA studio or Eclipse tool as we need to use ADT(ABAP Development Tool)

 

2) For hosting the app, Web IDE has been used. I recommend checking the link on how to install and set up the Web IDE trial and how to set up the Cloud connector.

 

3) System is S4 HANA ON PREMISE 1.0 with ABAP 7.50


For those who are using Hana account trial, the link in step 2 will take care of the web IDE including the cloud connector. Make sure the cloud connector is connected to the backend system as per the set up in step 2.


If the Cloud Connector set up is done, it should look something like this:

Cloud connector

Clound connector 1.jpg

Clound connector 2.jpg

 

Web IDE

After logging into HANA account trial and go to services and click on Web IDE.

Open Web IDE now.

Web IDE 1.jpg

 

We are creating a sales order app

 

Basic steps involved in creating this app are :

  • Create Consumption CDS views for Sales Order header and Sales Order Items
  • Create association between the header CDS and item CDS views.
  • Use annotations in the header view for generating OData service
  • Use annotations in both views for generating BOPF objects

 


Technically at a higher level :

- The app shall consume the OData

- The OData has data source as CDS views (ie consumption CDS)

- The BOPF takes care of table CRUD operations. Here the BOPF objects are generated from the CDS views.



Lets start with the CDS views.


Basically in the CDS, there are consumption CDS, Basic CDS and Composite CDS. Consumption CDS are exposed to the UI. The intention is not to get into CDS details here, but to give a quick information on CDS.


We have 2 consumption CDS view's to be exposed to the OData.


1) Sale order Header  ZDEMO_C_SALESORDER

    1.1)  The SO header consumption view utilize the Basic CDS view ZDEMO_I_SALESORDER

      1.2)  The Basic view use a Header Table "ZPROTO_SO_A". This shall form the BOPF root table for SO Header


2) Sale order items ZDEMO_C_SALESORDER_ITEM

    2.1) The Item consumption view use Basic CDS view ZDEMO_I_SALESORDER_ITEM

    2.2) The Basic view use the Item table ZPROTO_SOI_A which shall form the BOPF item node table

 

 

 

First prepare the table structure for SO header and SO item respectively.

SO header table ZPROTO_SO_A

SO header table.JPG

 

 

SO Item table ZPROTO_SOI_A

SO Item table.JPG

 

 

Now, we can use these tables in Basic CDS views.

 

 

Lets start creating with Basic Item CDS view

 

 

Basic SO Item  CDS

For creating CDS view, in the HANA studio, go to ABAP perspective. Choose your system and create a Package underneath. Right click on the package and choose New -> Other repository object.

Create CDS view 3 .jpg

 

SO Item CDS creation.jpg

 

Give the name of the view and click on Finish.

 

 

The CDS + annotations used are:

SO Item I CDS annotations.jpg

Basic CDS SO I item coding.jpg


Here the association between item and header imply an LEFT OUTER JOIN. If you want to force an inner join with association, example you can do something like this for example

inner join association.JPG


For more clarity on path expression joins, pls refer to here



Save and activate the ZDEMO_I_SALESORDER CDS view. 


Post activation, following objects are :


1) DB view : ZDEMO_I_SALESORDER_ITEM(CDS Entity)

2) DDIC SQL view (Columnar) : ZDDL_I_SOI16  -- can be viewed in DDIC



Now lets Create the Consumption view for above created Basic view



Consumption SO Item CDS

The CDS code + Annotations are as below:

Consump CDS SO Item annotation.jpg

Consump CDS SO Item coding.jpg

Save and Activate.


Post activation the objects created are :

1) DB view - ZDEMO_C_SALESORDER_ITEM

2) DDIC SQL View - ZDDL_C_SOI16


We are done with sales order Item.


Lets move to Basic CDS for Sales Order Header


SO Header Basic CDS ZDEMO_I_SALESORDER

The CDS code + Annotations are:

Basic CDS annotations.jpg

Optional: there is an Object model annotation for modelCategory: # BusinessObject. If we use this the create sales order logic has to be written as an BOPF action. And this action shall be triggered when the + icon is clicked.

 

Basic CDS SO Header view.jpg


Save and Activate.


Post activation, following objects are generated

1) DDIC Sql view ZDDL_I_SO16

2) DB view ZDEMO_I_SALESORDER

3) And an BOPF Business Object by the CDS name ie Business Object ZDEMO_I_SALESORDER


The BOPF Business Object can be viewed in Hana Studio/Eclipse via ABAP perspective. Go to the package, under Business Objects and here you shall see the generated BOPF object. Other option is via SAP Gui. You can open GUI in studio as well. Use Tcode BOBX or /BOBF/CONF_UI.

BO Generated.jpg

 

BOPF Business Object

Header BOPF Node.jpg

 

SO Item BOPF node.jpg


Now lets use this Basic Header view in a Consumption Header View


Consumption SO Header CDS ZDEMO_C_SALESORDER

The CDS code + Annotations are:

SO Header Consumption Annotations.jpg

SO Header Consumption codoing .jpg

Save and Activate.


Post activation, the following objects are created:

1) DD Sql View DDL_C_SO16

2) DB view ie CDS entity  ZDEMO_C_SALESORDER

3)OData service (<CDS view>_CDS)


OData created.jpg

The OData service generated is not active. To activate go to Tcode Gui Tcode /IWFND/MAINT_SERVICE.

Click on Add service. Choose Local and enter the Name of CDS in the Technical Service and click Get services.

OData maint service.jpg

Click on "Get Services. Click on Service or click on "Add Selected Service". In the next screen enter the package or local object and click ok. The OData service is now Active.


Test the Odata service.

Go back to the service maintenance screen. Click on Filter and enter the service name as Technical service.

Click on Gateway Client. In the new window click on execute. If the status is 200, all is well.

Odata service 3.jpg

 

The OData metadata is fine. Test if the OData returns records by choosing the entity sets.

Odata service 4.jpg

 

So we are done with Final Consumption CDS view. And we can use this view in Fiori Smart Template.



Recap of what we have done so far.

1) Created Basic Item CDS

2) Created Consumption Item CDS

3) Created Basic Header CDS

4) Created Consumption Header CDS


Before we start with Fiori App, we shall create BOPF action. The action shall change the Lifecycle Status of an Sales order

BOPF action.jpg


The BOPF action and the App display will be covered in the Part 2.

Fiori/UI5 + CDS + BOPF - For beginners Part 2

$
0
0

This blog is on continuation to  Part 1.


In this part we shall create the BOPF action and display the sale order scenario in the Fiori App using Smart Template.


For the BOPF action, go to BOPF Business Object ZDEMO_I_SALESORDER  from Tcode BOBX. Click on change mode. Under the Node Elements, traverse to node ZDEMO_I_SALESORDER and select Action element. Right Click on Action and Click "Create".

 

BOPF Action create.jpg

BOPF Action create 2.JPG

 

Go to Class Builder and create the class ZCL_A-DEMO_SALESORDER.

Action class 1.jpg

Action class 2.JPG

Implement the method Execute.

Action class 3.jpg

 

Save and Activate. The code can be found in the attachment. Basically the code reads the selected sales order and then change the corresponding BOPF node instance with the new lifecycle status value.



Okay we are done with all the backend stuff.


Lets display this using as Fiori App using Smart Template.


If all the Web IDE set up explained in Part 1 is fine, we can proceed. Go to Web IDE.  Click on File.

Create app 1.jpg


Click on File --> New --> Project from template

Smart template 2.jpg

On next screen, Select Service Catalog. Click on the dropdown and select your backend system.

Smart template 3.jpg


Once the backend system is selected, OData services in the system are listed. Look for our OData generated service  ZDEMO_C_SALESPRDER_CDS  ie <final consump CDS view>_CDS

Smart template 4.jpg


Select the Odata service. Click on Show details to check if the OData is up and running

Smart template 5.jpg


Here we see the OData service is running fine.

Smart template 6.jpg

Click on Next. In the Next screen the system will read and the OData service metadata file and also the CDS Annotations file(final consumption CDS). These are necessary to display the app.


The annotations in the final consumption CDS view (ZDEMO_C_SALESORDER) contain the UI line position which shall form the basis for field positioning in the app.


Smart template 7.jpg


Click Next. In OData collection, select the consumption view(where OData was published). Our final consumption view has an association to Item. Hence here the OData navigation refers to "_item".


Smart template 8.jpg


Click Next or Finish and its done !

SMART template 9.jpg


The project name is visible under the workspace. Right click on the project. Click Run as -> Web Application

smart template 10.jpg


If prompted, choose flp sandbox.html. These are used to for test data basically.

Smart template 11.jpg


Click Ok. If prompted, for login credentials, enter the backend system details. Finally the app icon is displayed in the Catalog Tile.

Smart template 12.jpg


Click on the App. If prompted for the login credentials, enter the back-end system details.


Click on Go in the app to display the sales order records.

App 1.jpg



Select the record by selecting the radio button and clicking. The navigation happens to the detail screen.

App 3.jpg


Click on Edit. For example, lets update the Gross Amount and click on Save.

App 4.jpg


The Gross amount value is edited to 3500 INR.  Click Save. 

"Object saved" message appears.  Go back to previous app page.


The new Gross amount is reflected here.

App 5.jpg

The Edit is excuted in BOPF via CDS and the particular BOPF node instance is edited. This is achieved as we have given the create/update/delete enabled in the final consumption CDS which delegates to the Basic CDS and then to BOPF.

BOPF Update.JPG


Create a new record.

In the basic CDS ZDEMO_I_SALESORDER, we have maintained the annotation @objectmodel.create enabled: true which means the create logic is taken care by BOPF.


Click on + icon in the app to create a new sales header record.


Enter the values and click on Save.

Create record 3.jpg

 

An object saved message appears. The record is saved. Go to previous page and see the newly created record.

Create record 4.jpg


The delete icon works the same way. Just select an record and click on delete.



Change the sales order Lifecycle status

Select an sales order which has initial status and click on icon "Set Lifecycle Status to Paid". The code which we have written for the BOPF Action is triggered and the status is changed to P.

Change status 1.jpg


Lifecycle status has changed to P(Paid)

change status 2.jpg


That's it. Hope this is helpful.


Standard CDS views for inventory

$
0
0

Hello experts,

          Can anyone tell me standard cds views in S4Hana for inventory?

 

 

Thanks,

Tejaswini Naik.


Slow performance in AMDP

$
0
0

Dear SCN Members,

 

In one of blogs by Horst Keller, he wrote about performance improvement in string concatenation.

 

I'm fortunate to be working on SAP 750 with HANA DB; so I thought of checking the performance when strings are concatenated at DB level. I added my comments and Horst, being always helpful, gave me some pointers to do performance testing.

 

To my surprise, the results with AMDP is taking a lot of time when checked in SAT and GET RUN TIME.

Now I'm not aware of what's happening under the hood but would love to learn why and where AMDP is slowing down.

 

I've attached a Word document having code, results and screenshots to avoid cluttering this space.

 

 

Thanks!

Issue in Step mention in how to guide in Note 2271900 related to SCI Variant creation

$
0
0

Hi Expert,

 

I am trying to install the S4 HANA related Variant in the NW 7.5 System. Following the step mentioned in the note 2271900 , How to guide document . We have below Step that needs to perform related to program SYCM_CREATE_CI_CHECK_VARIANT.

 

there is a step 2 to generate a CI Check Variant in the How to guide document :

Enter the name of check variant in the CI Check Variant to generate input field, the question is what name we should take here, if we are taking a default name proposed by the program SYCM_CREATE_CI_CHECK_VARIANT, it is giving an error that the "the check variant field is empty & variant cannot be created".

 

Ayone has any clue what we is the issue, we have already uploaded the Simplification list & installed the note 2271900.

 

Regards,

Kapil

Using Hierarchies in CDS views

$
0
0

Hello experts.

 

I understand CDS views allow the use of hierarchies.

I did find the following annotation but I don't know how it works and if it suits my need.

 

@ObjectModel.dataCategory: #HIERARCHY

 

Can anybody tell me how to use it to access a Profit Center hierarchy I can access via the KCH3 TCode ?

 

Thanks for your kind help.

 

Sebastien.

Delete old system Migration data on HANA database

$
0
0

Dear Experts,

 

 

Currently, we're performing system migration from Oracle to HANA using Export and Import option with SWPM. Export was successful but import was unsuccessful many times. We found the reason for the error and we would like to start once again the import but in our file system /hana/data/SID we have already 154 GB occupied by old migration data.

 

Is there a option in HANA studio, where we can delete these old data?

 

Thank you,

Sreenu

E_HANAAW151 (SAP Certified Development Specialist - ABAP for SAP HANA )

$
0
0

Hi All

 

I just want to hear the experience is signing up for certification

 

 

I was told that i'm not eligible for E_HANAAW151 because i don't meet the prerequisites C_HANATEC_1 or C_HANATEC131 or C_HANATEC141 or C_HANATEC142


I'm certified C_HANAIMP_1  and C_TAW12_04..Infact i did my certification on HANA in 2012 when its was in early stages and i have been working on HANA since then and SAP says that these certification wouldn't qualify me for E_HANAAW151


Worst of all  C_HANATEC142 has below topics for Certification and i don't understand how that's related to technical consultant ..I understand the technical consultant need to some sort of knowledge but its 100% of admin topics..So it doesn't make any difference

I just want to know if 'm looking something wrong

 

Monitoring of SAP HANA> 12%

 

 

Operation of SAP HANA> 12%

 

 

Security and authorization> 12%

 

 

SAP HANA Installation8% - 12%

 

 

Backup & recovery8% - 12%

 

 

System architecture8% - 12%

 

 

Troubleshooting of SAP HANA8% - 12%

 

 

High availability & disaster tolerance< 8%

 

 

Data Provisioning< 8%

 

 

Database Migration to SAP HANA< 8%

 

 

Thanks

 

Viewing all 831 articles
Browse latest View live


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