I'm very new tp SAP ABAP, how to create a function module..V.URGENT
hi folks,
I'm very new to sap abap.
I want to create a function module.
the following is my requirement.
by passing(eporting parameters to funtion module from pgm point of view) a field, i want to get(importing parameters from the funtion module, from pgm point of view) some 7 fields(of various tables).
please also tell me how can code an inner join for tables 5 tables(a,b,c,d,e). i'm joining a on b, b on c, c on d,the problem here is that i can not join d on e as there are no common fields in d and e.
can i join e and c or b, there are no common fields even in a and e.
please tell me the solution as soon as possible, this very important and urgent deliverable.
thanks in advance
Here is link for creating function modules
<a href="http://help.sap.com/saphelp_47x200/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/frameset.htm">Creating Function Modules</a>
Regds
Manohar
Similar Messages
-
How to Create the Function Module Exit
Hi,
How to Create the Function Module Exit. Please tell me the step by step procedure.Hi,
Check this link for how to create the function module exit..
http://sap.niraj.tripod.com/id62.html
Thanks
naren -
How to create RFC function module and how to call this function module
Hi,
i want to know step for creating RFC function module and then How to use this function module from some other sap system.
Thnaks,
jigarJigar,
To implement a remote function module in ABAP, perform the following steps:
Register the module as remotely callable in the RFC server system.
In the function module Administration screen (transaction code SE37), set the field Can be called via REMOTE CALL. Registering a module as remote causes an RFC stub to be generated for it.
Write the code for the function module.
Create the destinations.....................
Displaying, Maintaining and Testing Destinations
To display, create or modify destinations, choose Tools ® Administration ® Administration ® Network ® RFC destinations or enter transaction code SM59.
Remote Destinations are stored in table RFCDES. The RFCDES table describes logical destinations for remote function calls.
It is not possible to maintain the RFCDES table directly.
You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® AcceleratedSAP ® Customizing ® Execute Project ® SAP Reference IMG.
In the Implementation Guide, expand the following hierarchy structure:
Basis
Application Link Enabling (ALE)
Sending and Receiving Systems
Systems in Network
Define Target Systems for RFC Calls
Displaying Destinations
The initial screen for this transaction displays a tree:
Different connection types (i.e. partner systems or programs) are possible. For further information, see Types of Destinations.
To display all information for a given destination, double-click it, or place the cursor on it and press F2 .
To search for a destination, press the Find button and specify your selection. You get a list of all entries matching your selection. Place the cursor on the one you want, and press F2 or simply double-click the destination. All information for the given entry appears.
Creating Destinations
On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
All available connection types are explained in Types of Destinations.
To create a new RFC destination, press the Create button. A new screen is displayed with empty fields for you to fill in.
If you want to create a new destination
As you create a remote destination, you can specify a particular application server or a group of servers for a balanced distribution of system load.
For details of the destination parameters, see Entering Destination Parameters.
Changing Existing Destinations
On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
You can display all information for a given destination by double-clicking it or pressing F2 on it.
To change an existing destination, double-click it, or place the cursor on it and press the Change button.
For details of the destination parameters, see Entering Destination Parameters.
Testing Destinations
To test a destination, choose the appropriate function from the Test menu.
Connection (also available via the Test connection pushbutton)
Authorization (checks logon data)
Local network (provides a list of application servers)
You can use the CALL FUNCTION statement to call remote functions, just as you would call local function modules. However, you must include an additional DESTINATION clause to define where the function should run:
CALL FUNCTION RemoteFunction
DESTINATION Dest
EXPORTING
f1 =...
f2 =...
IMPORTING
f3 =...
TABLES
t1 =...
EXCEPTIONS......
The field Dest can be either a literal or a variable: its value is a logical destination (for example, "hw1071_53") known to the local SAP System. Logical destinations are defined in the RFCDES table (or the TRFCD table in R/2 Systems) via transaction sm59 or the following menu path: Tools ® Administration, Administration ® Network ® RFC destinations. You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® Customizing ® Enterprise IMG. In the Implementation Guide, you can then choose Cross-application components ® ALE ® Communication ® Define RFC destination.
The remote function call concept, for example, allows you to access a function module in an R/2 System from an ABAP program in an R/3 System. If you want to read a customer record from your R/2 Systems database, create a remotely callable function module in the R/2 environment which retrieves customer records. Call this function from your R/3 System using a remote function call and listing the destination for the target R/2 System:
Pls. reward if useful -
How to create ENQUEUE function module for s567 table
Hi Experts,
Anyone Plz tell the steps how to create a ENQUEUE function module for the table s567.
Its somewht urgent, plz help me.
<REMOVED BY MODERATOR>
Mohana
Edited by: Alvaro Tejada Galindo on Mar 10, 2008 4:21 PMHi,
You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
Technicaly:
When you create a lock object System automatically creat two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
You have to use these function module in your program.
Hope this will give a basic idea.
Regards
Sudheer -
How to Create a Function module z_create and to track the error records?
I want to create a function module z_create which will insert the data from the internal tables gt_model_master and gt_model into the corresponding database custom tables y_model_master.
Secondly if any error is encountered during the above updation, then how to track those error records ?HI,
check the sy-subrc ,if it is zero the insertion is success,otherwise use
message class.
if sy-subrc ne 0.
message e052(zmessage).
endif.
Edited by: rakesh dhudipala on Feb 12, 2008 2:33 PM
Edited by: rakesh dhudipala on Feb 12, 2008 2:33 PM -
How two create UPDATE FUNCTION MODULE
Hi,
I have 2 tables to update one after the other...
I have geard it is advisable to use update function module for this..
can any1 tell me how to create and work with update function modules...
Answers will be rewarded....Abhay,
How an update function module works is, the execution of the FM is delayed to until when a COMMIT WORK statement is executed.
Hence if you have the data available for updating the two DB tables at the time of calling the FM, you can pass the tables to the same FM and program the DB update for both in the same FM.
However the COMMIT WORK should be outside the FM further down in the calling program.
This link is very good and easy to follow
http://help.sap.com/saphelp_erp2005vp/helpdata/en/41/7af4daa79e11d1950f0000e82de14a/frameset.htm
Hope it helps
Aditya[url=http://help.sap.com/saphelp_erp2005vp/helpdata/en/41/7af4daa79e11d1950f0000e82de14a/frameset.htm]
Message was edited by:
Aditya -
HOW to create a function module ..... in abap
pls lemme know ............the steps and procedure in creating a function module
hi GURU,
To Create Function Module first you need to create Function Group and Activate it.
First go to SE37 then
1. Goto>Function Groups>Create Group.
Here you need to give Group name and Short Text of group.
2. After Creating Function Group again:
Goto>Function Groups>Change Group.
Enter your Function Group name and press enter.
a dialog box will appear where you can see its status is inactive.
So, press <b>Main Program</b> Button and activate your function group.
NOW you Function Group is activated and and you can create Function Module in it.
Now Enter your Function Module Name and press create then
give your Function Group name in respective place and press enter.
Now you can give your Import/Export parameters and and if you want to use TABLES give it in TABLE section only not in Import/Export Parameters.
Then Write Logic in Source Code Tab and Activate it.
if you have any qury regarding it Pls let me know.
Reward if Useful.
Sachin. -
How to create a Function Module
Hi
Please tell me the procedure to create a function module.
Thanks in advance,
PriyaHi Srinivas,
In order to create a function module firstly you need to assign it to a function group.
In order to create function group goto t-code se37.
Choose Goto->Function groups-> Create group .
Give the function group name.
Then come back to se37 type in the name of your FM and then press <b>CREATE</b> button. -
How can create a function module for currency and quantity fields
hi,
i want to create a function module with some fields.when i activated it give some errors for
netpr,menge,wemng fields(currency, quantity fields).error is it asks for reference fields.
please send me solution for it.
sreenu.Hi Sreenu,
While creating CURRENCY/QUANTITY fields in the DataBase Table, you have to enter a REFERENCE TABLE and a REFERENCE FIELD to the field.
For that, after entering the field name and the data type in the correcponding columns, you have to place the cursor on the data type of the required field and click the CURRENCY/QUANTITY FIELDS tab. You will find two columns called REFERENCE TABLE and a REFERENCE FIELD.
you have to enter a reference table in which a currency/quantity field is used and a reference field which is a currency/quantity field in that table.
For Example, below is the table details.
FIELD DATATYPE LENGTH DEC.PLACES REF.TABLE REF.FIELD
1.SNO CHAR 5
2.AMOUNT CURR 10 2 T001 WAERS
3.NOS QUAN 5 KNA1 /VSO/R_PAL_UL
Here Field 2(AMOUNT) is a CURR field whose Ref. Table is T001 and Ref. Field is WAERS and Field 3(NOS) is a QUAN field whose Ref. Table is KNA1 and Ref. Field is /VSO/R_PAL_UL.
Hope this will help you.
Regards,
Vaitheeswaran -
How to create the funtion module with step by step
friends can u help me regarding how to create the function module very urgent,
regards
bhavaniTo create a function module, you first need to create a Function Group which will keep all the function module of same functionality.
To create a Function Group, go to SE80->Click on Workbench-Edit Object->Function Group Tab->Enter Function Group name-> Click Create.
To create a Function Module:
Go to T.Code SE37->Enter the Function name->Enter Function Group name n Short Des.-> Here you need to define Import, Export parameters with the condition. Also you can write your code in source code tab.
check this link
Converting seconds values
check the FM code. if you don't have this FM code, create it in SE37 and make use of it.
FM MONI_TIME_CONVERT
FUNCTION MONI_TIME_CONVERT.
""Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(LD_DURATION) TYPE SY-TABIX
*" EXPORTING
*" REFERENCE(LT_OUTPUT_DURATION) TYPE SWL_PM_CVH-DURATION
DATA: LD_HOUR(4) TYPE N. "
DATA: LD_MIN(4) TYPE N. "
DATA: LD_SEC(4) TYPE N. "
DATA: LD_VALUE2(2) TYPE N.
DATA: LD_VALUE3(3) TYPE N.
DATA: LD_VALUE4(4) TYPE N.
DATA: SAVE_DURATION LIKE SY-TABIX.
data: ld_minus(1).
SAVE_DURATION = LD_DURATION.
if ld_duration < 0.
save_duration = save_duration * ( -1 ).
ld_minus = true.
endif.
CLEAR LT_OUTPUT_DURATION.
IF SAVE_DURATION NE 0.
LD_HOUR = SAVE_DURATION DIV 3600.
save_duration = save_duration - ld_hour * 3600.
LD_MIN = SAVE_DURATION DIV 60.
save_duration = save_duration - ld_min * 60.
LD_SEC = SAVE_DURATION.
IF LD_HOUR LE 100.
LD_VALUE2 = LD_HOUR.
WRITE LD_VALUE2 TO LT_OUTPUT_DURATION+3(2).
ELSEIF LD_HOUR LE 1000.
LD_VALUE3 = LD_HOUR.
WRITE LD_VALUE3 TO LT_OUTPUT_DURATION+2(3).
ELSE.
LD_VALUE4 = LD_HOUR.
WRITE LD_VALUE4 TO LT_OUTPUT_DURATION(4).
ENDIF.
WRITE ':' TO LT_OUTPUT_DURATION+5.
LD_VALUE2 = LD_MIN.
WRITE LD_VALUE2 TO LT_OUTPUT_DURATION+6(2).
WRITE ':' TO LT_OUTPUT_DURATION+8.
LD_VALUE2 = LD_SEC.
WRITE LD_VALUE2 TO LT_OUTPUT_DURATION+9(2).
LT_OUTPUT_DURATION = LT_OUTPUT_DURATION+1.
if ld_minus = true.
write '-' to lt_output_duration+1(1).
endif.
ELSE.
job running or aborted
ENDIF.
ENDFUNCTION.
Eg:2
Use the following procedure to create a function module
1.From the ABAP/4 Development Workbench screen, press the Function Library button on the Application toolbar.
2.Type the name of your function module in the Function Module field. The name must begin with Y_ or Z_.
3.Press the Create button. The Function Module Create: Administration screen is shown
4.Type the name of a function group in the Function Group field. The function group name must be four characters long and must begin with Y or Z.
5.Type an S in the Application field. This field is used to indicate which function area uses the function module. Our functionality is not used by any functional area, it is simply an example, so any choice will do. (S indicates that the function module contains functionality needed by Basis.)
6.Type a description of the function module in the Short Text field. The contents of this field are seen when displaying a list of function modules.
Press the Save button on the Application toolbar.
7.If the function group does not already exist, a pop-up informs you of that fact and asks you if you want to create it. Press the Yes button to create the function group. The Create Function Group dialog box appears. Type a description in the Short Text field and press the Save button. The Create Object Catalog Entry screen appears. Press the Local Object button. You are returned to the Function Module Change: Administration screen.
8.Press the Source Code button on the Application toolbar. The Function Module Edit screen is displayed.
9.Type the source code for your function module. Do not change the system-generated comment lines under any circumstances! Your function module might fail to operate if you do.
10.Press the Save button on the Application toolbar. The message Program xxxxx saved appears in the status bar at the bottom of the window.
11.Press the Back button on the Application toolbar. You are returned to the Function Library Initial screen.
12.If you want to define import or export parameters, select the Import/Export Parameter Interface radio button. Press the Change pushbutton. You are shown the Import/Export Parameters screen (refer to Figure 19.6). Type the names of your parameters in the first column and enter any other desired characteristics for each parameter. When you are finished, press the Save button and then the Back button.
13.Finally, to activate your function module, press the Activate button on the Application toolbar of the Function Library Initial Screen.
http://www.erpgenie.com/abap/bapi/example.htm -
How to log in to the new installed SAP ABAP instance ?
Dear Experts,
In SAP ERP 2005 installation,
I have done central system installation, Now I need to perform postinstallation steps,
Could you please tell me, how to log in to the new installed SAP ABAP instance and do the post installation?
Regards,
Madhavan KHi,
Check the list of post installation steps:
http://www.saptechies.com/post-installation-steps-for-ecc-60/
From my point of view basic post installation steps are:
- Installing SAP License (from http://service.sap.com/licensekeys)
- Setup TMS (STMS)
- Import profiles (RZ10)
- Client Copy (SCC*)
- Create users (SU01)
However further many steps are required as per your requirements. Cehck the link for more detailed steps.
Regards,
Srikishan -
How to develope custom function modules in SAP R/3 system to maintain c...
How to develope custom function modules in SAP R/3 system to maintain cross
referencing tables for sales order number.Hi Raja,
Steps to crate FM..
Follow these steps..
Go to the T: code SE37
First You Create Function Group
On That u specify
Function Group Name..............
Short Text..............................
save...
Go to SE 37
Specify the Function Module Name: Eg: Z_Bapi_Materialmaster
Short Text.......
Save...
Next Go to Attributes..
Select Radio button : Remote enabled model
Go to Parameters..
Click Import...
Give Parameter Type Associate type S.t
next Click Export...
Give Parameter Type Associate type S.t
Next Click Tables Button..
Specify tables..
Next click source code button..
Write Source code here..
Eg : Select statements Etc..
Finally we should be select the Radio button Enable remorely
https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=39728
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/bapi%2bstep%2bby%2bstep
Hope this information is useful to you..
Reward points if it is usefulll....
Thanks ,
Satya Kumar.. -
Sap script '' how to create table frame in sap script"""
i have some problem in sap script'' how to create table frame in sap script"""
Hi,
you can use BOX command..
Syntax
/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
Effect: draws a box of the specified size at the specified position.
Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT and FRAME both a measurement and a unit of measurement must be specified. The INTENSITY parameter should be specified as a percentage between 0 and 100.
1. XPOS, YPOS: Upper left corner of the box, relative to the values of the POSITION command.
Default: Values specified in the POSITION command.
The following calculation is performed internally to determine the absolute output position of a box on the page:
X(abs) = XORIGIN + XPOS
Y(abs) = YORIGIN + YPOS
2. WIDTH: Width of the box. Default: WIDTH value of the SIZE command.
3. HEIGHT: Height of the box. Default: HEIGHT value of the SIZE command.
4. FRAME: Thickness of frame.
Default: 0 (no frame).
5. INTENSITY: Grayscale of box contents as % .
Default: 100 (full black)
Measurements: Decimal numbers must be specified as literal values (like ABAP numeric constants) by being enclosed in inverted commas. The period should be used as the decimal point character. See also the examples listed below.
Units of measurement: The following units of measurement may be used:
TW (twip)
PT (point)
IN (inch)
MM (millimeter)
CM (centimeter)
LN (line)
CH (character).
The following conversion factors apply:
1 TW = 1/20 PT
1 PT = 1/72 IN
1 IN = 2.54 CM
1 CM = 10 MM
1 CH = height of a character relative to the CPI specification in the layout set header
1 LN = height of a line relative to the LPI specification in the layout set header
/: BOX FRAME 10 TW
Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
/: BOX INTENSITY 10
Fills the window background with shadowing having a gray scale of 10 %.
/: BOX HEIGHT 0 TW FRAME 10 TW
Draws a horizontal line across the complete top edge of the window.
/: BOX WIDTH 0 TW FRAME 10 TW
Draws a vertical line along the complete height of the left hand edge of the window.
/: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
check the fallowing link also
http://help.sap.com/saphelp_40b/helpdata/en/d1/803293454211d189710000e8322d00/content.htm
Mark the points if u find it useful...
Regards,
Omkar. -
Web dynpro for abap how to create a customize search help in alv column
hi:
Web dynpro for abap how to create a customize search help in alv column and put search help value into alv column?
Are there specific examples ?
thanks!!HI:
I want to created a freely programed help which include date&time,and put help value to alv column.
I have created a freely programed help in web dynpro for abpa application,I refer:
**************** - WebDynpro for ABAP
but have a problem!
If you focus on the the input field in the first row, you get the value help
However if I go to the second row and focus on the same input field in this column, I don't get the value help:
What is a good way to solve similar problems?
thanks -
How to use this function module on abap hr GET_PDSNR_RANGE
how to use this function module on abap hr GET_PDSNR_RANGE
thankx.PASS INETRNAL TABLE WITH SOME DATA TO TABELLE FOR GENERATING PDSNR SEQUENCE
Maybe you are looking for
-
Edited photos not showing up in lightroom
I am using lightroom 3 and photoshop CS5. I recently had to reinstall the programs after a hard drive failure. Prior to the reinstall, photos that I had worked on in photoshop automatically showed up in the LR3 library. I updated to the latest versio
-
Hi, Experts. I'm looking for the table that contains messages used in programs. For example, table having following information would be great! PROGRAM NAME MESSAGE ID MESSAGE NO ZXXXX PO 000 ZXXXX
-
Missing amt.lib.dill
my adobe photoshop cs6 for 64x wont open. it says missing amt.lib.dill file. how do i fix this without having to re-buy the program bc i lost the disk. i already tried troubleshooting for working in earlier versions but that didnt work....i have wind
-
MacBook Air dpc latency problem
My MacBook Air (2x 2.86 GHz, 128 GB SSD) has poor dpc latency values, prohibiting, e.g., recording of DAB (digital audio broadcast). The problem would seem to be caused by the "too slow" USB drivers. I wonder, whether there is a remedy for this avail
-
Can I change TOC button to Menu in Captivate 7?
"TOC" does not translate well. I also want to change the widget TOC symbol at the top of the screen. Can this be done? Thanks for your response. Terracotta