Copying function module (FM) with funtions

Hi all,
I'm trying to copy one function module (FM) called Z1  to another called Z2. Z1 contains lot of functions stored within its includes. After copy functions are referenced to original's includes of Z1. I need them to be copied as well to new includes. Would I try to copy it to diffrent function group or to copy whole group under new name?
Thanks
Martin

Hello Martin,
I must agree with Ramesh. Copying Function Modules can be a very messy job. In my experience, in case of complicated function modules, it's better to copy the function group and then delete the stuff that's not required.
Regards,
Anand Mandalika.

Similar Messages

  • Copying function module & program with all ENHANCEMENT-POINT

    Guyz,
    i'm on ecc6.0 and want to copy a standard report and FM with all its enhancement points. Can i do ? Kindly let me know how to do the same ?
    Thanks

    Hi,
    Enhancement frame work is the new concept using which SAP allows you to change the existing programs
    See the following blogs that talk about the same in detail
    /people/thomas.weiss/blog/2006/01/24/what-the-new-enhancement-framework-is-for-150-its-basic-structure-and-elements-for-beginners
    /people/thomas.weiss/blog/2006/03/15/the-new-enhancement-framework-part-2--what-else-you-need-to-know-before-building-an-enhancement
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    /people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework
    Check the theard also
    https://forums.sdn.sap.com/click.jspa?searchID=3456104&messageID=2839972
    <b>Reward points</b>
    Regards

  • Function module call with destination

    Hi,
    how can check if a function module call with destination works or not ?
    How can I debug.
    What can be the reason if it is not calles
    regards
    ertas

    * to chcek the rfc Destination By pass RFC destination name and Connection Type..
    RFC_CHECK_DESTINATION
    or
    RFC_CHECK_DESTINATION_ID
    or
    You can use this FM RFC_VERIFY_DESTINATION if your release is greater than 4.6C.
    Check this sample code from Craig Cmehil's weblog.
    CALL FUNCTION 'RFC_VERIFY_DESTINATION'
      EXPORTING
        DESTINATION = TMP
            TIMEOUT = 10
      EXCEPTIONS
        INTERNAL_FAILURE           = 1
        TIMEOUT                    = 2
        DEST_COMMUNICATION_FAILURE = 3
        DEST_SYSTEM_FAILURE        = 4
        UPDATE_FAILURE             = 5
        NO_UPDATE_AUTHORITY        = 6
        OTHERS                     = 7.
      IF SY-SUBRC EQ '0'.
        "* Do code here
      ENDIF.
    Prabhu

  • Error while using Function module SPELL_AMOUNT with arabic language AR

    Hi ,
    When i am trying to convert the number to words, using function module SPELL_AMOUNT with arabic language(AR),following abend message is coming and FM is getting abended.
    Entry AR 0 1 in table T015Z does not have a delimiter (
    Can you please provide me how to overcome this error?
    Thanks & Regards
    Seshagiri.

    Hi Santosh,
    Thanks for quick inputs.
    And amount is not having any delimitors.
    I have checked in table T015Z and it has entries with AR as SPRAS.
    All entries are having ':' at the beginning of the arabic words,and there is no single entry with ';'.
    All entries with EN as SPRAS are having delimiters ';' at the end of the words.
    Numbers are correctly converted to words in english,but abending in arabic.
    Any idea please.
    Thanks & Regards
    Seshagiri.

  • Problem while copying function modules..

    Hi,
    I am trying to copy a function module called MRM_ENTRY_ERS to Z function module.
    Now the problem is there are 6 performs inside the function module and again in those 6 performs there
    are around 10s of performs.
    So its really hectic to create includes for form-endform for all of those performs.
    Is there a way that when I copy all those form-endform without creating includes for every perform ?
    I mean is there some  easier way to do it ?
    Thanks.
    Rajesh.

    Hi,
    I think copy the total Function group MRMN of this FM (MRM_ENTRY_ERS) into new function group like ZMRMN.
    Please go to SE80, select function group, enter MRMN, press enter. Select the Function group MRMN, press the right butoon, click copy option, now you enter the new function group like ZMRMN,click copy, then after you select the copy function module(only if you need to Z fm), given the Z FM name and then press copy button, then it copies the function module successfully
    subbarao

  • Copying function module from one function group to another

    What is the efficient way to copy a module from one group to other so that all its subroutines and any dependencies with in the FM can also be copied?

    Hello,
    Tcode:SE37
    Menu: FunctionModule->OtherFunctions->Copy in that there are different option give a new name of the function group this should work
    regards
    suresh nair

  • Function Module Extractor with Delta

    I'm very new to working with the BW, so I hope I'm explaining my question in a way that makes sense.
    I need to make a BW extractor that pulls data from at least one table, possibly more, and which also calculates some data.
    I think the only way I can do that is by using an extractor with a function module.
    I've been looking at the examples in function group RSAX, and I think I sort of get it, except for one part.
    I'm really confused about how the delta works.
    I'm looking at the example: RSAX_BIW_GET_DATA_SIMPLE
    Does it even use a delta?
    I'm trying to understand how the delta gets passed, and how it gets used to filter the data in the function module.  I'm not sure if it's something I need to code in myself, or if it's something that BW does by itself, or what.
    I'm not sure if I'm making sense, but if anyone could help me, I'd appreciate it.

    Thanks guys, you've been super helpful so far, so I'm just going to keep asking questions.  I promise to award points at the end
    I'm looking at it now, and I think if I change it to read from a table, instead of read from a function module I can use the 'numeric pointer' option for the delta.  (Does that just mean a number?  For example, payroll runid is a number, so I could use that and only get new payroll runs?)
    However, there still are some calculated fields they want.  Someone mentioned doing that on the BW side.  How would that work?
    Sorry for such vague questions, but any help is really appreciated.

  • Function module Prob with kostl

    hi,good day guys.
    Iam using K_ORDER_SRULE_ADD for settelment rules. In this other function module  for read the fields one whic is K_DEFAULT_RULE_READ.. This is k_order_srule_add f.m source code as below as.
    .default rule table TKB2C is maintained as 'I_SRULES' therefore
    *.....aditional work area is needed.
          i_srules = srules.
    *.....fill COBL to find KONTY
          cobl-kokrs        = ld_kokrs.
          cobl-gsber        = srules-bus_area.
          cobl-bukrs        = srules-comp_code.
          cobl-saknr        = srules-gl_account.
          cobl-prctr        = srules-profit_ctr.
          cobl-kostl        = srules-costcenter.                     "here iam getting the cost center value
          cobl-aufnr        = srules-orderid.
          CALL FUNCTION 'CJPN_EXTERN_TO_INTERN_CONV'
            EXPORTING
              ext_num       = srules-wbs_element
            IMPORTING
              int_num       = cobl-ps_psp_pnr
            EXCEPTIONS
              error_message = 2
              OTHERS        = 1.
            EXIT.
          ENDIF.
          cobl-anln1        = srules-asset_no.
          cobl-anln2        = srules-sub_number.
          cobl-nplnr        = srules-network.
          cobl-vornr        = srules-activity.
          cobl-kdauf        = srules-sales_ord.
          cobl-kdpos        = srules-s_ord_item.
          cobl-kstrg        = srules-cost_obj.
          cobl-prznr        = srules-co_busproc.
    *.....get ASSIGN information in IT_DFTAB
          CLEAR konty.
          CALL FUNCTION 'K_DEFAULT_RULE_READ'        "this FM reads the fields and assining to the lt_dftab
            EXPORTING
              dfreg         = 'BAP'
              obart         = 'OR'
              i_cobl        = cobl
            IMPORTING
              e_konty       = konty
            TABLES
              dftab         = it_dftab                                           "iam not getting the costcenter[kostl] field..
            EXCEPTIONS
              error_message = 2
              OTHERS        = 1.
          IF ( sy-subrc <> 0 ).
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                    RAISING error_occurred.
            flg_leave = 'X'.
            EXIT.
          ENDIF.
    Based on lt_dftab fields. K_POSTING_RULE_INSERT f.m willbe insert the values.prob with costcenter.
    Edited by: balaji kiran on Apr 14, 2010 7:55 AM
    Edited by: balaji kiran on Apr 14, 2010 7:57 AM

    Hi,
    Could you explain how you did it?
    -Thanks

  • Function Module Extractor with Internal Table

    Hi All,
    I have a need to extract records from a complex SQL Statements, so I will be using different SQL Statements and merging the results in to a single internal table. In the function modules what will happen if I do not use cursor WITH HOLD option, (I know it maintains the cursor position) and what if I directly load into E_T_DATA  from my internal table. How this will affect the datapackage size?
    In the future I will have records beyond 1 million and I am concerned to send all the 1 million record in one package rather than multiple packages during extraction.
    Please give a solution if you have come acroos this kind of situation with your development.
    Thanks,
    Alex.

    Alex,
    I do not see why the complexity of ABAP statements should make you change the data processing logic proposed by SAP by way of the sample Function module.  
    It appears to me that you are changing something knowing fully well its implications and then trying to find a solution for it.
    Good Luck!
    Mathew.

  • How to use function module together with tables in Crystal Report?

    Dear all expert,
    I have the following situation where I need to use a function module in my crystal report, But how can I link the FM with the tables so that I can pass out some value from the FM to the report?
    Thank You.

    Hi,
    Hope the following helps..
    1)
    LOOP AT IT_OUTPUT.
    Call the function module to get the tracking number and store the output in the
    variable V_TRACKINGNO.
      IT_OUTPUT-TRACKING_NO = V_TRACKINGNO.
      MODIFY IT_OUTPUT TRANSPORTING TRACKING_NO.
    ENDLOOP.
    2) Date conversion
    DATA: V_CHAR(10) VALUE '2006.11.17'.
    DATA: V_DATE       TYPE SYDATUM.
    CONCATENATE V_CHAR(4) V_CHAR5(2) V_CHAR8(2) INTO V_DATE.
    WRITE: V_DATE TO V_CHAR MM/DD/YYYY.
    WRITE: / 'MM/DD/YYY Format - ',  V_CHAR.
    Please make sure to reward points for helpful answers..
    Thanks,
    Naren

  • Function Module Extractor with Delta Functionality

    Hi Friends,
         I have to extract the entire data of CDPOS table in R/3 , as its a cluster table I am unable to build a view, I am planning to go for FM extraction, Could someone help me as how to build it with Delta Functionality.
    I think I need to develop the Datasource, with Extract Structure,( Do I need to create a Structure in SE11)  Please help me out .
    Thanks,
    Krish

    Hi,
    you can either use an existing structure or else create one on your own. (SE11).
    The DeltaHandlig fairly easy.
    When having finished the extractor (FunctionModule, Structur and DatasSource), go to the "generic Delta" button and select the relevant field.
    The Generic Delta and its DeltaPointer is managed within the DeltaQueue (RSA7) and works more or less like a selection. Don't think too hard about it in your function module except taht you need to select by this field in your FM.
    Did that come clear?
    hth
    Cheers
    Sven

  • Copying Function Modules

    Hi there, newbie ABAP er here,
    I want to reset the SENDER value in FM SO_NEW_DOCUMENT_ATT_SEND_API1 from SPACE to a valid non-reply email address. Obviously I dont want to alter the Function module so I made a Z copy in my ZDEV package -> Function group -> Function module.
    Seeing as the original FM was in Function group SOI1 I'm getting an error as various statements in the FM are tripping out as they are macros within SOI1 and probably cant be seen.
    Can anyone advise the right way of cracking this?

    Hi,
    I understand you do not have issues in creating the Function group,
    but associating the z copy to the Z Function group is the problem.
    Try this:
    1)  Take SO NEWDOCUMENT_ATT_SEND_API1  in se37, instead of se80.
    Copy the FM, and make all neccesary code changes.
    2) Now go back to SE80 and take your z Function group make sure the z Function module listed below it.
    If not, try Goto->Update Navigation Index
    3) Check the Top include of the Original Function group to find the include that uses the macros.
    When you copy the function module alone, the entries in the associated Top include of the FG needn't be copied.
    Include what you have found in your Function group's Top Include.
    3) Now active the entire Function group.
    = Or else (not recommended though) =
    1) Create a z copy of the function Group
    The FM, also gets copied as Z
    2) Make neccesary changes and activate!
    Hope this helps!!
    Cheers,
    Remi

  • Using Function module HTTP_POST with SSL anonymous

    Does anybody know how I can use the function module HTTP_POST called from ABAP  but to use SSL communication using the anonymous client.
    I think by default it uses the DEFAULT standard client for communication.
    Is there anyway that the HTTP_POST function module can use a type 'G' connection in SM59.
    I have tried to use the newer cl_http_client but for some reason the server I'm connecting to does not like the HTTP_POST that is sent via this mechanism. The only difference I can see is that the header fields i set using  cl_http_client come out in lowercase.
    content-type: application/x-www-form-urlencoded; charset="UTF-8"
    content-length: 288
    Whereas using HTTP_POST I can define the header fields exactly how they should be displayed e.g.
    Content-type: application/x-www-form-urlencoded; charset="UTF-8"
    Content-length: 288
    Does anybody know how to rectify this
    thanks,

    Hi Agasti,
    Use class CL_HTTP_CLIENT. there is a method SET_HEADER_FIELD , u can use POST in that.
    It will be something like below:
    data: client type ref to if_http_client.
    ur code to call the webservice API (method CREATE or CREATE_BY_URL
    CALL METHOD client->request->set_header_field
    EXPORTING
    name = '~request_method'
    value = 'POST'.
    It will work.
    cheers,
    Hema.

  • Dynamic Function Module call with table parameter?

    Hi All,
    I'm trying to call FMs dynamically with PARAMETER-TABLE. These FMs are mainly about searching data from inputs and returning internal table as outputs. I managed to pass data into import parameters as query conditions, but still failed to set tables parameter. The code is like below, could you please help me check what's the problem? Thank you very much!!
    data: lv_val type RS38L_TYP value 'ls_service_para-fmparam'.
    data: lt_interface TYPE rsfbintfv,
               ls_import_para TYPE rsfbpara,
               ptab TYPE abap_func_parmbind_tab,
               ptab_line TYPE abap_func_parmbind,
               ref_wa type ref to data.
    Field-symbols: <fs> type any,
    CALL METHOD cl_fb_function_utility=>meth_get_interface
           EXPORTING
             im_name             = LV_FM          "FM name
           IMPORTING
             ex_interface        = lt_interface
           EXCEPTIONS
             error_occured       = 1
             object_not_existing = 2
             OTHERS              = 3.
    ***loop IMPORT parameters and fill in data from lt_params***
    loop at  lt_interface-import into ls_import_para.
         read table lt_params into ls_param with key key = ls_import_para-parameter.  "check if exists query value
        if sy-subrc = 0 and ls_param-value is not initial.
              assign (lv_val) to <fs>.
               <fs> = ls_param-value.
              create data ref_wa type (ls_import_para-STRUCTURE).
              assign ref_wa->* to <fs2>.
               <fs2> = <fs>.  UNASSIGN: <fs>,<fs2>.
               ptab_line-name = ls_import_para-PARAMETER.
               ptab_line-value = ref_wa.
               ptab_line-kind = abap_func_exporting.
              insert ptab_line into table ptab.
         endif.
    endloop.
    ***loop at TABLE parameters to retrieve data from FM***
    loop at lt_interface-TABLES into ls_import_para.
         create data ref_wa type (ls_import_para-STRUCTURE).
          ptab_line-tables_wa = ref_wa.     "set data type
          ptab_line-name = ls_import_para-PARAMETER.
          ptab_line-kind = abap_func_tables.
         insert ptab_line into table ptab. "if commented, no exception occurs,but I cannot get any dataset.
    endloop.
    CALL FUNCTION LV_FM PARAMETER-TABLE ptab.
    if I execute the code, when there has TABLES parameter defined in the FM, I get CX_SY_DYN_CALL_PARAM_MISSING exception with runtime error DATREF_NOT_ASSIGNED. But in debug mode, as shown in the screen shot attached, I did see the field TABLES_WA has correct type. So maybe I misunderstand the usage of PARAMETER-TABLE. Does anyone has experience on it?
    Best Regards,
    Jeff

    Hi Rama,
    Yes, I'm not passing value to the table parameter, but that parameter is where I want to retrieve data from FM, not pass value to, so I don't assign any value to ptab_line-value for that parameter.
    BTW, I just did some test to pass value to the parameter using the following code and still got CALL_FUNCTION_PARM_MISSING exception:
    FM: ZLEAD_CONTACT
    parameters:
    IMPORT:  I_PARTNER TYPE BUT000-PARTNER mandatory
    TABLES: OT_CONT LIKE ZLEAD_INFO_S optional (here ZLEAD_INFO_S is a flat structure)
    ptab_line-name = ls_import_para-PARAMETER.
    ptab_line-kind = abap_func_tables.
    create data ref_type type table of (ls_import_para-STRUCTURE).
    ptab_line-tables_wa = ref_wa.
    ptab_line-value = ref_type.
    The detail of ptab:
    VALUE
    TABLES_WA
    KIND
    NAME
    ->2000000025
    {A:initial}
    10
    2000000025
    ->Standard Table[0x10(588)]
    ->Structure: flat & not charlike
    30
    OT_CONT
    And the same error if I set parameter using below code:
    create data ref_wa type RS38L_TYP.
    assign ref_wa->* to <fs>.
    <fs> = ls_import_para-STRUCTURE.
    ptab_line-tables_wa = ref_wa.
    The detail of ptab:
    VALUE
    TABLES_WA
    KIND
    NAME
    ->2000000025
    {A:initial}
    10
    2000000025
    ->Standard Table[0x10(588)]
    ->ZLEAD_INFO_S
    30
    OT_CONT
    Regards,
    Jeff

  • R/3 Master Data Extraction Using Function Module

    Hi Experts,
       Could you please let me know why & How (Detail procedure) to extract R/3 master data using function module.
      My team manager asked me to extract master data from R/3 for 3 more attributes of info object '0material' which is already defined as data target.
    I would like to know why they are extracting data using function module
    Thanks

    The steps for  creating extractor using Function Module. I
    1. Create new Function group (if you have already not done so) in Se80
    2. Copy Function module "RSAX_BIW_GET_DATA_SIMPLE" with suitable name.
    3. Change the code that populate data.
    Following table may give you the guideline for parameters.
    Parameter Description
    I_REQUNR (import) BW provides this request identifier. It is a system-generated identifier in the form REQU_XXXXXX. BW uses this same identifier in all function module calls that relate to a single load.
    I_DSOURCE (import) The name of the generic extractor
    I_MAXSIZE (import) The maximum number of records that BW expects to be in each data packet
    I_INITFLAG (import) A Boolean flag that indicates if this is the initialization (first) call to the function module
    I_READ_ONLY (import) A test flag not needed in most extraction scenarios
    I_T_SELECT (table) This table holds any selections from the BW InfoPackage. The function module should examine these selections and only return data that matches the selections.
    I_T_FIELD (table) This table holds the fields that BW requests
    E_T_DATA (table) The function module fills this table with data records. These records then return to BW as data packets. This table has the same structure as the extract structure defined in the generic DataSource.
    NO_MORE_DATA (exception) The function module raises this exception when no more data is available
    ERROR_PASSED_TO_MESS_HANDLER (exception) The function module raises this exception if an error occurred during the extraction. It alerts BW to check for error logs.
    Change following code to put the selection fields
    Select ranges
    RANGES: L_R_CARRID FOR SFLIGHT-CARRID,
    L_R_CONNID FOR SFLIGHT-CONNID.
    Change following to populate data
    OPEN CURSOR WITH HOLD S_CURSOR FOR
    SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
    WHERE CARRID IN L_R_CARRID AND
    CONNID IN L_R_CONNID.
    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.
    below links
    Re: functionmodule
    Re: FM for G. extractor
    ***Assign points if it helps.**
    Regards
    CSM Reddy

Maybe you are looking for

  • Need help in design the scenario sending data to web service

    Hello All, I need to send data to web service and get the response back. i want to use HTTP to soap Scenario.Please let me know the necessary steps in the scenario. Thanks and Regards, Chinna

  • Is there any way to create time-sensitive deactivation of an .exe for Captivate 4?

    Hey there,   I've long-distance customers that want to preview the eLearning content before they accept anything; however, the company doesn't want any these files floating around.  I'm looking to restrict access to the file after a certain amount of

  • Creative Zen Xtra Firmware Upgrade Problems v1

    While trying to upgrade the firmware on my Creative Nomad Jukebox Zen Xtra, there was a problem with the upgrade. I'm now stuck in rescue mode v.3. When I plug the MP3 player into the computer, Windows will recognize it and asks me what to do. I exit

  • Internal Load Balancing

    I'm after a definitive answer as to whether you can do internal load balancing with Roles as its a highly desirable feature but also i've seen conflicting information on it. For instance the following Azure blog article suggests you can but I can't f

  • Tutorial assistance with Crush Creek Winery example

    Hello, I stepped my way through the CCS tutorial using the Crush Creek Winery tutorial from the latest newsletter.  My problem begins with formatting the right column, in live view, the box of text is just below the header, but when I view in my brow