Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Program Dumping

Former Member
0 Likes
1,180

Hi I have below simple code and I am not sure why it's dumping, Could you please help me.

DATA : HANDLE TYPE SYSUUID_X.

DATA : MESSAGE TYPE TABLE OF HUITEM_MESSAGES_T.

DATA : ITEMS TYPE TABLE OF HUINV_COUNTING.

DATA: ITEMS3 TYPE TABLE OF HUINV_COUNTING_T .

Data: wa_items type huinv_counting.

data: Wa_items3 type huinv_counting_t.

HANDLE = '4E78896C228B738FE10000000ABA6A0E'.

wa_items-HANDLE = '4E78896C228B738FE10000000ABA6A0E'.

wa_items-ITEM_NR = '000004'.

wa_items-HUEXIST = 'X'.

wa_items-QUANTITY = '10'.

Insert wa_items into table wa_items3.

APPEND wa_items3 to ITEMS3.

CALL FUNCTION 'HUINV_DOCUMENT_COUNTING'

EXPORTING

IF_HANDLE = HANDLE

IT_COUNTED_ITEMS = ITEMS3

IMPORTING

ET_MESSAGES = MESSAGE

EXCEPTIONS

ERROR = 1

OTHERS = 2 .

_____________________________________________________________

DUMP :

Error analysis

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was

not caught and

therefore caused a runtime error.

The reason for the exception is:

It was tried to transfer the internal table "ITEMS3" to the formal parameter

"IT_COUNTED_ITEMS". In doing so, a type conflict occurred between the formal-

and the

actual parameter.

The conditions flagged below have been violated:

("X") The access types specified for the table are not compatible. The

compatibility rules are defined by the following hierarchy:

ANY_TABLE (INDEX_TABLE (STANDARD_TABLE, SORTED_TABLE), HASHED_TABLE)

A fixed access type is only compatible with its predecessors in

the hierarchy (example: STANDARD_TABLE is compatible with

INDEX_TABLE and ANY_TABLE, but is not compatible with HASHED_TABLE).

("X") The row types of the two tables are not compatible.

("X") The table keys of the two tables do not match.

("X") One of the two tables is defined with a unique key (UNIQUE); the

other is defined with a non-unique key (NON-UNIQUE).

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
878

HI Sarath,

Try to replace your internal table with workarea in this part.

Your code:

CALL FUNCTION 'HUINV_DOCUMENT_COUNTING'

EXPORTING

IF_HANDLE = HANDLE

IT_COUNTED_ITEMS = ITEMS3

IMPORTING

ET_MESSAGES = MESSAGE

EXCEPTIONS

ERROR = 1

OTHERS = 2 .

Proposed Code:

CALL FUNCTION 'HUINV_DOCUMENT_COUNTING'

EXPORTING

IF_HANDLE = HANDLE

IT_COUNTED_ITEMS = wa_items3

IMPORTING

ET_MESSAGES = MESSAGE

EXCEPTIONS

ERROR = 1

OTHERS = 2 .

5 REPLIES 5
Read only

Former Member
0 Likes
879

HI Sarath,

Try to replace your internal table with workarea in this part.

Your code:

CALL FUNCTION 'HUINV_DOCUMENT_COUNTING'

EXPORTING

IF_HANDLE = HANDLE

IT_COUNTED_ITEMS = ITEMS3

IMPORTING

ET_MESSAGES = MESSAGE

EXCEPTIONS

ERROR = 1

OTHERS = 2 .

Proposed Code:

CALL FUNCTION 'HUINV_DOCUMENT_COUNTING'

EXPORTING

IF_HANDLE = HANDLE

IT_COUNTED_ITEMS = wa_items3

IMPORTING

ET_MESSAGES = MESSAGE

EXCEPTIONS

ERROR = 1

OTHERS = 2 .

Read only

Former Member
0 Likes
878

Hi ,

DATA: ITEMS3 TYPE TABLE OF HUINV_COUNTING_T .

it should be

DATA: ITEMS3 TYPE OF HUINV_COUNTING_T .

regards

Prabhu

Read only

Former Member
0 Likes
878

Hi

The declarations of line type should be as below:

DATA : message TYPE huitem_messages_t.

DATA : items TYPE huinv_counting_t.

Check the below code


DATA : handle TYPE sysuuid_x.
*DATA : message TYPE huitem_messages_t.*
DATA : items TYPE huinv_counting_t.

DATA: wa_items TYPE huinv_counting.

handle = '4E78896C228B738FE10000000ABA6A0E'.

wa_items-handle = '4E78896C228B738FE10000000ABA6A0E'.
wa_items-item_nr = '000004'.
wa_items-huexist = 'X'.
wa_items-quantity = '10'.
*APPEND wa_items TO items.*
*APPEND wa_items3 to ITEMS3.

CALL FUNCTION 'HUINV_DOCUMENT_COUNTING'
  EXPORTING
    if_handle        = handle
    it_counted_items = items
  IMPORTING
    et_messages      = message
  EXCEPTIONS
    error            = 1
    OTHERS           = 2.

Shiva

Read only

madhu_vadlamani
Active Contributor
0 Likes
878

Hi Sarath,

Did you check that fm executing directly from se37.

Regards,

Madhu.

Read only

0 Likes
878

i know this is an old thread, but just in case someone is reviewing. the answer above is wrong. it doesn't work. use the former members answer below the suggested correct answer.

DATA: items TYPE huinv_counting_t.
should be used for the it_counted_items. this will work without issue.