Skip to Content
0

Inconsistent data while using AMDP in S/4 HANA 1511

Nov 30, 2017 at 11:23 AM

112

avatar image

Hi experts!

I'm having an issue while using an AMDP in S/4 HANA.

We wrote an complex AMDP, using a modularization concept inside it.

When we execute the AMDP without debugging the call command of AMDP GET_CO_BALANCE_DATA we have a result, and when we run the AMDP debugging (without changing filters) the result set is different from the previous execution.

Custom AMDP GET_CO_BALANCE_DATA:

Input table (174563 records):

Output table (5467 records):

Number of result recods into main AMDP:

Now i will run debugging the AMDP ZCL_AMDP_DEMONST_SOCIO_V2=>GET_CO_BALANCE_DATA:

The same records in input table (174.563 records):

Debugging the procedure:

Result now changed (174.563 records into result table):

Number of result recods into main AMDP:

Now the error stops even if i execute the AMDP with no debug, but it just start occuring again if i log off S/4 HANA.

Any ideia what could be this error?

Thks!

Matheus Goulart

1.png (15.6 kB)
2.png (14.7 kB)
3.png (15.1 kB)
4.png (2.9 kB)
5.png (15.5 kB)
6.png (49.0 kB)
7.png (18.8 kB)
8.png (3.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Matheus Oliveira Goulart Mar 12 at 12:12 PM
0

Hello guy's,

The problem was related to a constant value.

The developer created a constant to empty values:

declare lc_false constant nvarchar(1) := ' '; --Empty space 

But the correct value for the field should be empty (no space).

This corrected the problem, but we did not discovered why when debugging the AMDP the error occur and when execute online do not.

Thanks.

Share
10 |10000 characters needed characters left characters exceeded
Matheus Oliveira Goulart Dec 08, 2017 at 10:57 AM
1

We've opened a SAP incident. When SAP responds i will update this post.

Complementing the informartion, while executing the procedure inside HANA, we’ve got 49.000 rows, but while executing the same AMDP on ABAP (throught SE24) we’ve got 3.800 rows. So i think it's some problem on the framework

AMDP execution:

Procedure executed directly on HANA with the same filters (bypassed the AMDP framework).


1img.jpg (32.0 kB)
3img.jpg (29.6 kB)
2img.jpg (59.3 kB)
Share
10 |10000 characters needed characters left characters exceeded
Horst Keller
Dec 08, 2017 at 02:28 PM
0

"Complementing the informartion, while executing the procedure inside HANA, we’ve got 49.000 rows, but while executing the same AMDP on ABAP (throught SE24) we’ve got 3.800 rows. So i think it's some problem on the framework"

You must not call AMDP procedures from inside HANA. You should call AMDP procedures from AS ABAP only.

See note 2511210. And that's exactly because of such "incidents".

AMDP procedures are an "internal implementation detail" of AS ABAP. They of course depend on being called from AS ABAP and that an AS ABAP is available. E.g. if you use an CDS View inside the the AMDP procedure that depends on ABAP specific session variables, you are lost when calling the procedure directly

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Keller,

Thanks for your reply.

I did execute the procedure inside SQL console of Hana database, we do not use that procedure directly in a HANA application or HANA artifact.

On my question all my screenshot's are from AMDP debugger and stack ABAP.

I did this test just for curiosity to check if i would have the same result from both approachs, calling the procedure from HANA and calling the AMDP from ABAP SE24 tcode with same filters on both. The result's were that when i did execute the AMDP without debugging, it gives me fewer records than when i did execute from HANA SQL console, but when i did execute the AMDP in debug mode, it gives me the correct numbers of result records (the same number of HANA Sql console execution).

Thanks.

0