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

Getting error while excuting

Former Member
0 Likes
877

Hi Experts,

I have created a z function modu;e where i have passed a import parmeter ztkomk of table type(v_komk) of komk

and while i am calling that fm in the export parameter i am passing tkomk(like komk with header line )but it is giving dump would any body help me in this regards.

Thanks

Swaraj

8 REPLIES 8
Read only

Former Member
0 Likes
830

What is the dump you are facing?

Manas M.

Read only

Former Member
0 Likes
830

Hi

Probably you've a call like this:

CALL FUNCTION <function>
  EXPORTING 
     ztkomk = tkomk

U need to transfer the data only, not the header line:

CALL FUNCTION <function>
  EXPORTING 
     ztkomk = tkomk[]

Max

Read only

Former Member
0 Likes
830

Hi manas,

Structure mismatch dump i am getting

Read only

0 Likes
830

Are u getting dump as UC_OBJECTS_NOT_CONVERTIBLE.

Please paste your code...

Did you try *Max *response.

Manas M.

Read only

Former Member
0 Likes
830

HI MANAS

THIS IS THE CODE

CALL FUNCTION <lfs_exits>-fmname

EXPORTING

ztkomk = tkomk[]

changing

vbak = vbak

.

It was tried to transfer the internal table "TKOMK[]" to the formal parameter

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

actual parameter.

ZTKOMK TYPE VA_KOMK_T(LINE TYPE OF KOMK)

TKOMK LIKE STANDARD TABLE OF KOMK

WITH KEY KEY_UC

INITIAL SIZE 2

WITH HEADER LINE.

REGARDS

SWARAJ

Read only

0 Likes
830
DATA: BEGIN OF TKOMVD .
        INCLUDE STRUCTURE KOMVD.
        DATA: END OF TKOMVD.

Declare your structure this way and check

Read only

0 Likes
830

Hi

VA_KOMK_T is a type standard table, that means ZTKOMK will be a STANDARD INTERNAL TABLE WITH NON UNIQUE KEY.

TKOMK LIKE STANDARD TABLE OF KOMK WITH KEY KEY_UC WITH HEADER LINE

.

That means TKOMK is a STANDARD INTERNAL TABLE but WITH KEY.

So u should define:

DATA TKOMK LIKE STANDARD TABLE OF KOMK WITH HEADER LINE.

CALL FUNCTION <......>
   EXPORTING 
      TKOMK = TKOMK[]

If you need TKOMK is defined as sorted (KEY_UC) STANDARD TABLE, u need to create a new type table to be assigned as reference for the paramenter of your fm.

Max

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
830

just pass it with square brackets in your fm while calling.

call function abc

exporting

ztkomk = t_tab[].

And refer ztkomk to a table type in your program

check it also for the changing parameter.

In the dump it will specify which parameter had the type conflict.

Edited by: Keshav.T on Jan 15, 2010 7:58 PM