2008 Aug 06 10:05 AM
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
2008 Aug 06 10:09 AM
>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.
2008 Aug 06 10:12 AM
Hi,
Try assigning this way.
mtab [ ] = ktab [ ] .
Regards,
Swarna Munukoti.
Edited by: Swarna Munukoti on Aug 6, 2008 11:12 AM
2008 Aug 06 10:14 AM
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
2008 Aug 06 10:28 AM
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
2008 Aug 06 10:31 AM
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
2008 Aug 06 10:34 AM
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
2008 Aug 06 10:49 AM
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
2008 Aug 06 11:16 AM
In you code of FM, instead of
move itab to mtab, use
mtab[ ] = itab[ ].
Regards,
Mohaiyuddin
2008 Aug 06 10:16 AM
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
2008 Aug 06 10:18 AM
hi,
what vijay babu suggested is right.
may be u saw the data in header not in body.
ktab[] means it declares the body
2008 Aug 06 10:19 AM