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

Re: Error Message - Identifier must be declared

$
0
0

Harish, this question had been asked and answered a couple of times before.

Please do search before you post!

 

Also: it is not possible to use variables in the LIMIT or TOP clauses.

If you want to do use those e.g. in a loop you have to use dynamic SQL.

 

Since this will lead to massive parsing overhead and query re-execution it might be better to implement a cached result set that you then access in your application code.

 

- Lars


ATC Online Check Variants Missing

$
0
0

Hello Experts,

 

We are not able to locate ATC Online Check Variants in our system. System is only showing default variant.

ATC check.JPG

 

 

We are at following BASIS level, do we need to install some note to get those variants?

 

SAP_BASIS7400010SAPKB74010SAP Basis Component
SAP_ABA7400010SAPKA74010Cross-Application Component

 

 

Any suggestions please.

 

Thanks,

Kapil.

Re: ATC Online Check Variants Missing

$
0
0

Kapil,

 

It displays variants that have been defined in the Code Inspector or in the ATC Administration transaction ( T-code ATC ). Please check there if you have defined any variant .

 

 

Thanks.

commit work taking more time in hana system

$
0
0

Hello All,

 

One of my client move to Hana system from ecc. but in some objects we found performance degradation . As we analyse its happen due to database commits. we are using some finance BAPI and using Bapi transactions commits. In this case data base commits taking 4 times more then non HANA systems .

So please suggest me , what we can do in this. because its become a challenge to our team.

Re: commit work taking more time in hana system

$
0
0

Hi Vipul,

 

Are you sure that the performance problem is purely due to Database Commit? Have you analysed SELECT statements as well? You said that you're using finance BAPI's .It might be the case that you're dealing with tables GLPCA, BSEG, BKPF etc.Am I Right?

 

Best Regards,

Lakshman.

Re: commit work taking more time in hana system

$
0
0

Hi Vipul,
it's hard to digest where this issue originates from. If you have the problem analyzable and reproducible, I think the best thing is to open a BCP customer incident so that the corresponding experts can analyze it.
Best,
  Jasmin

Re: SAP Object DDLS cannot be assigned to package

$
0
0

Hi Jasmin,

after a quick look on your openSAP course, I managed to create it this time. I have no idea what I did different!

 

One thing though - I noticed that I get different results when I right-click on the system (A) and create it to right-clicking on the package (B) to create it.

 

A)

 

namespace my_sample_namespace;

 

@schema: 'MY_SAMPLE_SCHEMA'

context ZDDLS_CDS_FLIGHTS_MC' {

 

};

 

 

B)

 

@AbapCatalog.sqlViewName: 'sql_view_name'

@EnduserText.label: 'zmctest'

define view Zmctest as select from data_source_name {

 

}

 

thanks,

Malcolm.

Re: CDS View - consuming HANA artifact (calculation view generated by BW)

$
0
0

Hi Torben,

 

We had gone through same scenario which has to be later used in ALV IDA, in such case we have created external view based on hana view and used in CDS view.

Another way you can directly access hana view inside AMDP and can be reusable.

 

-Amol


Re: HANA View Access Error from OpenSQL

$
0
0

Hi Shounak,

 

can you be a bit more specific? What means "within ECC". Did you create a view in SE11? Is it a CDS view? Did you create the view via the HANA studio? In which schema is the view? Do you use a secondary database connection in Open SQL?

 

Best regards,

Kilian.

Re: HANA View Access Error from OpenSQL

$
0
0

Hi Shounak,
do I get it correctly,

  1. you created a Dictionary View (SE11) with a set of columns,
  2. you additionally created a HANA view with the same set of columns (and hopefully the correct type matching) and
  3. you are doing an OpenSQL SELECT statement with a secondary DB connection, i.e. with a CONNECTION <db_con> addition.

 

If yes, and you used the SYSTEM user (which is by the way not the option you should use, as SYSTEM user is not a developer but rather an administrator), you have to grant authorizations to the view in the SYSTEM schema to the user of the database connection (maybe SAP<SID> if that's the one used in the connection in DBCON?).

 

However, one friendly word of precaution: The procedure you are using is neither recommended nor really supported/supportable. The object in the SAP<SID> schema should be limited to ABAP/DDIC-managed objects. With the procedure you are mixing concepts, which I'd rather not do - so be aware of side effects that might break you scenario!

 

Cheers,
  Jasmin

Re: HANA View Access Error from OpenSQL

$
0
0

Hi Killian,

 

Thank You for replying. Here is the scenario:

 

I need to create an extract combining around 10 columns from FAGLFLEXA and BSEG. Both these tables are replicated via SLT ( Connection : DR1_SLT )

 

I create a view in HANA Studio in the DR1_SLT schema with the 2 tables (logged on with my developer userid but access to create objects in that schema)

 

The data preview in the studio works fine.

 

Now in ECC I created a table and a view with the same name just as a template to allow me to do a OpenSQL using secondary DB Connection (DR1_SLT)

 

But when I go to SE16H (or my program) and a query (uses OpenSQL in both cases) gives the following error for the view:

SQL error 258 when accessing table

Error Text of the Database: "insufficient privilege: Not authorized:

 

Just as a test I used SLT to replicate the ECC template Z table and view and it worked fine  in SE16H( but of course it was a table with only the fields and no joins and hence no data). So it seems SLT is able to grant the appropriate privileges.

 

I may be totally wrong here but I was under the assumption that SAP did something similar for the Simple Finance solution for the sidecar where column views like V_GLPOS_N_GL_CT were created in HANA, ECC had only the corresponding views defined in the DDIC and transactions were able to query using OpenSQL.

 

 

Regards

Shounak

Re: HANA View Access Error from OpenSQL

$
0
0

Hi Jasmin,

 

Thank You for your time in responding. Here is the scenario:

 

I need to create an extract combining around 10 columns from FAGLFLEXA and BSEG. Both these tables are replicated via SLT ( Connection : DR1_SLT )

 

I create a view in HANA Studio in the DR1_SLT schema with the 2 tables (logged on with my developer userid but access to create objects in that schema)

 

The data preview in the studio works fine.

 

Now in ECC I created a table and a view with the same name just as a template to allow me to do a OpenSQL using secondary DB Connection (DR1_SLT)

 

But when I go to SE16H (or my program) and a query (uses OpenSQL in both cases) gives the following error for the view:

SQL error 258 when accessing table

Error Text of the Database: "insufficient privilege: Not authorized:

 

Just as a test I used SLT to replicate the ECC template Z table and view and it worked fine  in SE16H( but of course it was a table with only the fields and no joins and hence no data). So it seems SLT is able to grant the appropriate privileges.

 

I may be totally wrong here but I was under the assumption that SAP did something similar for the Simple Finance solution for the sidecar where column views like V_GLPOS_N_GL_CT were created in HANA, ECC had only the corresponding views defined in the DDIC and transactions were able to query using OpenSQL.

 

 

For this scenario then would Native SQL/ADBC work or still appropriate permissions needs to be granted.

 

Regards

Shounak

Re: CDS View - consuming HANA artifact (calculation view generated by BW)

$
0
0


Hi Amol,

 

thanks.

 

I went for the AMDP approach as it would be a higher maintenence effort when using an external view as it would have to be maintained when the calculation view changes.

 

 

Furthermore I got errors when I try to generate a external view (7.40 SP5) on top of a calculation view that has been generated by the system on top of a InfoCube in BW. Should would have to build my own which wouldn't make sense when I can use a AMDP instead straight off on the calculatation view generated by BW.


ex of the error, "Field 0CALMONTH does not begin with a letter (please check)null"

 

Thanks for your support.

 

KR

Torben

Re: HANA View Access Error from OpenSQL

$
0
0

Hi Shounak,

 

as Jasmin already said, this scenario is not supported by SAP at the moment. But Jasmin already wrote the correct solution above. You have to grant the correct permission to the SAP<SID> user / the user in DBCON.

 

Supported alternative scenarios:

 

1. If you have _some_ ABAP on HANA system somewhere in your landscape you could create an external view there and transport it to your sidecar system. But the permission problem would be the same. But this scenario is at least supported.

 

2. Jasmin also suggested to create the view programmatically via ADBC. Then you can be sure that the view has the correct permissions (as it has been created by the same user who wants to access it later on). But you may get permission problems when _creating_ the view as well ;-).

 

3. You can create a database procedure around your view, create a database procedure proxy programmatically via secondary database connections and call this via CALL DATABASE PROCEDURE. But then you can't use SQL, unfortunately. But this is completely supported as well.

 

Best regards,

Kilian.

Re: CDS View - consuming HANA artifact (calculation view generated by BW)

$
0
0


Hi Torben,

 

While creating external view, in calculation view should not be contain any field start with other than letter.

 

Just rename the field 0CALMONTH either copy it and give new name at infocube level.

or

At the time of calculation view creation, create new calculated column which contain 0CALMONTH start with letter and use it new field instead of using 0CALMONTH at semantic level.

 

 

 

-Amol Samte


Re: CDS View - consuming HANA artifact (calculation view generated by BW)

$
0
0

Hi Amol,

 

I know that the fields shouldn't start with a number in a external view - however it makes no sense to start changing objects in the InfoCube in order to make an external view in hana that then can be consumed in a CDS view, when we instead can use the AMDP approach and consuming the automatically generated calculation view for the InfoCube directly in the AMDP.

 

So we have gone for the AMDP approach - it will give less overhead in this case

 

Thanks for your inputs.

 

KR

Torben

Open SQL access to DAYDATE field

$
0
0

Hi !

 

I have some table in HANA with DAYDATE field

 

create table zbseg2 (f1 daydate,f2 integer);

insert into zbseg2 values ('2012-03-01', 100);

insert into zbseg2 values ('2012-03-02', 200);

 

I have secondary connection from ABAP application server to HANA named hb1_test. In application server table ZBSEG2 described in data dictionary like this

Field nameType
F1DATS
F2INT4

 

The next code works correct:

REPORT zhana_zbseg2_conn.

DATA l_str LIKE zbseg2.

SELECT SINGLE * INTO CORRESPONDING FIELDS OF l_str FROM zbseg2 CONNECTION hb1_test.

MESSAGE s000(00).

I receive first record from HANA table with correct field F1.

 

But next code has dump as a result

REPORT zhana_zbseg2_conn.

DATA l_str LIKE zbseg2 OCCURS 0.

SELECT * INTO CORRESPONDING FIELDS OF TABLE l_str FROM zbseg2 CONNECTION hb1_test.

MESSAGE s000(00).


Dump is "Database error text: "SQL message: DB type (14) of selected column (0) and ABAP type TYPDATE (1) of target field (0) are not compatible"


Is there a workaround for this case? May be I need to use another type in data dictionary description? I try different types but no result.

Re: Concat function or equivalent for CDS view?

$
0
0

Hi Jasmin,

we're on SP9 and I have a need to use CONCAT but I'm getting an error saying "this function or expression is not supported at this point". Any idea why that would be?

 

thanks,

Malcolm.

Re: Concat function or equivalent for CDS view?

$
0
0

Hi Malcolm,
you are trying to use it in a CDS View (DDL Source) in the ABAP?

 

Where exactly do you try to use it? In the projection list, the ON condition of a JOIN/ASSOCIATION, in the WHERE clause, ...?

 

What's the exact error message, can you please paste it here (maybe even including the TRMSG message number - you can find it in the problems view after adding in the problems view this dedicated column).

 


Cheers,
  Jasmin

Re: Open SQL access to DAYDATE field

$
0
0

Hi Alexey,
as the dump mentions, the DB type and the ABAP type are not compatible. Daydate like '2015-01-01' is not compatible to DATS '20150101'.

 

So you would have to convert daydate (or to be more precise, the type CS_DAYDATE) to a compatible type for ABAP DATS. As this is hardly possible within Open SQL (at least in the current version), the question is, whether you can already modify the date at DB level, before reading it from the database.

 

My question is, why you got a DAYDATE type in zbseg2 (not a copy of BSEG, right?). Because in BSEG I know the DATS are persisted to NVARCHAR(8) fields. You might want to model it the same way.

 

Cheers,
  Jasmin

Viewing all 2110 articles
Browse latest View live


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