This website has been archived, it is working in read-only mode.

This website has been archived, it is working in read-only mode.

The following program results in a short dump, for now I've chalked it up to a bug with the ABAP compiler/run-time. Various other permutation upon the same theme runs fine... just this particular combination of dynamic class and returning a char1 to an exporting any seems to crash. (a char2 works fine, leading me to suspect UTF-16 handing bugs too)

The resulting short dump message: Access to string reference with destroyed content (it occurs on the final WRITE statement.)

To be clear I understand the error message, I just don't see how it is happening that my reference can possibly be pointing to destroyed content.

Also we have a up-to-date development system with all relevant SAPNOTES applied.

REPORT  z_error_test.
    METHODS method_true RETURNING value(r_val) TYPE char1.
    METHODS execute EXPORTING e_result TYPE any.
  METHOD method_true.
    r_val = 'X'.
  METHOD execute.
    e_result = method_true( ).

  DATA: lcl_test  TYPE REF TO cl_test,
        l_result  TYPE string.

  CREATE OBJECT lcl_test.
  lcl_test->execute( IMPORTING e_result = l_result ).
  WRITE :/ l_result.

asked 31 May '13, 09:11

Marius%20Piedallu%20van%20Wyk's gravatar image

Marius Pieda...
accept rate: 33%

It also happens in my test system. I agree, this looks wrong. It will be interesting to test with 7.4 when such trial becomes available.

(02 Jun '13, 17:31) pedrolima ♦♦

Not working on 7.4 either. Te problem is already in e_result = method_true( ) method doesn't return anything called that way. It works this way:

METHODS execute RETURNING value(e_result) TYPE char1.
 l_result = lcl_test->execute( ) .

And more important like this:

METHODS execute EXPORTING e_result TYPE string.
permanent link

answered 23 Aug '13, 03:36

Pawel%20Hixohe%20Grze%C5%9Bkowiak's gravatar image

Pawel Hixohe...
accept rate: 16%

'Veronica Mars' Begins Filming: See Set Photos Here! Fans didn't just ask for a "Veronica Mars" movie, they actively supported one, contributing more than $5 million to its budget via Kickstarter. Related Article:

permanent link

answered 18 Jun '13, 23:40

iuyuyuy's gravatar image

accept rate: 0%

Afghan attack kills US soldiers hours after news of talks Four US soldiers have been killed in Afghanistan, hours after the US announced direct talks with the Taliban. The soldiers were killed by "indirect fire" from insurgents at Bagram air base, US officials said. Read and more:

permanent link

answered 23 Jun '13, 06:58

fwfwfw's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 31 May '13, 09:11

question was seen: 10,825 times

last updated: 23 Aug '13, 03:36