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

calling the fm

Former Member
0 Likes
1,528

hi all ,

i am calling the fm (zfm) from se38 and in fm i have declared one ztable and import para

and i am calling that fm in se 38

and here i have decalred one internal table like that of the table in fm and given in tables place as the

mtab = ktab.

i have debuged and seen that the date is found here in KTAB.

But in other step

If ktab[] is initial.

Message i009(zmys) with 'records are not found' .

Exit.

Endif.

it doesnt contain the data what would be the reason can anyone tell me pls

hi all ,

i am calling the fm (zfm) from se38 and in fm i have declared one ztable and import para

and i am calling that fm in se 38

and here i have decalred one internal table like that of the table in fm and given in tables place as the

mtab = ktab.

i have debuged and seen that the date is found here in KTAB.

But in other step

If ktab[] is initial.

Message i009(zmys) with 'records are not found' .

Exit.

Endif.

it doesnt contain the data what would be the reason can anyone tell me pls

11 REPLIES 11
Read only

Former Member
0 Likes
1,508

>i have debuged and seen that the date is found here in KTAB.

>But in other step

>If ktab[] is initial.

>Message i009(zmys) with 'records are not found' .

>Exit.

>Endif.

may be what ever you see that is in header of the ktab.

but body maight be empty.

Read only

former_member217544
Active Contributor
0 Likes
1,508

Hi,

Try assigning this way.

mtab [ ] = ktab [ ] .

Regards,

Swarna Munukoti.

Edited by: Swarna Munukoti on Aug 6, 2008 11:12 AM

Read only

Former Member
0 Likes
1,508

Hi Kata,

Can you please eleborate more or paste you code calling FM.

You say you have declared it in Import Para. You should declare it in tables.

If not try MTAB[ ] = KTAB[ ].

Regards,

Mohaiyuddin

Read only

0 Likes
1,508

i hav declared fm like this

imprt as: p_vbeln like vbak-vbeln.

export as: mtab like my stru(zst2)

i hav declared the internal table and put the data in it and moved from internal table to mtab.

move itab to mtab.

so i called this one from the se 38

i hav declared the table like that of the fm

call function zxxx

export =

import = as

mtab = ktab

but the data is not fetched

Read only

0 Likes
1,508

internal tables are declared in the tables tab of the fm...

declare this table in the tables tab not in the export tab.

and use the exception...not message in the function module

Read only

0 Likes
1,508

Instead of defiling mtab as

export as: mtab like my stru(zst2)

define it in TABLES tab.

You code will return only header line of mtab to calling program.

Change in code to pass table instead of IMPORT parameter.

call function zxxx

export =

import = as

mtab = ktab

tables

mtab = ktab.

Regards,

Mohaiyuddin

Read only

0 Likes
1,508

hi ,

i hav even declared like that too but it is still the same

tables:

mtab like zst2.

here in se38

tables = ktab.

but it doesnt show any diff

Read only

0 Likes
1,508

In you code of FM, instead of

move itab to mtab, use

mtab[ ] = itab[ ].

Regards,

Mohaiyuddin

Read only

Former Member
0 Likes
1,508

hii

use in this way..

describe table ktab lines numlines.

If numlines is initial.

Message i009(zmys) with 'records are not found' .

Exit.

Endif.

Regards ,

sabari

Read only

Former Member
0 Likes
1,508

hi,

what vijay babu suggested is right.

may be u saw the data in header not in body.

ktab[] means it declares the body

Read only

Former Member
0 Likes
1,508

Use as below

mtab [ ] = ktab [ ]

rgds

rajesh