Dear Expert,
Other then ABAP, can CDS (core data services) consumed by other reporting tools? e.g Bobj, Lumira or HANA modeling join with other hana view. I googled but can't find any.
Thank you.
Dear Expert,
Other then ABAP, can CDS (core data services) consumed by other reporting tools? e.g Bobj, Lumira or HANA modeling join with other hana view. I googled but can't find any.
Thank you.
Hi,
I'm currently reading the course HA400 "ABAP Programming for SAP HANA" and I have an inclear issue concerning the problematic SELECT * statement using the Code Inspector.
In the Exam Sample for "SAP Certified Development Specialist - ABAP for SAP HANA (Edition 2015)"
we got the following Question:
1. You create a check variant in the Code Inspector which includes the check 'Search problematic Select *
statements'. SAP HANA is used as the database
In the check parameters, which value would you use for the percentage of fields that are effectively used?
Please choose the correct answer.:
a) A lower value than on a traditional, row-store only based database
b) The same value as on a traditional, row-store only based database
c) A value that you calculate based on the number of tables
d) A higher value than on a traditional, row-store only based database
Actually, only answer a) or d) came in question.
I have tipped for answer a) which was the correct answer.
However, I have get a problem of understanding this:
In the HA400 course documentation of the year 2015, it saids on page 75/76 the following:
The check for problematic SELECT * statements in particular has several check parameters. This check searches for SELECT * FROM dbtab statements where less than a specified percentage of the fields are effectively used. The default value for the percentage is 20 percent. If less than 20 percent of the fields are used it is more efficient to select only the used fields. The value if this parameter highly depends on the database used. When on a database with column store, e.g. SAP HANA, this value should be set to a lower value than on a traditional, row store only database.
So, if the "percentage of fields" is set to 20% it has to be set for SAP HANA to a lower value e.g. 10% (Answer 'a)' )
This is actually not correct to my point of view, we need to have a higher value (Answer 'b)' ), e.g. 40% or 60%. As all problematic SELECT * statements which have between 1% and 40% of fields not used will be listed.
When we go to the HA400 course document of the year 2013, it was said at page 57 that the value should be HIGHER than on a traditional row store database:
The check for problematic SELECT * statements in particular has several check
parameters. This check searches for SELECT * FROM dbtab statements where
less than a specified percentage of the fields are effectively used. The default value
for the percentage is 20 percent. If less than 20 percent of the fields are used it is
more efficient to select only the used fields.
The value if this parameter highly depends on the database used. When on a
database with column store, e.g. SAP HANA, this value should be set to a higher
value than on a traditional, row store only database.
I'm quick not well understanding the context of phrases.
For ME, the percent need to increase from 20% to 40% or upper, as we don't like to transport all columns with HANA. This operation is quite costly for column-Store. That is why the search for SELECT * need to have all entries which have a lower percentage of use of the fields than e.g. 40%.
For Me the answer is d)
d) A higher value than on a traditional, row-store only based database
HA400 Course 2013, Page 57
But SAP said a)
a) A lower value than on a traditional, row-store only based database
HA400 Course 2015, Page 76
I really don't know why they changed it.
Can, anyone with some English Skills find a solution for this ambiguity.
Thanks for your repond,
Kais
Hello all,
with adbc it is possible to bind input variables to sql statements:
...
Data: lv_werks TYPE WERKS_D.
* Bind input variables
GET REFERENCE OF lv_werks INTO dref.
lr_sql_env->set_param( dref ).
lv_sql_string = |SELECT * FROM … WHERE WERKS = ? |
...
On the other hand it is possible to pass data to parameters of views like this:
| WITH PARAMETERS ('PLACEHOLDER' = ('$$P_MAXTIME$$',| &
|{ cl_abap_dyn_prg=>quote( lv_time ) }))|.
Is there a way to combine both method? To use Parameters of views and to bind the value to abap variables instead of writing them directly?
It not each statement is written in the statemant cache an fills it when executed very often.
Thanks for all response,
Hartmut
Hi Experts,
When calling HANA procedure from ABAP from within a function module, what's the life-cycle of the HANA session? Say I created a local temporary table in my HANA procedure. I have a select statement that inserts the data into this temporary table. I have called all the above code using AMDP or Database proxy in a FM1 (function module 1). This function module is part of a function group which has two other function modules FM2 and FM3 that call the same procedure.
Now I have a ABAP program that calls the function modules in this sequence - FM1, FM2, FM3.
PROGRAM -> FM1 -> HANA Procedue -> Insert into Temp Table
When I call FM2 from the same program and again trigger the procedure -> Would the temp table be filled? Is it a new HANA session or the same?
Regards,
Kevin
Hi colleagues,
is it possible to access attributes of the projection list in an association, so that the hard coded value is replaced by the value in "WorkflowPhase"?
The syntax check allows that, but the filtering does not work:
accessing the field by $projection or via the table directly (ROOT.workflow_phase) does not work either.
Any ideas?
Thanks & regards,
Ilijana
Hello,
Just wondering if dynamic table specification is possible with CDS view?
My requirement is to represent the below in a CDS view-
parameters: p_region type char5.
SELECT table_name
FROM Ztable_names
INTO @data(lv_table)
WHERE region = @p_region.
SELECT col1,
col2
FROM (lv_table)
INTO TABLE @DATA(lv_result).
Thanks,
Ajith
Hi SAP gurus,
I'm a functional consultant and I don't know much about technical. But I getting a requirement from my business process.
Is there any way for executing a Z program in SAP as and when any records created in standard sap table.
If is there a way please suggest me how one can do that.
Any other information link note will be appreciated.
Thanks
I can not Publish the application to a Web browser
---------- Publish: Publish of p_pbtutor_winform (10:31:50 AM)
Checking publish setting ...
Publishing application to http:. // Localhost / acmeupdate Publish version is 1.0.0.1
Error when publishing application.
---------- Finished Publish of p_pbtutor_winform (10:31:56 AM)
/ * This is his error message * /
---------- Error messages: (10:31:56 AM)
Can not generate setup.exe file.
---------- Finished (10:31:56 AM)
It happened how to solve
Hello,
As per my requirement, i have one AMDP procedure which is returned table data. I try to call this AMDP dynamically into another AMDP using EXEC statement but i don't know how to get the return data after calling this AMDP. Can any one please help me on this if it is possible?.
class ztest implementation.
method call_amdp by database procedure for hdb language sqlscript.
declare lv_sql nvarchar(1000);
lv_sql := 'CALL "ZTEST_PROC" ( LT_DATA ) ' ;
EXEC : lv_sql.
***** Here how to retrieve the LT_DATA values .
endmethod.
end class.
Thanks,
Venkatesh
Hi Experts,
I've question about user defined functions UDF - scalar type.
In my CDS view I tried to use currency_conversion function - with success.
@AbapCatalog.sqlViewName: 'Z079MM_CV_CDS_07' @EndUserText.label: 'MBEW' define view Z079mm_Cv_Mebew_Z_Ext with parameters p_to_currency:abap.cuky(5), p_exc_date:abap.dats, as select from mbew join t001k on mbew.bwkey = t001k.bwkey join t001 on t001k.bukrs = t001.bukrs { key mbew.bwkey, key mbew.matnr, key mbew.bwtar, lbkum, salk3, :p_to_currency as currency, /////----------->here currency_conversion( amount => salk3, source_currency => waers, round => 'X', target_currency => :p_to_currency, exchange_rate_date => :p_exc_date ) as salk3_cur }
This function is defined by SAP in schema SAPABAP1:
Later I wanted to use my function DIV_CURR defined in schema EXRMATUSZEWSKI:
@AbapCatalog.sqlViewName: 'Z079MM_CV_CDS_09' @EndUserText.label: 'MBEW' define view Z079mm_Cv_Mebew_Z_Ext2 with parameters p_to_currency:abap.cuky(5), p_exc_date:abap.dats as select from mbew join t001k on mbew.bwkey = t001k.bwkey join t001 on t001k.bukrs = t001.bukrs { key mbew.bwkey, key mbew.matnr, key mbew.bwtar, lbkum, salk3, :p_to_currency as currency, currency_conversion( amount => salk3, source_currency => waers, round => 'X', target_currency => :p_to_currency, exchange_rate_date => :p_exc_date ) as salk3_cur, /////----------->here div_curr(salk3,2) as result2 //"EXRMATUSZEWSKI"."DIV_CURR"(salk3,2) as result3 } }fffd
but compilator says "Function div_curr is unknown". I tried to add schema name but it not worked.
Both functions are scalar functions and are defined in similar way:
What is wrong with my code in CDS view? Is my own function really unreachable from CDS view?
In contrast in SQL console:
this works:
select div_curr(10,2) as result from dummy
this is not working:
select currency_conversion( amount => '1000', source_currency => 'PLN', rounding => 'X', target_currency => 'EUR', exchange_rate_date => '20151211' ) as salk3_cur from dummy
select "SAPABAP1"."CURRENCY_CONVERSION"( amount => '1000', source_currency => 'PLN', rounding => 'X', target_currency => 'EUR', exchange_rate_date => '20151211' ) as salk3_cur from dummy
Again why? what's the difference between those functions?
Best regards
Rafal
Hey Guys,
I have implemented the following CDS (ABAP on HANA):
It's basically a join of 3 huge tables (~150 Mio. records) with some extra logic. I need this split into 3 tables because the result of the join without any condition would result in over 50 billion records. When I access this view in ABAP with where clause like:
select * from /ascorpi/raav into table @data(lt_raa) where ip = '000C29E454191EE58BDFCA7F32185B16'
This is processed in ~300ms (That's fine).
For some other where clauses (or without where clause) this cannot be processed anymore though I limited the result on 10k records:
select * from /ascorpi/raav into table lt_raa up to 10000 rows.
It seems like the join is fully processed on the HANA DB and just the number of records that is copied over to the ABAP application server is limited to 10k records. This select kills the whole system...
Is there a way to limit the number of results on CDS level? I am never interested in a "full join" of all data. When I query with a bad where clause I want to have a limit that applies. Because of the structure of my data, I don't see a way to use some aggregate funcitons like min() or max() combinded with a "group by" clause.
I really appreciate your help.
Regards
Tobias
Metadata-driven UIs are dynamic UIs because metadata, are stored in a repository and can be retrieved from the client as needed. CDS annotations depend on the UI in which they are supposed to be used. UIs might differ from user to user. Users might want to personalize their UIs and see different columns in tables, for example. CDS annotations offer default views for modeling UIs, however, CDS annotations can be overruled by personalization preferences.
Hi,
Can I consume a calculation view in a CDS view like below? If not, how should I then do it?
@AbapCatalog.sqlViewName: 'Z_Cds_Test_12345'
@EndUserText.label: 'CDS View on generated view for NCTT2000'
define view Z_Cds_Test_Nctt2000_Gen_View as select from "_SYS_BIC"."system-local.bw.bw2hana/NCTT2000" {
CALMONTH,
AMOUNT
}
At least when I try I get an error:
Description Resource Path Location Type
Table _SYS_BIC does not exist or is not active Z_CDS_TEST_NCTT2000_GEN_VIEW (ABAP DDL Source) [D32] Z_CDS_TEST_NCTT2000_GEN_VIEW Unknown ABAP Syntax Check Problem
Thanks in advance, kr
Torben
Hi Experts,
I have created below class in HANA studio and using AMDP concept here as shown
I am calling this class from a program as shown below:-
I am getting below output
Although my table containing 3 entries for the given bill doc. no. The records are repeating here. Please let me know what went wrong here. I have checked in debug, method is executing once only so 3 records should come but in single execution I am getting 12 records. When I modified my class method as below I am getting exactly 3 records as expected.
I have attached the code in the attachment
Hello,
I have to manually correct ABAP code for HANA compliance for 'Analysis of WHERE condition for SELECT'.
Here in the below code I have to add WHERE clause, please suggest how to find out that what can be added with the Where clause.
Actually the code is a part of a program, and I don't know how that program is working.
CODE:
SELECT * INTO TABLE lt_hfm FROM Ztf_hfm.
Plz ask if any clarification is needed.
Regards,
AMAN
Hi,
I creating a AMDP in order to utilize the ROW_NUMBER function.
My "base" sql that I need in the AMDP is shown below. As you see will MATERIAL and /BIC/TRADE_ID have to be replaced by ranges (it is just example values that are shown). As well are there constant values for BILL_TPE and DOC_TYPE. For DATEFROM, DATETO and BILL_DATE will I have to se >= and <= opererators - the date is not fixed and will set on basis of a variable that I pass to the AMDP class.
Will that be possible in a AMDP? As off now I have done as you see below - I expect that will work for the range and constant value, but how about dates, how do I get that as part of the where clause as well?:
The "base" sql that has to be executed in the AMDP where trade id and material has to be replaced by ranges and datefrom, dateto and bill_date has to be replaced by a variable.
Thanks in advance.
KR
Torben
I am transforming our oracle based ABAP code to HANA based code.So during this procedure I need to replace the native sql statement EXEC sql-ENDEXEC with some other HANA compatible statement because this statement is giving error in code inspector.I can't find any kind of replacement statement of this native sql.So please help me to do this.It is urgent for our project.Thank in advance
Hi All,
I have learned that HANA is very vast.
I will be thankful for kindly guiding me what to focus on in HANA as an ABAPer.
Thanks,
SD
Hi,
What is SAP HANA in basic terms. After my lot of search on internet, what I understood is SAP HANA is a Database Technology like Oracle, SQL . Is it correct? Is SAP HANA a replacement for the Database in SAP ERP ? Presently I use Oracle in the back end for database in my SAP ERP ECC 6.0 . So can it be replaced with SAP HANA. In future, will SAP HANA replace the Oracle in SAP ERP ECC . Should a person have ABAP knowledge to learn SAP HANA. CAn you please clarify my doubts ??