Function Module creation in 4.6C

Hi techies,
I am not an ABAPer, but just copying Function Module code from 3.1 R/3 to 4.6C R/3.
In 3.1, for the Table Parameter "E_DATA", there are two columns 'Reference Structure' and 'Reference type'. Since I am using the structure 'ZBFNEW', it looks following:
<u>Table parameters   Ref. structure     Reference Type</u>     E_DATA                ZBFNEW    -                                                         Now same thing I wanted to do in 4.6C, but there under table parameter tab, there are no field called 'Ref Structure. The column are: Parameter Name, Type Specification and Reference type.
So the question is How do I assign Structure in FM for Table parameter. In coulmn, i tried with all the options (Type, LIKE and TYPE Ref To), but it gives error "Only table types may be used as the reference type for a table parameter"
Any suggestion guys???
Regards, Pankaj

Rich's suggestion should work for you.  The message you are receiving
is in regards to a new feature in 4.6 that did not exist in 3.1.  Using SE11,
you can define an internal table definition in the Dictionary. 
Put the new table definition name next to structures.  Hit create and you
will be asked about what you are creating.  Pick the Table Type option. For example,
you could create a table type definition called Z_T_ZBFNEW, based on
structure ZBFNEW.  Then you would use the TYPE setting for your table,
setting it to TYPE Z_T_ZBFNEW.
As an aside, the TABLE parameter tab is considered to be
obsolete in 4.6.  You can now pass tables using the
EXPORTING, IMPORTING and CHANGING parameters.  So if/when you start
coding new Function Modules, I suggest you stop using the
TABLE parameter tab.
Just curious, how does a non-ABAPer get assigned the task to copy
Function Modules?  Keep smiling and good luck!
Message was edited by: Charles Folwell

Similar Messages

  • Function module creation for IDOC processing...

    hi Experts,
                 i want to create a function module for idoc processing..
    message type: zashpmnt
    idoc type : shpmnt05
    plz tell me which standard FM is used... and tell me what changes i want to do in it....
    Tnx in Advance..

    Hello,
             If you are trying to process an Outbound IDoc for the SHIPMNT05 IDoc Type with an Extension, you can use the IDOC_OUTPUT_SHPMNT Function Module which is assigned to SHPM Process Code.
           In Addition, since you have an IDoc Extension, you are required to populate the Custom Segment / Fields. For this, there is a Customer Function / Exit called EXIT_SAPLV56K_002 which you can use it for adding your Custom Segments to the IDoc ZSHPMNT05.
           If you are writing code in this exit, make sure to create a Project in CMOD.
           Also, ensure that you've made the assignment in WE82 with the Message Type , IDoc Type & the Extension.
           For Inbound, if you would like to Create a Custom Function Module, you can follow the Naming Convention Z_IDOC_INPUT_SHPMNT for which you are required follow the below Steps.
    1. Register the FM as Inbound FM in BD51 T-Code.
    2. Assign the FM to IDoc Type & Extension in WE57.
    3. You'll need to Create a Custom Process Code in WE42 in which you are required to make add your FM.
    4. Maintain Partner Profiles in WE20.
    5. Have the Process Code Migrated to the Testing Environment as creation of Custom Process Code is a Customizing Activity and it requires a Customizing Request to be created / Migrated.
    6. Define the Parameters as defined in the Standard Inbound Function Modules such as IDOC_INPUT_ORDERS , IDOC_INPUT_DELVRY etc.
    Thanks and Regards,
    Venkat Phani Prasad K

  • BAPI creation versus function module creation...

    Hi,
    I know the difference between BAPI and simple function  module. I have also created custom function module.
    But I have not worked on creation of Custom BAPIs.
    Is there a much differece in creation of function module and BAPI?
    If there is please throw some light on main differences or stepwise differences when I create BAPI versus function module ?
    Thanks.
    Regards,
    Tushar.

    Hai Tushar
    what is BAPI?
    BAPI stands for Business API(Application Program Interface).
    I have answered this question before..
    A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
    You can make your function module remotely enabled in attributes of Function module but
    A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
    Please check out this thread..
    Re: bapi
    Also refer to the following links..
    www.sappoint.com/abap/bapiintro.pdf
    www.sap-img.com/bapi.htm
    www.sap-img.com/abap/bapi-conventions.htm
    www.planetsap.com/Bapi_main_page.htm
    www.sapgenie.com/abap/bapi/index.htm
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    Java Connector(JCO) can call not only BAPI's but also the function modules which are remotely enabled..
    BAPI's as i said earlier are remotely enabled function modules..
    Hence, JCO can call also BAPI's(n not only BAPI's as u mentioned).
    Thanks & regards
    Sreeni

  • Application server File renaming function module creation - sample code

    I want to rename a file from application server using function module.
    Can somebody tell me is there is any such sap provided function module
    is there?If not please tell me what should be abap routine to create such
    a function module.
    Thanks in advance....

    You need to create a logical file name using FILE transaction. Then create a logical path and assign the physical path (actual path on app. server) to the logical path. While defining the physical filne name you have the option of selecting from the list of 'reserved word' available. For e.g. <DATE>, <TIME> etc.
    Steps are:
    1) Execute transaction 'FILE'.
    2) Create a logical file path.
    3) Assign Syntax Grp (Operating Systems) to above logical file path. You need to create the syntax group to identify the physical path in the application server. This step actually assigns the physical path to the logical path.
    4) Create a logical file.
    5) Assign the physical file name to the logical file. You have lots of system reserved word to choose from to suffix your file name with date and time etc.
    The physical file name is used by the function module FILE_GET_NAME at runtime to compose a complete platform-specific file name.
    For more information, see [renaming a file on the application server;.
    Regards.

  • In function module creation,table, view is better or structure is better  ?

    I am creating a new z function module.
    Under tables parameter, I need to create 'Profit_Center_Table'  which should contain combination of ztable and cepc fields.
    as
    Tables
    •     Profit_Center_Table – should contain List of ztable and cepc fields
    Is it okay, if I create a view with the combination of ztable and cepc fields
    And use the view under table’s tab page in my zfunction module ?
    Or it is better to create a structure with the combination of ztable and cepc fields

    hi,
    better to create structure or internal table with all the required fields.
    we can export and import  internal tables to function module by using TABLES parameter interface.
    if you create View, how can you pass to the function module.
    as per my knowledge no parameter interface is availabe to pass views to function module.
    for more information follow this link.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801ef5454211d189710000e8322d00/frameset.htm
    regards,
    Ashokreddy
    Message was edited by:
            Ashok Reddy

  • FUNCTION MODULE CREATION FOR GENERIC DATA SOURCE

    Hi BI gurus,
    I am creating function module for generic datasource. For that I followed below mentioned steps
    Steps
    1.     Created s structure with the fields that needed.
    2. Created FM by copying the standard Function module
    " RSAX_BIW_GET_DATA_SIMPLE " and Give a New name starting With
    Y or Z .
    3. IN SE37 ->Your Function module name -> Change, In table tab given structure
    name by deleting the associated type given in “E_T_DATA “.
    And inserted the required code given below
          PROGRAM 'ZHU_BALANCE'.
    *& Report  ZHU_BALANCE
    TABLES: VEKP, VEPO.
    DATA: BEGIN OF T_DISPLAY,
          DATE   LIKE SY-DATUM,
          EXIDV  LIKE VEKP-EXIDV,
          LGORT  LIKE VEPO-LGORT,
          WERKS  LIKE VEKP-WERKS,
          END OF T_DISPLAY.
    DATA: ITAB_DISPLAY LIKE TABLE OF T_DISPLAY.
    DATA: WA_ITAB_DISPLAY LIKE LINE OF ITAB_DISPLAY.
    SELECT VEKPEXIDV VEPOLGORT VEPO~WERKS
           INTO CORRESPONDING FIELDS OF TABLE ITAB_DISPLAY
           FROM VEKP AS VEKP INNER JOIN VEPO AS VEPO
             ON  VEKPVENUM = VEPOVENUM
             AND VEKPWERKS = VEPOWERKS
           WHERE VEKP~VSTEL = SPACE
             AND VEKP~VEGR1 = '401'
             AND VEKP~VPOBJ = '12'
             AND VEKP~STATUS = '0020'
             AND VEPO~VEPOS = '000001'.
    LOOP AT ITAB_DISPLAY INTO WA_ITAB_DISPLAY.
    WA_ITAB_DISPLAY-DATE = SY-DATUM.
    MODIFY ITAB_DISPLAY FROM WA_ITAB_DISPLAY TRANSPORTING DATE.
    ENDLOOP.
    WRITE:/ 'DATE', 20 'EXIDV', 40 'LGORT', 60 'WERKS'.
    ULINE.
    LOOP AT ITAB_DISPLAY INTO WA_ITAB_DISPLAY.
    WRITE:/ WA_ITAB_DISPLAY-DATE, 20 WA_ITAB_DISPLAY-EXIDV , 40 WA_ITAB_DISPLAY-LGORT, 60 WA_ITAB_DISPLAY-WERKS.
    ENDLOOP.
    While checking the function module it’s populating the syntax error as
    THE TYPE “SRSC_S_IF_SIMPLE” IS UNKOWN. (Though this is commented in program)
    So pls suggest
    Regards,
    praful

    hi indira,
    thanx for ur reply we have created the funcion module successfuly it is also showing the output correct. But when we put that function module in the generic data source and try to extract data in RSA3 it shows the correct output of function module but with the msg ' 0 entries found in customer enhancement' and therfore zero records in the display list.
    is there any correction or steps to be followed in data extraction
    pls suggest
    regards,
    praful

  • Biw function module creation in se37 / unable to tranposrt to production

    hi,
    i need data of a BW table to be transported to R/3.
    For this A RFC function module is exsisting in our BIW DEV server.
    that FM is as follows
    under TABLES
    DATA LIKE /BIC/AZGVDTL00 ODS Object ZGVDTL : Active Records
    UNDER SOURCE CODE
    FUNCTION ZGV_DATA.
    ""Local Interface:
    *" TABLES
    *" DATA STRUCTURE /BIC/AZGVDTL00
    SELECT * FROM /BIC/AZGVDTL00 INTO TABLE DATA.
    ENDFUNCTION.
    THE PLAN IS
    if a program is scheduled everyday in R3 System
    This program will call the above FM, which is in BIW using RFC and populate data in R3 tables.
    BUT THE PROBLEM IS
    when i transport the FM from BW QAL to BW PROD the req is transported but the FM is not present in BIW PROD..
    why is that FM not getting transported from BIW qal to BIW prod??????????/
    when i check the FM
    tables tab
    DATA LIKE /BIC/AZGVDTL00
    i double clicked on /BIC/AZGVDTL00
    the package is $TMP..Temporary Objects (never transportd)
    is this the probnlem?

    the problem is not FM not being present in my req...
    my req has FM....
    but when i transport the req the FM doesnt appear in my PROD...
    also earlier i had one single req which only had function group...
    that req when tried to transport gave error with return code 8...
    the error said,syntax error in FM ,FM not present...(however when checked in PROD the function group is transported but not the FM.)
    so the BW guy has transported the table into PROD...(it shows that table is $TMP)
    now i created a req for FM exclusively ...
    this req when transported doesnt give error but the FM doesnt come to PROD!!!!!!!!
    the only descrepancy i feel is the table used in the FM is present in $TMP package...
    also when tried in DEV it doesnt allow to change the package in DEV..

  • Types Does not Exist Error in Function Module creation

    Hi Guys
    I am trying to replicate the functionality of the below program using a function module. However when I enter the following in the changing tab of the fn mod, I get  error TYPE IT_VBRP does not exist.
    Parameter name p_it_vbrp like it_vbrp
    <removed by moderator>
    Moderator message: please post only relevant code parts, your posts must contain less than 5000 characters to preserve readable formatting.
    Edited by: Thomas Zloch on Sep 11, 2011 3:55 PM

    Hi
    The reference type of a parameter of the interace of function module has to be defined in dictionary, if you need to use a particular type, you need to create an your own custom type pool or try to looking for a type defined like yours,
    For example if you need a table based on vbrp, you can use the table type TAB_VBRP
    Max

  • Doubt in  export, import and table para when creating Function Module

    Dear fellow ABAPers,
    I have a doubt in defining export, import and table parameter while creating a function module.
    I am calling a function module inside a user exit. Now in the user exit the SAP fills an internal table called i_lfa1 with all the data user has eneterd.
    Now I want to pass this whole internal table to function module and the perform some checks on the values of internal table.
    After that function module fills an error structure with values depending on some check.
    1)
    How do I pass this internal table to function module ? 
    When I am creating function module in se37 where do I define this iternal table type ? Is it in Import or Table parameter during function module creation?
    2)
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Please clear my doubt..
    Relevant points will be awarded.
    Regards,
    Tushar.

    Hi Tushar,
    1. How do I pass this internal table to function module ?
       I assume u are creating your own Y/Z FM.
       Pass it thru TABLES parameter.
    2. When I am creating function module in se37 where do I define this iternal table type
       Define this in TABLES interface.
       What Type ?
       THE SAME TYPE WHICH HAS BEEN DEFINED
        WHILE PASSING IN THE USER-EXIT FUNCTION MODULE.
       IF U SEE THE FM OF THE USER-EXIT,
       U WILL COME TO KNOW.
    3.
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Define it in TABLES interace. (not in export, import)
      (Since what u are going to return is an internal table)
      U can take for eg. BDCMSGCOLL.
      OR u can create your own Y/Z structure
    for the same purpose.
      (or u can use the structure type T100)
    I hope it helps.
    Regards,
    Amit M.

  • Any example to import and export itab to function module

    hi all,
    as the table parameter in function module is obsolete, please advise an example on how to pass in an internal table
    and return back the result in an internal table as well.
    for example, i have itab1 and itab2. By using table parameters i got the following code. Please advise alternative way by using import and export.
    ""Local Interface:
    *"  TABLES
    *"      itab1 STRUCTURE  Zitab1
    *"      itab2 STRUCTURE  Zitab2
    loop at itab1 into wa_itab.
    **do some logic here to assign value to itab2 and return.
      wa_itab2-a = xxx .
      wa_itab2-b = xxx.
    append wa_itab2 to itab2.
    endloop.
    thank you.

    hi,
    suppose you have two structure name struc1 and struc2.
    create table type zitab1 & 2 for both.
    please do the following:
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(itab1) TYPE  Zitab1
    *"  EXPORTING
    *"     VALUE(itab2) TYPE  Zitab2
    you can avoid to use the obsolete table parameters as well as LIKE in function module creation.
    cheers

  • Webdynpro for  class or function module

    i want to create employee detail page in abap webdynpro and few other pages....how i should do this
    should i go for functional module creation and implement it or
    i should create class and that class i should implement and any good example to learn how to implement class in abap
    webdynpro.....
    please help me with good toturial

    Class methodology is the future.
    In this case, i would build an instantiated class where you would select all the details for 1 employee. Store those in attributes.
    create methods for other functionality such as retrieving additional data, calculations etc...
    EDIT: I should also point out that you should continue to add attributes and methods to your class until you model an entire employee object.
    that way anyone who wants to know anything about an EE can just instantiate your class and retrieve the appropriate attribute or use a method to determine what they need.
    Edited by: Robert Phelan on Aug 4, 2011 8:04 PM

  • Functional module for automatic creation of pur requisition & pur order

    hello,
    what is the functional module for automatic creation of puchase requisition and automatic creation of purchase order which we will assign in action box in service order processing management.
    please let me know as early as possible
    regards,
    rajesh kumar raju

    Hi,
             Please check with following.
    IDOC_INPUT_ACC_PURCHASE_REQUI
    IDOC_INPUT_ACC_PURCHASE_ORDER
    /ISDFPS/OR_PURCHASE_ORDER_CR
    BS01_PURCHASE_DOCUMENT_CREATE
    CO_MP_CREATE_PURCHASE_ORDER
    Thanks & Regards
    Sadhu Kishore

  • Error with quantity field:Datasource Creation Using Function Module method

    Problem with DATASOURCE Creation using Function Module method :
    I have created a datasource ZSTANDARD_COST_PRICE using Function Module method . The datasource creation is successfull when I remove the quantity field from the Z table . If I dont remove the quantity field from my Z table it gives an error as "Units Field WAERS for field STPRS of datasource ZSTANDARD_COST_PRICE is hidden". I am not able to remove this error . Please someone guide.
    Let me know if my explanation is not clear enough.
    Thanks in advance,
    Neha.
    Z table definition is as below :
    MATNR MATNR CHAR 18 0 Material Number
    BWKEY BWKEY CHAR 4 0 Valuation area
    LFGJA LFGJA NUMC 4 0 Fiscal Year of Current Period
    STPRS STPRS CURR 11 2 Standard Price   " Here the currency field is WAERS and table T001
    PEINH PEINH DEC 5 0 Price Unit
    VJSTP VJSTP CURR 11 2 Standard price in previous year
    VJPEI VJPEI DEC 5 0 Price unit of previous year.
    Edited by: Neha Rathi on Jan 30, 2009 3:03 PM

    Hi,
    You should add it as one of the main fields as you have added other fields and not as the currency fields...that is..it should be part of the data source and you should be able to see it in RSO2...
    Also if added as i said then it will come as new field in the data source...you can either let it be there...or hide it..
    also if you want to populate it then you will have to write the code for this fields as well.
    Thanks
    Ajeet

  • Problem with Creation of CRM Order via Function Module Test

    I am trying to check the order creation process from external systems by using the test function in Tcode SE37 with Function Module BAPI_BUSPROCESSND_CREATEMULTI.
    I have created a Test Sequence of the following FMs:
    BAPI_BUSPROCESSND_PROCSETTINGS
    BAPI_BUSPROCESSND_CREATEMULTI
    BAPI_PROCESS_SAVE
    BAPI_TRANSACTION_COMMIT
    All that I have been able to create so far is an order header without a Sold-to or Ship-to and no items. I am able to populate the Organization data, Header text and Appointments. The only partner function that is being populated is the one that is being automatically picked up from my user master.
    For the BAPI_BUSPROCESSND_CREATEMULTI I am populating the following tables:
    HEADER          1 entry
    ITEM               2 entries
    PARTNER          2 entries
    ORGANISATION     1 entry
    APPOINTMENT          2 entries
    INPUT_FIELDS          41 entries     
    SCHEDULELINE     2 entries
    I have created the entries based upon information gained through debugging function module CRM_ORDER_MAINTAIN during the creation of a service order.
    It would be interesting to know if anybody has successfully created an order via the SE37 test function and if so, it would be useful to see the data in the relevant tables.

    HEllo ,
    Write a wrapper to the function module CRM_ORDER_MAINTAIN.
    To populate the Text use below code
      ls_input_field_names-fieldname  = 'REF_GUID'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'REF_KIND'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDID'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDSPRAS'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDSTYLE'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDFORM'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'LINES'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'MODE'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      CLEAR ls_input_fields.
      ls_input_fields-ref_guid    = attr_guid.
      ls_input_fields-ref_kind    = 'A'.
      ls_input_fields-objectname  = 'TEXTS'.
      CONCATENATE 'CRM_ORDERH' order_guid INTO ls_input_fields-logical_key.
      ls_input_fields-field_names = lt_input_field_names.
      INSERT ls_input_fields INTO TABLE attr_t_inputfields.
    Call Order maintain FM to create any order
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_text               = lp_order->attr_t_text
          it_partner          = lp_order->attr_t_partner
        IMPORTING
          et_exception     = et_exception
        CHANGING
          ct_orderadm_h     = lp_order->attr_t_orderadm_h
          ct_input_fields      = lp_order->attr_t_inputfields
        EXCEPTIONS
          error_occurred    = 1
          document_locked   = 2
          no_change_allowed = 3
          no_authority      = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Regards
    Satish

  • How to automate the creation of Function Module & Class Object (SE24)

    Experts,
    I have the requirement to automate the creation of any type of programs: ie function module (like how we normally create in SE37 together with the parameters), class object (like how we normally create in SE24 together with attribute & method), normal report (like how we did in SE38), module pool and so on.
    For example. I backuped my program into a flat file (the entire source code in txt formal or HTML) through a download program and I need to upload back this flat file into another installation of SAP.
    Does SAP provide any predefined FM to cater for the above cases or better still, does anyone know of any upload program which I can use for the above requirement.
    Thanks in advance.

    Hi Kris, I can't use the transport system as these are 2 separate SAP installation in a different place. The requirement came in the form of creation of program to be able to generate FM/Class/Report on the go.

Maybe you are looking for

  • "washed-out" effect on ipod nano 5g

    i'm not sure how many people have noticed this, but the ipod nano seems to have a few contrast problems with the video camera. for example, when you enter the effects menu, and select normal again, when the video fits the screen again you will see th

  • Merged dimension gives #syntax error

    Hi everybody, i have a simple report that contains 2 query. i merged two dimensions and everything looks like fine. but when i just refresh the query it gives me syntax error; bo system : 4.1 sp3 and both of queries are bex queries.any suggestion ple

  • SAP certification question please help

    Hi all; I am angeline, I would like to take exam for SAP BASIS NW 7.0, I am reading some SAP BOOKS like ADM505 ADM506 - Database Administration Oracle TADM10_1_2008 TADM10_2_2008 TADM-12-1-2008 TADM-12-2-2008 i am not sure where may i start to read i

  • Cisco Valet Connector Formatted

    My AM10 no longer contains the setup.exe file. How do I go about setting it up?

  • Start up error message 65879468

    Start up error message 65879468 please help