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
Similar Messages
-
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
MartinHello 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. -
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 -
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 ?
ThanksHi,
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 -
Problem in copying a standard function module!
Hello there,
I need to copy the FM, RS_TABLE_LIST_DISPLAY, to a Y function Module. But I am not able to copy it as a single FM, I have copy all the FMs in that function group i.e. SETB.
I, then copied that standard function group SETB. I am getting a strange error message while activating the copied version. The error which I am getting is:
The parameter "INTTAB" of the global interface has already been defined outside the function.
INITTAB is some defined internal table.
Also the include in which this error is getting appeared is LY.....$07 something. I have tried to many times. Not able to resolve the issue.
Please help!
Regards,
Ganesh KhumseHi There,
Thanks for your reply. I have not defined anything in the copied function module. I just copied and tried to activate it, error occurred.
Thanks & Regards,
Ganesh Khumse -
Copy Standard Functional Module
In standard FM, DETERMINE_TXJCD_EXTERNALLY. City and county are optional. What effort it takes to makes this fields as mandatory.
Please let me know.
Can I copy this Standard FM to custom funtional module and just say check the check box in export parameters.
Please let me know. Thank you.
Regards
MadhuHi,
My suggestion will be
Write a wrapper function module of DETERMINE_TXJCD_EXTERNALLY with the same fields
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(COUNTRY) LIKE TTX_TXJCD-COUNTRY
*" VALUE(REGION) LIKE TTX_TXJCD-REGION
*" VALUE(CITY) LIKE TTX_TXJCD-CITY OPTIONAL
*" VALUE(COUNTY) LIKE TTX_TXJCD-COUNTY OPTIONAL
*" VALUE(ZIPCODE) LIKE TTX_TXJCD-ZIPCODE
*" VALUE(PROCEDURE) LIKE TTX_TXJCD-PROCEDURE OPTIONAL
*" VALUE(ID_TAX_EXT) LIKE TTX_TXJCD-ID_TAX_EXT OPTIONAL
*" VALUE(NO_DIALOG) LIKE TTX_TXJCD-ID_TAX_EXT OPTIONAL
*" EXPORTING
*" VALUE(TXJCD) LIKE TTX_TXJCD-TXJCD
*" VALUE(CITY) LIKE TTX_TXJCD-CITY
*" VALUE(COUNTY) LIKE TTX_TXJCD-COUNTY
*" EXCEPTIONS
*" TXJCD_NOT_FOUND
*" TXJCD_NOT_UNIQUE_IN_NO_DIALOG
*" EXTERNAL_TXJCD_NOT_REQUIRED
*" TXJCD_PROCESSING_NOT_REQUIRED
*" RFCDEST_NOT_FOUND
and within that wrapper function module make fields mandatory. This will reduce your effort during patches updattion. otherwise if you are copying the standard function module, then after applying the patches to original function module you need to redo the changes mannually in to your copied function module
a® -
Hi Friends ,
How to copy r/3 functiom module to bw . If it is not possible how to create function module in bw.
Thanks,
DeviHi devi,
we cant copy function module(FM) in bw, we will create FM in R/3 side using t-code: RSO2. here we will create FM, by clicking extract from FM(right side it appears),give the short description and for creating FM WE NEED FUNCTION GROUP, it is on top of the menu bar function group appears. after creating here, U WILL able to create FM . basically u will write some coding here . after that we will extract from here to bw... means we replicate the data source. the copy of meta data only comes. all this is done in generic extraction( we call it).
i hope it clarifies your doubt,
plz assign pnts.
Regards,
Neelima. -
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, PankajRich'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 -
Generic DataSource using function module
Hello experts,
I created a generic dataSource using copy of function module RSAX_BIW_GET_DATA. It is syntactilly correct. But when I execute and debug associated generic DataSource in RSA3, this generic function module could not identify DataSource(i_isource) and update mode(i_updmode).
Could you please answer what went wrong?
I also created by using copy function module RSAX_BIW_GET_DATA_SIMPLE. I did not find above such problem. The generic DataSource is executed fine in this case.
Thanks in advance,
Zak.http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c062a3a8-f44c-2c10-ccb8-9b88fbdcb008
/people/p.renjithkumar/blog/2009/10/07/generic-datasource-creation-using-function-module -
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
ThanksThe 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 -
Change the standard function module
The standard function module FI_DUPLICATE_INVOICE_CHECK will check whether an invoice/credit memo has already been posted where all of the following attributes match: Company code, vendor, currency, document date, reference number (If a reference number was entered in the current invoice/credit memo). If no reference number was entered in the current invoice/credit memo the system checks whether an invoice/credit memo has already been posted where all of the following attributes match: Company code, vendor, currency, document date, amount in document currency
my requirement is
The above functionality described in the short description doesnt provide for the need within AP to check on duplicate invoices. The functionality in FI differs from the functionaltiy provided in LIV and therefor needs to be aligned. The risk of posting duplicate invoice entry is eminent since the check is dependent on all parameters. For a good duplicate invoice number check we need FI to check on Vendor and invoice reference within the same fiscal year. To modify rules, copy FI_DUPLICATE_INVOICE_CHECK, modify the checks and then call the copied function module from FB60. The remaining field check in the standard function module should be deleted.
how to achive this. i didn't understand the requirement .Please give me any suggestion for this.Hi ,
I think what you are saying is the functionality given in Logistics Invoice verification is not suitable for FI Invoice.
If I am correct , then there is a configuration setting in SPRO where you set check for duplicate invoice. It has just three checkboxes
a) Company code b) Reference number c) Invoice date
so I think this configuration setting will suffice your requirement.
Please let me know.
Amit -
How to copy the standarad function module
hi,
i wants to copy the standard function module which are not rfc enabled. for that one i copied standard one and modified the attributes to rfc enabled. but it was giving the errors "You can only use LIKE and TYPE to specify types in RFC",
how can i solve my problem. pls help me.Hi mukka,
1. In that FM, while after copying to Z,
2. there is a second parameter in IMPORT
WITH_TEXT
3. in the column of Associated type,
it will be blank.
give some data element like CHAR30
and also give type
4. Then it will not give the error.
regards,
amit m. -
Client copy Locked function module
HI,
I'm trying to make a client from client 400 to 420.
The problem is that the function module is locked by the current user (the same running the client copy); Then when It can't deletes the FM it states that it already exists:
"G_GLDB_POSTING_A already exists (include LGIVAU01)"
Afterwards the job gets cancelled due to a system exception ERROR_MESSAGE
The weird part is that it just happens for this client 420. There is also a copy from 400 to 410 and it works without a problem.
Any help would be greatly appreciated.Hi,
You can check the client copy lock from SCC4 also, but it really matters if your client copy finished or not.
If you still see the client copy lock there then it seems your client copy is not finished properly. Try to login your new client 420 and start deletion using SCC5 and after that you can start/schedule new client copy during weekends.
Regards,
Manish -
Function module to copy INVOIC IDOC
One of our customers use the IDOC message type INVOIC. When the IDOC are received and the proces has been started, we will like to make a copy of the IDOC with the status code 70.
I know this functionality exist when we change the segment data using the transaction code BD87, and I have debugged this transaction, but the "copy" functionality are developed in the program SAPLEDI5 and not in a function module.
I am looking for a function module to handle this functionality. Hope you can help me.
Per LarsenTo make a copy of idoc message type, you simply have to find the linked Function module of the Idoc. So for INVOIC, there would be a linked Function Module , you can copy the interface of the Function Module and build your own custom Function Module (Z function module) to attach it to the message type.
So the steps to your problem would be:
1. Copy the FM to attached mesaage type into a Z function module.
2. Write the functionality you require in your Z function module.
3. Attach the message type/ idoc type to this function module. The systematic steps to this can be simply carried out in the Transaction WEDI which is an area menu for EDI/IDOC . Depending on whether it is inbound/outbound, you can follow the steps.
Cheers!
Disha
Maybe you are looking for
-
How to know whether database(oracle) is up and running at OS level
how to know whether database(oracle) is up and running at OS level...!!!
-
Is it possible to change the compiler that is built into Sun Creator?
Is it possible to change the compiler that is built into Sun Creator? I would like to compile my project to run under the JNI. I have tried to use the command line to run the javah -jni filenames but I always get errors and my assumption is that I ne
-
Folders on Desktop move when file dragged to them
With Firefox 3 we now see an annoying behaviour in the Finder (MacOS 10.4.11.) When the Desktop has "Keep arranged by..." turned off (necessary due to the Finder's slow refresh in MacOSX), if we drag an image from Firefox onto the closed folder the f
-
Leopard Drop in CPU missing Windows Drivers
Hi there, I have a Leopard Drop-in DVD that was posted out to me after I bought my MacbookPro 17" with Tiger (in the eligible time period) a couple of years ago now. Thing is, when I try to do the whole Windows thing, Boot Camp runs and partitions, e
-
Rapid Install - RapidWiz.cmd
Hi All, I started to install Oracle Financials 11i (11.5.6.) on to a Server with two drives. I forgot to assign some of the files to the second drive. As such, the installation failed due to insufficient space. I de-installed everything, and tried ag