Function Module IMPORT structures not recognized in form subroutines

Hello everyone,
Did some searching on SDN and didn't find the answer, so I apologize if this has been covered before.
Just finished my first Function Module.  It's a remote-enabled (RFC) function that will be called by XI to do some processing.  I have two components declared on the IMPORT tab, which we'll call "A" and "B".  Both "A" and "B" are defined with a user type, each of which is a simple structure of 4-5 fields each.  My Function Module also has two tables, and these are defined on the TABLES tab.
Here's my problem:  When I do a syntax check, I get an error telling me that "A" and "B" are unknown.  However, I only get this error where I reference "A" or "B" in the FORM subroutines I have declared at the end of my function.
I have my other data declarations defined globally in the "LZ...TOP" Include for my Function Module, so those don't pose a problem.  But these are my Function Module parameters, so I can't go "declare" those as I already have them defined on the appropriate tabs.
Is there a way for me to get around this error and have them recognized globally, or do I have to resort to moving the values to some globally-declared "hold" field?  I'm hesitant to have to add them as parameters passed into the FORM routines because I pretty much reference each of the fields within the structures for "A" and "B".
Thanks everyone.  Points definitely awarded for helpful answers.

Dave,
The parameters are visible only in the main program of the function module. So, if the subroutines are directly in the main function, they you should not have a issue. But if you subroutines in an include and you are calling them in the main function, then the paramters are not visible in the subroutines. In that case you will have to hold the values in a globally declared tables.
Or you will have to pass them as parameters to Sub routines as well.
Regards,
Ravi
note : please mark the helpful answers
Message was edited by: Ravikumar Allampallam

Similar Messages

  • Function Module " /Crystal/GET_FUNCAREA_CATALOG" not found

    Good day Masters
    I am not able to connect to our SAP ECC6.0 because of the below error
    Function Module " /Crystal/GET_FUNCAREA_CATALOG" not found
    is this function modules exists on the transport files ? do you think by executing the transport this problem will be resolved ?
    and how we can execute the transport files from Basis perspective ,,, our basis tried to execute this transport to they got belw error
    " file might be currapted "
    Regards

    Hi
    your BASIS administrator should copy the transport files in the import queue and use the STMS transaction to import them in your system. Make sure to import the UNICODE version in the order as shown in the transports_<your language>.txt file.
    Make sure that the files are indeed imported.
    Which version of BOBJ are you using?
    Regards,
    Stratos

  • Function module RSD_ZIO_ALM02_TXT_GET does not exist

    Hi
    I am trying to copy the data from one info cube to another info cube with the read master data in transformation rule for some of the info object. This exercise I have done many times successfully for the same structure but suddenly I am getting this error without doing any changes
    'Function module RSD_ZIO_ALM02_TXT_GET does not exist'
    After getting this error I have delete the transfer rule for above object than the some error are coming for the another info object which also used for read master data.
    Kindly help me .(we are working on ECC 6)
    Thanks and Regards
    Vinay

    Hi Vis
    I tried this one also but it’s not working. All the info objects are active and I tried after reactivating also but still error exits.
    Thanks and regards
    Vinay

  • Calling a remote enabled function module which does not exist in caller sys

    Hi,
    I have a a system ABC from which I am trying call a rfc enabled fm(Test) present in system XYZ.
    The fm(Test) does not exist in the system ABC so I am getting generation errors and dumps.
    Is there a way for me to call these remote enabled function modules which does not exist in the caller system without the obvious errors etc.
    Is there any special way.
    Thanks

    Hi,
    please check this sample:
    REPORT  zcallfm                                 .
    DATA: xv_return TYPE sysubrc.
    CALL FUNCTION 'DOESNOTEXIST'
    DESTINATION   'NOWHERE'
    EXPORTING     caller                = sy-sysid
    IMPORTING     return                = xv_return
    EXCEPTIONS    system_failure        = 1
                  communication_failure = 2
                  OTHERS                = 4.
    It shouldn't throw any generation errors in your system!
    Regards,
    Klaus

  • I upgraded my 3 yr old iMac to Snow Leopard and now my HP C4150 Scanning function doesn't work (not recognized).  I downloaded updated Drivers from the HP site, but still no joy.  Any suggestions?

    I upgraded my 3 yr old iMac to Snow Leopard (OS X 10.6) and now my HP C4150 Scanning function doesn't work (not recognized).  I downloaded updated Drivers from the HP site and installed them, but still no joy.  Any suggestions?

    aspaceman,
    Perhaps I owe you an apology.   Having re-read that downloading from HP was unsuccessful I feel uncomfortable.  Can I suggest you update your 10.6 system (as noted in your profile) to 10.6.8 (if it is not already there) by using the
    Mac OS X 10.6.8 Update Combo v1.1 combo update plus any software updates that then apply.  

  • BAPI function module 'BAPI_PO_CHANGE' is not updating aacural condition

    Dear All,
    BAPI function module 'BAPI_PO_CHANGE' is not updating aacural condition in PO pricing. Please give me a right solution on this query.
    Below I have given my code.
    Thanks and Regards
    Makarabd
    poitem-po_item = '00010'.
    poitem-net_price = '1060.00'.
    poitem-period_ind_expiration_date = 'D'.
    APPEND poitem.
    poitemx-po_item = '00010'.
    poitemx-po_itemx = 'X'.
    poitemx-net_price = 'X'.
    APPEND poitemx.
    select single * from ekko where ebeln = po_no.
    pocond-itm_number = '00010'.
    pocond-cond_type = 'ZVCU'.
    pocond-cond_value = 10.
    pocond-currency = '%'.
    pocond-STAT_CON = 'X'.
    pocond-accruals = 'X'.
    pocond-change_id = 'I'.   " I - Add , U - Update , D - Delete
    APPEND pocond.
    pocondx-itm_number = '00010'.
    pocondx-itm_numberx = 'X'.
    pocondx-cond_type = 'X'.
    pocondx-cond_value = 'X'.
    pocondx-currency = 'X'.
    pocondx-change_id = 'X'.
    pocondx-STAT_CON = 'X'.
    pocondx-accruals = 'X'.
    APPEND pocondx.
       CALL FUNCTION 'BAPI_PO_CHANGE'
            EXPORTING
              purchaseorder          = po_no
            TABLES
              return                 = return
              poitem                 = poitem
              poitemx                = poitemx
              pocond                 = pocond
              pocondx                = pocondx.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'.

    Hi ,
    Are you trying to pass the non char fields in CI_COBL. Please look at the link below .
    [http://forums.sdn.sap.com/thread.jspa?threadID=1137795] .
    Also serach for the similar threads when and notes while transferring currency and quantity field in different custom includes of the EKPO ...
    Thanks,
    Anjaneya .

  • Request having function group released but function module attribute shows not released

    Hi experts,
                   I am a beginner.
                  There is a transport request in which my function group and other objects were present . This transport request and its task were released . But if i check the attributes section of the function module that is present in that function group , it shows not released .
    Is there some problem ? did the function module not get released with its group? It wasn't showing anywhere in the request even though i had added it during creation.
    Here is the image :
    Thanks,
    Unnati

    Hi,
    Those two meanings of 'released' are unrelated. Don't worry about it.
    Also, a function module sometimes does not explicitly appear in a transport request, if the function group is already in there.
    cheers
    Paul

  • Function module WWW_ALV_CALL is not released for the Internet

    Hi
    I am facing this error Function module WWW_ALV_CALL is not released for the Internet and Only user SAP can release the function module.
    Best Regards
    GAGAN

    hi,
    This Web based calls are not available anymore in Netweaver 2004s/7.0. 
    More information in SAP-Note: 910202
    Hope this helps
    regards
    Tobias

  • Preview error function module "CRYSTAL/MDX_GET_STREAM_INFO" not found

    Hi,
    I cannot preview the report I created in Crystal Report 2008. Here is 1st error message "Failed to retrieve data from the database. Then the 2nd error message is "Database connector error: : Function module 'CRYSTAL/MDX_GET_STREAM_INFO' not found. My data source is from MDX query.
    Thanks in advance.
    Rose

    Hi
    Contact your basis administrator to ensure
    - All the transports have been installed properly.
    - Check the version of Crystal Reports and BusinessObjects and the SAP MDX driver version.
    For CRXIR2 +BOXIR2 this issue was resolved in CHF15.
    Regards
    Sourashree

  • Function module RSD_ZBCSASSET_TXT_GET does not exist

    Hi,
    We are working with SEM-BCS 6.0 (SAP BI 7.0), and I want to trasfer master data of a infoobject from BI to SEM BCS through load from data stream task.
    When I going to execute the task the system display the next message Function module RSD_ZBCSASSET_TXT_GET does not exist.  Message no. EU802.
    Thanks in advanced
    Carlos

    Same error occured in a planning sequence of mine. The related characteristic did not have texts.
    The error occured after the addition of a navigational attribute to the MultiProvider.
    Solution: re-activate the aggregation level.
    Late, but hope that helps...

  • Function Module - Generic Extraction : Not able to solve

    Hi Guys,
           I have created a function module. The function module is working well. But when i start the extraction. It does not stops. It starts loading same data package again and again. It is becoming an endless loop. I have ot ask basis person to kill that job. He inturn has to restart SAP r/3 server. This has become a big issue. Guys please help I am attaching the code for your reference
    Example: DataSource for table SFLIGHT
    TABLES: YSALES,
           MBEW.
      DATA: BEGIN OF I_YSALES OCCURS 0.
              INCLUDE STRUCTURE YSALES.
      DATA: END  OF I_YSALES.
      DATA: BEGIN OF I_MBEW OCCURS 0.
              INCLUDE STRUCTURE MBEW.
      DATA: END OF I_MBEW.
    Auxiliary Selection criteria structure
      DATA: L_S_SELECT TYPE SRSC_S_SELECT.
    Maximum number of lines for DB table
      STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    counter
              S_COUNTER_DATAPAKID LIKE SY-TABIX,
    cursor
              S_CURSOR TYPE CURSOR,
              S_CURSOR1 TYPE CURSOR.
    Select ranges
      RANGES: L_R_ZYEAR  FOR YSALES-ZYEAR,
              L_R_ZMONTH  FOR YSALES-ZMONTH.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF I_INITFLAG = SBIWA_C_FLAG_ON.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    Check DataSource validity
       CASE I_DSOURCE.
         WHEN '0SAPI_ysales_SIMPLE'.
         WHEN OTHERS.
           IF 1 = 2. MESSAGE E009(R3). ENDIF.
    this is a typical log call. Please write every error message like
    *this
           LOG_WRITE 'E'                  "message type
                     'R3'                 "message class
                     '009'                "message number
                     I_DSOURCE   "message variable 1
                     ' '.                 "message variable 2
           RAISE ERROR_PASSED_TO_MESS_HANDLER.
       ENDCASE.
       APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
    Fill parameter buffer for data extraction calls
        S_S_IF-REQUNR    = I_REQUNR.
        S_S_IF-DSOURCE   = I_DSOURCE.
        S_S_IF-MAXSIZE   = I_MAXSIZE.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
        APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
      ELSE.                 "Initialization mode or data extraction ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
       IF S_COUNTER_DATAPAKID = 0.
    Fill range tables BW will only pass down simple selection criteria
    of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
        LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'ZYEAR'.
          MOVE-CORRESPONDING L_S_SELECT TO L_R_ZYEAR.
          APPEND L_R_ZYEAR.
        ENDLOOP.
        LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'ZMONTH'.
          MOVE-CORRESPONDING L_S_SELECT TO L_R_ZMONTH.
          APPEND L_R_ZMONTH.
        ENDLOOP.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between DataSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
         OPEN CURSOR WITH HOLD S_CURSOR FOR
         SELECT (S_S_IF-T_FIELDS)
            FROM YSALES .
         OPEN CURSOR WITH HOLD S_CURSOR1 FOR
          SELECT (S_S_IF-T_FIELDS)
          FROM MBEW WHERE YSALES~MATNR
              AND BWKEY = YSALES~WERKS.
        select  BUKRS
                ZYEAR
                ZMONTH
                WERKS
                MATNR
                SLSCAT
                KNDNR
                SPART
                MATKL
                MENGE
                DMBTR
                VV702
                VV703
                VVADS
                VV704
                VV731
                INTO
                CORRESPONDING FIELDS OF table I_YSALES
                PACKAGE SIZE S_S_IF-MAXSIZE
                FROM YSALES
                WHERE ZYEAR IN L_R_ZYEAR
                AND   ZMONTH IN L_R_ZMONTH.
       ENDSELECT.
            WHERE MATNR IN L_R_MATNR.
            WHERE WERKS = WERKS
            AND   MATNR = MATNR
            AND   KNDNR = KNDNR
            AND   SPART = SPART.
        IF SY-SUBRC = 0.
          SORT I_YSALES BY WERKS MATNR .
        ENDIF.
        IF NOT I_YSALES[] IS INITIAL.
          SELECT MATNR
                 BWKEY
                 BWTAR
                 LBKUM
                 SALK3
                 BKLAS
                 INTO CORRESPONDING FIELDS OF TABLE I_MBEW
                 PACKAGE SIZE S_S_IF-MAXSIZE
                 FROM MBEW
                 FOR ALL ENTRIES IN I_YSALES
                 WHERE MATNR = I_YSALES-MATNR
                 AND   BWKEY = I_YSALES-WERKS.
          ENDSELECT.
        ENDIF.
        LOOP AT I_YSALES .
          MOVE-CORRESPONDING I_YSALES TO E_T_DATA.
          READ TABLE I_MBEW WITH KEY MATNR = I_YSALES-MATNR
                                     BWKEY = I_YSALES-WERKS.
          IF SY-SUBRC = 0.
            MOVE-CORRESPONDING I_MBEW TO E_T_DATA.
          ENDIF.
          APPEND E_T_DATA.
        ENDLOOP.
       IF SY-SUBRC <> 0.
         CLOSE CURSOR S_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
       ENDIF.                             "First data package ?
    Fetch records into interface table.
      named E_T_'Name of extract structure'.
       FETCH NEXT CURSOR S_CURSOR
                  APPENDING CORRESPONDING FIELDS
                  OF TABLE E_T_DATA
                  PACKAGE SIZE S_S_IF-MAXSIZE.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.

    Hi Baljit,
    This is a dangerous way of extracting your data.
    I am not surprised that it has become an endless loop.
    You have to use the cursor and the fetch statement and after the fetch statement you have to use a subreturncode
    to wonder if the fetch statement did get any data.
    if not use the folowing statements.
    close cursor s_cursor.
    raise no_more_data.
    In your situation the select statement will start every time from the first record in the table ysales because you don't use the cursor. By using the cursor and the fetch statement, the fetch statement will start from the cursor everytime it calls the function module.
    I guess this function module is part of an endless loop and will be exited at the moment that the function module returns with raise no_more_data. (in other words, the cursor is at the last record of the table ysales, so no more records will be found)
    Hope this will help
    Maarten

  • Function module Global variables not cleared from memory?

    Hi,
    This is may be simple & stupid question ( after posting  4242 posts ):)
    " Declaration in TOP
    data : begin of i_y1yatt occurs 0.
            include structure y1yatt.
    data : end of i_y1yatt.
    types: begin of t_yatt71.
           include structure yatt71.
    types: tcode like sy-tcode.
    types: dflag type c.
    types: end of t_yatt71.
    data : i_yatt71 type standard table of t_yatt71
                   with default key  with header line  initial size 0.
    This is code in the function module.
      loop at i_y1yatt.
        move-corresponding o_y1yatt to i_yatt71.
        if i_y1yatt-werks eq 'N501'.
           move space to i_yatt71-werks.
        endif.
        append i_yatt71. 
        " Here this internal contains the previous entry
        clear i_yatt71.
      endloop.
    This function module is called 25 times in a minute.
    My problem is this
    For example : 1st tranmission is called this fm with 50 records,
    and 2nd tranmission is called fm with 10 records.
    My results are showing
    last record in the 1st transmission is still on the memory while calling 2nd transmission.  ( Here in int table I_YATT71 still contains the 1st transmission's last records during the 2nd tranmission call)
    As per my knowledge if each time calls comes in to fm all gloabl variables get cleared. but some how this not happening.
    Anybody come across this scenario.
    PS. I know i need to use clear statement within the loop as first statement.

    You must understand that when calling a FM, you load the entire function group into memory. IF there are global variables, then they are "alive" for the entire duration of the program execution. Meaning if you call the function numerious times, or even if you call another function within the same function group, the functions still have access to that same global variable space, so it must always be cleared manually by the developer at the required points.  You can not rely on the runtime to clear the global variables at the end of the function call.  So you should clear all you globals as the first operation in your function module call, if that is what is required.
    Is this clear?
    Regards,
    Rich Heilman

  • Function module import parameter

    I had used a bapi in the program and i got a dump.
    then i recetified the dump. But kindly tell me the
    reason .
    My program is like this..
    Report xyz.
    DATA wa_bapireturn TYPE bapireturn.
    DATA it_bapireturn LIKE TABLE OF  wa_bapireturn.
    DATA wa_bapisdstat TYPE bapisdstat.
    DATA it_bapisdstat LIKE TABLE OF  wa_bapisdstat.
    PARAMETERS p_vbeln LIKE vbap-vbeln.
    START-OF-SELECTION.
      CALL FUNCTION 'BAPI_SALESORDER_GETSTATUS'
        EXPORTING
          salesdocument = so_vbeln
        IMPORTING
          return        = it_bapireturn
        TABLES
          statusinfo    = it_bapisdstat.
    now i got the dump because i have used
    it_bapireturn for importing.
    then i modified the program like..
    CALL FUNCTION 'BAPI_SALESORDER_GETSTATUS'
        EXPORTING
          salesdocument = so_vbeln
        IMPORTING
          return        = wa_bapireturn
        TABLES
          statusinfo    = it_bapisdstat.
    Now the program working fine because i passed
    wa_bapireturn. please tell me why it happened like
    this. How to know when to pass internal table and when to
    pass just a structure.
    And also tell me the difference bet type and type ref to.

    As per the interface definition of the BAPI, it expects one workarea in the RETURN parameter.
    but it_bapireturn was an internal table so was the dump
    but wa_bapireturn is a work area so it worked.
    You can check the interface of the Function Module to know what to be used. Usually work areas are passed in IMPORT AND EXPORT parameters and internal tables in TABLES parameters.
    by using TYPE , we create a variable of a pre difined TYPE.
    by using TYPE REF we create object of a particual class
    Edited by: Swastik Bharati on Aug 21, 2008 2:16 PM

  • IDOC_INBOUND_FROM_FILE function module and UNICODE not allowed ?

    Hello all,
    The IDOC_INBOUND_FROM_FILE function module doesn't allow inbound IDOCs to be processed if the UNICODE flag is set on with the WE21 transaction.
    I turned on the WE21 UNICODE checkbox so that I could output characters in the extended set of UTF-8 characters. Most notably, I need to output the Euro Currency character (code 8364) and the em dash character (code 8212). This worked fine for my outbound files. 
    When I tried to import a normal 8-bit ASCII file with RSEINB00, the function module returns a code 8 because the UNICODE flag is set for the port. This is caused in form FIRST_RECORD_READ_AND_CHECK. The function module quits before the IDOC records are even processed at all. Look at the form code around line 168 of include program LEDINF01.
    This seems very wierd since program RSEINB00 is commonly used for reading IDOC files.
    Has anyone else experienced this?
    Can anyone recommend a different function module or global class to use for inbound files?
    Thanks
    Ed Baker
    P.S.
    If any of you need a nice website illustrating characters available with UTF-8 encoding, try this one.
    http://library.seaplusplus.net/software/plourde/utf8.html

    Question rephrased and asked again to improve clarity

  • Function Module SWK_LOCAL_INBOX_GET does not exists

    Hi,
    I configured UWL in the Portal.
    When i am trying to acess UWL, throwing an exception.
    it says "Exception type:com.sap.netweaver.bc.uwl.connect.ConnectorException Message:Thu Apr 12 15:58:26 GMT+05:30 2007 :Function Module SWK_LOCAL_INBOX_GET not found"
    Can anyone help me what could be the problem.
    Rgds,
    Kiran Joshua

    Hello Kiran,
    at least the user needs to have the Role SAP_BC_SRV_GBT_USER in backend.
    My only other idea is to check the existance of the plugin (WP-PI) in R/3.
    But, in a similar situation (missing plugin in R/3) i got the ConnectorException "Failed getting the following function metadata from repository: URL_SERVER_TYPE_DATA_GET".
    Perhaps a trace in R/3 could assist you?
    Sorry, no more ideas, regards

Maybe you are looking for

  • I am getting javascript error message when opeing new window from website Exc in ev handl: TypeError: brw is undefined

    when this happens the new window opens but cannot be closed except by using the X in the top right hand corner( there is a "close " link on the web page which seems to be disabled. when the PC is switched of and on again firefox opens all the same wi

  • "Edit in Photoshop" not working after 3.3 update...

    It seems as though after updating to version 3.3, my "edit in photoshop" functionality has stopped working.  When I choose this option, Photoshop will open, but Lightroom does not bring up a dialog for exporting the photo, nor do I see a progress bar

  • Satellite L555-D- 7005

    Turned machine on, got black and white screen stating boot failure...press (key) to reformat and reset to factory default. Did that...Restarted machine and looked ok. Attempted to run MS Word, asked for key. Entered key which was on the bottom of mac

  • I cant verify my icloud account!!help!!

    I cant verify my icloud acount it keeps saying cant connect to server! Its and ipone 4s text internet etc work when i try to log into icloud it says i have to verify account......but cant verify can anyone help

  • N97 restarts when connecting to PC via Mass Storag...

    Hi guys,  My friend has a N97 and she changed the font using E:\Resource\Fonts\ folder method. The font was successfully changed; however, she didn't like it.  So she decided to change back the font, but whenever she connects the N97 to PC via "Mass