Skip to Content
author's profile photo Former Member
Former Member

Dump when calling AMDP

Hello Experts,

I am receiving below dump when calling my AMDP method. I am not able to figure out the reason.

Request your help. Google has resulted only 7 results for this dump. None seem relevant.

Dump details:

Category ABAP programming error Runtime Errors AMDP_EXECUTION_FAILED Except. CX_AMDP_EXECUTION_FAILED ABAP Program ZCL_AMDP_EXAMPLE==============CP

Application Component Not assigned

Dump location: The dump occurs at declaration of AMDP method i.e. at below statement

METHOD GET_MAT_DET_AMDP

BY DATABASE PROCEDURE FOR HDB

LANGUAGE SQLSCRIPT

options READ-ONLY

using mara makt marc.

Report call: The report calls method GET_MAT_DET2 which calls method GET_MAT_DET_AMDP

AMDP Class details

CLASS zcl_amdp_example DEFINITION

PUBLIC

FINAL

CREATE PUBLIC .

PUBLIC SECTION.

INTERFACES if_amdp_marker_hdb.

TYPES: BEGIN OF ty_mara,

matnr TYPE mara-matnr,

ersda TYPE mara-ersda,

ernam TYPE mara-ernam,

maktx TYPE makt-maktx,

END OF ty_mara,

tt_mara TYPE TABLE OF ty_mara.

TYPES: BEGIN OF ty_marc,

matnr type mara-matnr,

werks type marc-werks,

END OF ty_marc,

tt_marc type TABLE OF ty_marc.

methods GET_MAT_DET2

importing

IM_MATNR type MARA-MATNR

exporting

EX_MATDET type TT_MARA

EX_MARC type TT_marc.

PROTECTED SECTION.

private section.

methods GET_MAT_DET_AMDP

importing

VALUE(IM_MATNR) type MARA-MATNR

exporting

VALUE(IM_client) type mandt

VALUE(EX_MATDET) type TT_MARA

VALUE(EX_MARC) type TT_marc.

ENDCLASS.

CLASS ZCL_AMDP_EXAMPLE IMPLEMENTATION.

METHOD GET_MAT_DET_AMDP

BY DATABASE PROCEDURE FOR HDB

LANGUAGE SQLSCRIPT

options READ-ONLY

using mara makt marc.

ex_matdet = SELECT mara.matnr,

mara.ersda,

mara.ernam,

makt.maktx

FROM mara as mara JOIN makt as makt

on mara.mandt = makt.mandt

AND mara.matnr = makt.matnr

WHERE mara.mandt = :im_client

AND mara.matnr = :im_matnr

AND makt.spras = 'E';

ex_marc = SELECT marc.matnr, marc.werks

from marc as marc JOIN :ex_matdet as ex_matdet

ON marc.matnr = ex_matdet.matnr

where marc.mandt = :im_client

and marc.matnr = :im_matnr;

ENDMETHOD.

METHOD GET_MAT_DET2.

CALL METHOD get_mat_det_amdp

EXPORTING

im_matnr = im_matnr

IMPORTING

im_client = sy-mandt

ex_matdet = ex_matdet

ex_marc = ex_marc.

ENDMETHOD.

ENDCLASS.

Report details

REPORT zgen_amdp_example.

PARAMETERS: p_matnr type mara-matnr.

DATA: it_matdet TYPE zcl_amdp_example=>tt_mara,
it_marc TYPE zcl_amdp_example=>tt_marc.

* instantiation
DATA(lo_amdp_example) = new zcl_amdp_example( ).

* execution

lo_amdp_example->get_mat_det2(
EXPORTING
im_matnr = p_matnr
IMPORTING
ex_matdet = it_matdet
ex_marc = it_marc
).

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jun 29, 2016 at 05:33 AM

    Hello Sanket,

    please can you add an exception handling to your method call to find out more details (add exception class CX_AMDP_ERROR to the declaration fo method GET_MET_DET2 and catch the exception when the method is called; check with methods GET_TEXT, GET_LONGTEXT if more details are provided).

    Another point is how you work with the client. It is not correct that the client is an exporting parameter in the AMDP method. You have to declare it as importing parameter to be able to use it successfully with the correct client value in your where clause. As you have used already the naming convention IM_CLIENT I think it was already in your mind to do so.

    Regards,

    Florian

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for the update.

      Client as an exporting parameter was the issue.

      Silly I overlooked it. I had planned to use client as an importing parameter but placed by mistake in exporting parameter.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.