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

short dump when passing str to Function module

Former Member
0 Likes
626

Dear friends,

When i execute the prog, short dump is occuring. here i am posting the code

with concerned declaraion only.

DATA: BEGIN OF IT_DESCRIPTION_HIERARCHY OCCURS 0.

INCLUDE STRUCTURE BAPI_WRF_DESC_CHANGE_HIER.

DATA: END OF IT_DESCRIPTION_HIERARCHY.

IT_DESCRIPTION_HIERARCHY-LANGU = 'E'.

IT_DESCRIPTION_HIERARCHY-HIER_DESCRIPTION = 'Test Article rchy wes'.

APPEND IT_DESCRIPTION_HIERARCHY.

CALL FUNCTION 'BAPI_WRF_MATGRP_CHANGE'

EXPORTING

HIERARCHY_DATA = IT_HIERARCHY_DATA

    • TESTRUN =

HIERARCHY_STRUCTURE = IT_HIERARCHY_STRUCTURE

DESCRIPTION_HIERARCHY = IT_DESCRIPTION_HIERARCHY

DESCRIPTION_STRUCTURE = IT_DESCRIPTION_STRUCTURE

    • HIERARCHY_ITEMS =

    • EXTENSION_IN =

IMPORTING

RETURN = IT_RETURN.

Following short dump is occuring. what could be the prob.

" The function module interface allows you to specify only

fields of a particular type under "DESCRIPTION_HIERARCHY".

The field "IT_DESCRIPTION_HIERARCHY" specified here is a different

field type "

Thanks & Regards,

sai

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
584

Instead of

DATA: BEGIN OF IT_DESCRIPTION_HIERARCHY OCCURS 0.

INCLUDE STRUCTURE BAPI_WRF_DESC_CHANGE_HIER.

DATA: END OF IT_DESCRIPTION_HIERARCHY.

declare as:

DATA IT_DESCRIPTION_HIERARCHY type BAPI_WRF_DESC_CHANGE_HIER. "If BAPI_WRF_DESC_CHANGE_HIER. is a table type.

or

DATA IT_DESCRIPTION_HIERARCHY type standard table of BAPI_WRF_DESC_CHANGE_HIER. "If BAPI_WRF_DESC_CHANGE_HIER. is a structure.

REgards,

Ravi

4 REPLIES 4
Read only

Former Member
0 Likes
585

Instead of

DATA: BEGIN OF IT_DESCRIPTION_HIERARCHY OCCURS 0.

INCLUDE STRUCTURE BAPI_WRF_DESC_CHANGE_HIER.

DATA: END OF IT_DESCRIPTION_HIERARCHY.

declare as:

DATA IT_DESCRIPTION_HIERARCHY type BAPI_WRF_DESC_CHANGE_HIER. "If BAPI_WRF_DESC_CHANGE_HIER. is a table type.

or

DATA IT_DESCRIPTION_HIERARCHY type standard table of BAPI_WRF_DESC_CHANGE_HIER. "If BAPI_WRF_DESC_CHANGE_HIER. is a structure.

REgards,

Ravi

Read only

Former Member
0 Likes
584

Hi,

What is the structure of IT_RETURN and IT_HIERARCHY_STRUCTURE,IT_DESCRIPTION_STRUCTURE,IT_HIERARCHY_DATA

Mainly this problem is in declaring the types of import and export parameters.

Try,

IT_DESCRIPTION_HIERARCHY-LANGU = 'EN'.

Thanks,

Sutapa

Read only

Former Member
0 Likes
584

Hi Sai,

Instead of this code,

DATA: BEGIN OF IT_DESCRIPTION_HIERARCHY OCCURS 0.

INCLUDE STRUCTURE BAPI_WRF_DESC_CHANGE_HIER.

DATA: END OF IT_DESCRIPTION_HIERARCHY.

Just add the following code

DATA: IT_DESCRIPTION_HIERARCHY type BAPI_WRF_DESC_CH_HIER_TTY.

I hope you will not get short dump.

Thanks and Rgds,

Kamal

Read only

Former Member
0 Likes
584

the passing field to FM should be of same type of the field of FM