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

Re: Column value as null in ABAP program while calling Calculation View

$
0
0

Hi Florian,

 

Below is the code which I have used for calling the view.

 

lv_mandt = sy-mandt.   IF sy-sysid = 'ECD' OR sy-sysid = 'ECQ'.     lv_sql = | SELECT "DOC_NUMBER","GJAHR", "MONAT", "BUDAT", "BUKRS", "BLART","BUZEI","ZBAT_ID","USNAM","CPUDT","ZSTATUS",|              && |"BKTXT", "WAERS", "XBLNR", "GSBER", |              && |"HKONT", "ZZACT", "ZZCOUNTRY", "SHKZG", "KOART", "WRBTR","PROJK", "MENGE", "MEINS", "SGTXT",  |              && |"PERNR", "HWAER",  "DMBTR", "BILKT", "TXT50", "GLDESC", "ZDES", "PSPHI", "POSTU", "PRCTR" FROM |              && | "_SYS_BIC"."Infy.FI_TILL_ECQ_ONLY/ZFI_CALSQL_ECA" |.   ELSE.     lv_sql = | SELECT "DOC_NUMBER","GJAHR", "MONAT", "BUDAT", "BUKRS", "BLART","BUZEI","ZBAT_ID","USNAM","CPUDT","ZSTATUS",|              && |"BKTXT", "WAERS", "XBLNR", "GSBER", |              && |"HKONT", "ZZACT", "ZZCOUNTRY", "SHKZG", "KOART", "WRBTR","PROJK", "MENGE", "MEINS", "SGTXT",  |              && |"PERNR", "HWAER",  "DMBTR", "BILKT", "TXT50", "GLDESC", "ZDES", "PSPHI", "POSTU", "PRCTR" FROM |               && | "_SYS_BIC"."Infy.FI/ZFI_CALSQL_ECA" |.   ENDIF.   lv_sql = |{ lv_sql }|   && | ('PLACEHOLDER' = ('$$INP_BUKRS_HIGH$$', '{ lv_bukrs }' ), |               && | 'PLACEHOLDER' = ('$$INP_BUKRS_LOW$$', '{ so_bukrs-low }' ), |               && | 'PLACEHOLDER' = ('$$INP_MONAT$$', '{ lv_monat }' ),|               && | 'PLACEHOLDER' = ('$$INP_MANDT$$', '{ lv_mandt }' ),|               && | 'PLACEHOLDER' = ('$$INP_GJAHR$$', '{ p_gjahr }' ))|.   CONDENSE lv_sql.   TRY.       lo_result = NEW cl_sql_statement( )->execute_query( lv_sql ).
 *     Assign refference to lr_data1 table as gt_final       GET REFERENCE OF gt_finaltab INTO lr_data.
 *     Set table data from result to lr_data1 it will be assigned       lo_result->set_param_table( lr_data ).       lo_result->next_package( ).       lo_result->close( ).     CATCH cx_sql_exception INTO lx_sql_exc.       lv_err = lx_sql_exc->get_text( ).       MESSAGE lv_err TYPE 'E'.   ENDTRY.

Thanks,

Vijay


Re: Column value as null in ABAP program while calling Calculation View

$
0
0

So you have two different calc views that you call based on the sysid.

Do both of them return a filled DOC_NUMBER column in HANA Studio? You only showed one of them (not sure which).

Re: Column value as null in ABAP program while calling Calculation View

$
0
0

Both of the calc view has same code and output. And the problem is with both of them returning the column as null value. both are returning correct value in hana studio.

Re: Column value as null in ABAP program while calling Calculation View

$
0
0

Hello Vijay,

 

When you use data preview in HANA view it shows exact data without bothering length of data type of that column.

 

Please check length of HANA view column.

 

-Amol S

Re: Under which schema can we find the CDS view created by developers?

$
0
0

Hi Mohammed,

 

Your CDS view has input parameters. Hence in database, it is created as Table Function.

So look for the function name "ZCDS_TEST3" in HANA.

 

Regards,

Panneer

Re: Column value as null in ABAP program while calling Calculation View

$
0
0

Hi Amol,

 

The length in HANA view is varchar 10 and it is same in the program also.

 

Vijay

AMDP Execution failed because of large amount of data

$
0
0

Hi experts,


 

I read data from VBAK inner join VBAP using AMDP...


Step 1: Read data from inner join


Step 2: use APPLY_FILTER

 

in Step 1, as a result of large data, the program dumps..


Is there any way to filter the data while filtering instead of doing in using Apply filter


Thanks & Regards,

Ramesh

Is it possible to call a Function Module in AMDP?

$
0
0

Hi experts,

 

is it possible to call a function module within AMDP Procedure?

 

Thanks,

Ramesh


Re: Is it possible to call a Function Module in AMDP?

$
0
0

If you mean an ABAP function module, then the answer is No.

Re: CDS Views : RSRT No Data Available

$
0
0

Hi Subhasis,

 

This looks like your user lacks authorization to read the data.

 

I would assume that the DDL source which defines the CDS entity has a DCL (Access Control) source as well. To check this go to the same package in Eclipse and within "Core Data Services"->"Access Controls" folder, you may find the DCL source with the same name of the DDL source.

 

Your user should have all the necessary roles with appropriate permissions as required by the DCL document.

 

Regards,

Panneer

Re: Is it possible to call a Function Module in AMDP?

$
0
0

Is there any way where i can wrap my FM and call it inside AMDP? As I do not want to call the FM outside AMDP.

 

Regards,

Ramesh

Re: Is it possible to call a Function Module in AMDP?

$
0
0

No, ABAP coding cannot be executed on HANA DB Level.

Re: Is it possible to call a Function Module in AMDP?

Re: SAP ABAP(7.4 SP11) CDS consumption to Analysis for office not working

$
0
0

Hi Gaurav,


The issue seems to be that the CDS views has input parameter and the necessary annotations are missiing

 

You can add static default value to the parameter like below

 

define view Zdemo04

with parameters

@Consumption.defaultValue: '...'

vbeln1:vbak.vbeln

 

Or

 

Derive the value dynamically using @consumption.derivation annotation. For more details about the

@Consumption annotation refer to the help Consumption Annotations - About ABAP Programming Model for SAP Fiori - SAP Library

 

Some remarks on your CDS view: Firstly you have to change the VDM view type to #CONSUMPTION because the view is analytical query and secondly Analytical query should read the data from Analytical view for which the @Analytics.dataCategory=#CUBE is set.

 

 

Regards,

Panner


How to use SQL query for HANA view in AMDP Class

$
0
0

Hello Expert,

 

I want to execute SQL query on HANA view in AMDP class. How it is possible.

 

Please find below query.(ZFG_ATP_TIMEBASE is my HANA Calculation view)

 

SELECT * FROM  "_SYS_BIC"."FG_BI.ATP_NEW/ZFG_ATP_TIMEBASE"

                       WITH PARAMETERS ( 'PLACEHOLDER' =  ('$$FROM_DATE_TIME$$', '20160623010101') ,

                                                             'PLACEHOLDER' =  ('$$TO_DATE_TIME$$', '20160623121212') )

 

When I execute query in SQL console in HANA studio , it is working fine. Same I need to execute in AMDP class methods.

 

 

Please find attached screen shot of AMDP class and methods.

 

 

AMDP Error.JPG

 

Could you please help me to resolve this one.

 

Regards,

Chintan


Difference between ABAP CDS view and HANA CDS view.

$
0
0

Hi All,

 

I have a trivial doubt. Can someone explain to  the difference between an ABAP CDS view and a HANA CDS view with an example  along with screen shots? , am not able to differentiate them  clearly.

 

Thanks in advance...!

Re: Difference between ABAP CDS view and HANA CDS view.

$
0
0

Hi Amol,

I have read that post by Horst, he has given some  theoretical difference, but it has no example for HANA CDS and  ABAP CDS to differentiate.

Re: How to use SQL query for HANA view in AMDP Class

$
0
0

Hi Amol,

 

Thanks for your input.

 

I did same. I attached screen shot wrongly.

 

Please find below screen shot still I am facing issue.

 

01.png

02.png

03.png

  • Below query which  I have used above class.

 

it_result=SELECT * FROM  "_SYS_BIC"."FG_BI.ATP_NEW/ZFG_ATP_TIMEBASE" WITH PARAMETERS ( 'PLACEHOLDER' =  ( '$$FROM_DATE_TIME$$', '20160623010101') ,   'PLACEHOLDER' =  ( '$$TO_DATE_TIME$$', '20160623121212') );



  • If I run below query in SQL console, its working fine.

 

SELECT * FROM  "_SYS_BIC"."FG_BI.ATP_NEW/ZFG_ATP_TIMEBASE" WITH PARAMETERS ( 'PLACEHOLDER' =  ( '$$FROM_DATE_TIME$$', '20160623010101') ,   'PLACEHOLDER' =  ( '$$TO_DATE_TIME$$', '20160623121212') );




Regards,

Chintan Shah


Re: How to use SQL query for HANA view in AMDP Class

$
0
0

Can you run below query.

 

SELECT * FROM  "_SYS_BIC"."FG_BI.ATP_NEW/ZFG_ATP_TIMEBASE" (PLACEHOLDER."$$FROM_DATE_TIME$$"=> '20160623010101' , 

                PLACEHOLDER."$$TO_DATE_TIME$$"=>'20160623121212');

 

 

Also check SAPUSER has complete rights.

 

-Regards,

Amol

Re: How to use SQL query for HANA view in AMDP Class

$
0
0

Hi Amol,

 

I applied query which you have suggested but Same error coming  and also I have SAP_ALL rights to my id.

 

Please find below screen shot.

04.png

 

Regards,

Chintan

Viewing all 2110 articles
Browse latest View live


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