Skip to Content
author's profile photo Former Member
Former Member

Function module not recognizing IMPORT param

Hi abapers,

IMPORT parameter: I_ZZZZZ was declared in a custom Function module, but when it is referenced in one of the Function modules INCLUDE, it doesn't seem to recognize. Here is the error during syntax-check:

"Field "I_ZZZZZ" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement."

Please note I've activated the complete Func. group using SE80 as some have suggested on this Forum, and have also activated the "INCLUDE".

Appreciate your thoughts!

Thankyou

Edited by: ABAP JUNOON on Dec 18, 2008 6:21 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Dec 19, 2008 at 12:34 AM

    I_ZZZZZ is defined local in custom FM,and It will be reconize only, once this FM has been used in some program.

    the defination of I_ZZZZZ is not exist in Data dictionary.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 01:01 AM

    Hi

    I think the parameters declared in the Function Module interface Import/Export are local to the Function-End Function construct. If you need to use any of these variables outside you should declare a global variable in the top include (Global data section) populate it within the FM and then use it wherever needed OR if calling a subroutine from within the FM pass the parameters in the subroutine interface.

    Thanks

    Sharath

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 01:23 AM

    Hey Amit, here is the deal:

    Function Group: PACK contains the following INCLUDES:

    LZPACKF01

    LZPACKTOP

    LZPACKUXX

    ZPACKDATA

    Function Module: ZDLV_PACK_0001 contains the following IMPORT parameters:

    I_ZZZZZ

    I_ZPA01

    I_ZPA02

    Source code of main FM: ZDLV_PACK_0001 :

    perform reset_vars_itab.

    Souce code of INCLUDE LZPACKF01 contains the above FORM

    FORM reset_vars_itab.

    IF NOT I_ZZZZZ IS INITIAL. <========== THis is where Function mod. is failing

    • Refresh internal tables

    CLEAR: var1, var2, var3, var4.

    REFRESH: tab1, tab2, tab3, tab4.

    ENDIF.

    ENDFORM.

    Edited by: ABAP JUNOON on Dec 18, 2008 7:26 PM

    Add a comment
    10|10000 characters needed characters exceeded

    • >

      > Function Module: ZDLV_PACK_0001 contains the following IMPORT parameters:

      > I_ZZZZZ

      > I_ZPA01

      > I_ZPA02

      >

      > Source code of main FM: ZDLV_PACK_0001 :

      > perform reset_vars_itab.

      >

      > Souce code of INCLUDE LZPACKF01 contains the above FORM

      > FORM reset_vars_itab.

      >

      > IF NOT I_ZZZZZ IS INITIAL. <========== THis is where Function mod. is failing

      > * Refresh internal tables

      > CLEAR: var1, var2, var3, var4.

      > REFRESH: tab1, tab2, tab3, tab4.

      > ENDIF.

      >

      > ENDFORM.

      As i already said in my first reply I_ZZZZZ is a local parameter for your FM,it can't access outside of FM anyway.

      Even if you declear I_ZZZZZ in your include its value would always be initial,untill and unless you call FM in your Include.

      At line:

      IF NOT I_ZZZZZ IS INITIAL. "<========== Call here FM

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 02:49 AM

    Just an FYI - this FM exist in one of the instances perfectly working for past several yrs and we're trying to re-create in a different instance.

    I_ZZZZZ is an import param for the FM, and will be available for all includes within F.group.

    Edited by: ABAP JUNOON on Dec 18, 2008 8:50 PM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.