How to give constant data in RFC function module
Hello;
I have created a BAPI which doesnt have any data i want to put some data in that BAPI so tried with constants but it is not working..how put hard code data in function module..when i put the data it gives error stating that 'Function-Pool' should not be the first statement..
Thanks and Regards,
Om.
HI;
Ya I did it but still i am facing the same problem...can u just tel me is this right
DATA: Total TYPE p DECIMALS 3.
CONSTANTS: BEGIN OF sampledata,
CARRID TYPE c LENGTH 5 VALUE 'AA',
SEATSMAX TYPE i value '600',
SEATSOCC TYPE i value '500'.
CONSTANTS end OF sampledata.
Export
CARRID = 'AA'
CURRENCY = 'USD'
SEATSMAX = '600'
SEATSOCC = '500'
Total = 100 * ( seatsocc / seatsmax ).
Similar Messages
-
How to add Test data for a function module
Hi experts,
i want to add test data for a function module . i don't know how to proceed on it . please help me...
with regards,
James...
Valuable answers will be rewarded...Hi,
- Go to SE37 and execute your FM
- Enter the data you want to pass to FM
- Hit 'Save' button. Enter the meaningful name for your test scenario and save. That's it you have saved the test data.
You can also enter some other test data and save that also. In short, you can save multiple test scenario. Also, you can give multiple test scenario a same name and they do not overwrite each other ( but normally you give different name to differentiate them)
Next time you come to execute the FM again, hit the "test data" button and it will show you all the test scenario you have stored before. Select the one you want to use and it will load the data in FM parameters.
Let me know if you need any other information.
Regards,
RS -
BPM scenario to send same file data two RFC function modules
Hi,
Scenario:same file need to send the data to two different RFC functions.
so in this case i need to use two receive steps or only one receive step? beause file should be places in the archive after second rfc triggered.
but this scenario client need to go with BPM only .I am new to BPM.please suggest the steps and process need to follow for this scenario.Hi,
You will have one async receive step to start the BPM from your file interface, 2 synchronous send steps for each RFC, and an async receive step to archive.
Don't use the transformation steps in BPM, as it decreases performance. You can use the same abstract interface for your file format in the send steps, but specify different Send Contexts for the receive steps. In Configuration, use a condition on Context object ProcessStep = Send Context from your BPM, and route to the correct RFC interface, using a mapping from your file to the RFC.
Hope this helps !
kr,
Peter Glas -
How to give the date to the funtction module
Hi.
i want to pass a date from the eban-badat to the function module and the output will be based on this date.
the requirement is like
if the po date .i.e eban-badat is 25th nov 08..then the output b_date should be 1st of november 2008.
that means i want to have the month and year to be same but the date will always be 1st of that month.
please tell me how to do it.
i m doing like:
b_date = it_eban-badat+6(2) .
b_date+4(2) = '01'.
but dont know whether it will work or not.
please explain the correect code.
thanks!Hi Tanisha,
You just pass the value of the date to your variable that by using the offset function you can set the date to the first of the month. For example
b_date = it_eban-badat.
b_date+6(2) = '01'.
assuming that the date in eban-badat is 25th nov 2008, which is stored internally as 20081125.
With the above code, b_date = '20081125'. and when you write b_date+6(2) = '01' the new value in b_date = '20081101' which signifies the 1st of the month.
Regards,
Sachin Dargan. -
How to extract the data by using function module?
hi experts,
what are the steps i have to fallow to extract the data from R/3 by using FUNCTION MODULE.
thanks & regards
venkatHi,
Extracting data from R/3 extract structure thru function modules
You can proceed with create function module using SE37, thereu2019s sample in system RSAX_BIW_GET_DATA_SIMPLE,
You need to know the logic how to populate the structure,
after that RSO2, create datasource specify extract structure and
function module,
activate and replicate to bw.
Chheers
Raj -
Commit work in RFC function module
hi all.
What will happend if i give commit in the RFC function module .
why we need to use BAPI_Commit after updating through BAPI function module.
regards,
MadhaviFirst read some documentation like [SAP LUW|http://help.sap.com/saphelp_bw/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/frameset.htm], [Transactional RFC (tRFC)|http://help.sap.com/saphelp_nwpi71/helpdata/en/22/042578488911d189490000e829fbbd/frameset.htm] or [Transaction Model for Developing BAPIs|http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm]
Regards,
Raymond -
Hi Friends,
Is there any transaction to see all the RFC Function Modules.
How can we identify all the RFC Function Modules in SAP System.
Any Transaction / Report or any Customizing Path
Regards:
SridharhI,
You can get it from TFDIR table and specify mode as 'R'.
Regards,
Nagaraj -
Using RFC Function Module to send data to NON SAP Application
Hi friends,
Please guide me how can I send data from SAP -> Dotnet Applcation using Dotnet Connector through RFC function module from SAP side. In my scenerio, I Run Z transaction to executte RFC function module which create some data to pass to dotnet connector.
Regards,
Rajesh KumarHi,
You can make use of Dotnet connector to read the content of SAP RFC .. (eaiest of all)
The RFC can be executed using connector , and can read the data simultaneously.. u need to code in dotnet for this..
else create a webservice and read it from dot net ..
Regards
Renu Gusain
Edited by: Renu Gusain on Jan 25, 2010 12:55 PM -
How to extract data by using function module in generic extraction please
how to extract data by using function module in generic extraction please give me steps required
Dear Deba,
Generic Extraction via Function Module
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
If the requirement is like extracting data from multiple tables with some complex logic then views cannot be used..so u cna go for FM is used where it can be achieved.
Chk these
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
check the following thread
generic extraction with function module
Generic Extraction with function module
Regards,
Ram. -
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 debug a RFC function module remotely from another R/3 system?
Hi experts,
I have RFC function module in one R/3 system. I am calling this from another R/3 system that is cross apps (Xapps).
This function module is Synchronous.
Is it possible to debug this function module from cross apps?
Can somebody give me the steps?
Thanks & Regards
GopalHi Shree,
Can you explain it bit more?
Do I have to call the function module with "IN BACKGROUND TASK"?
Or is it that I have to just put external breakpoint in the function module?
Please help
Thanks
Gopa -
How to invoke RFC function module from XI interface
Hi all,
I am having one question, How to invoke RFC function module from XI interface.
Please reply me as soon as possible.
Thanks in advance,
RadhikaHi,
To call the RFC in mapping u need to create the RFC lookups...check these links.
How we have to create the lookups?
Check this weblogs with some screenshots on how to achieve this:
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
/people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
lookups in xi
XI Design Guidelines
Re: RFC Lookup API
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
Regards,
Phani -
RFC Function Module Configuration
Hi Experts,
I have created an RFC function module which pushes data from R/3 system to XI. I need to configure this RFC in SM59. I am having XI server details and R/3 server details. Anyone can help me how to configure this and what kind of connection i have to use. so that data is pushed to XI system. we are having a bunch of RFC's in our project. we need to create configuration for all the RFCs.
and what is Program ID?
Please give me the sequence of steps for configuration.my mail id is [email protected]
Points will be awarded for all the answers.
Thanks & Regards,
Poorna.hi poorna,
step 1- first go to the transaction sm59 and here you can
create a destination for R/3 to R/3 server type 3.
step 2- Now give the IP address for the another R/3 system (XI) here
and the system no will be 00 (default).
step 3- press save. now go to the second tab logon/ security
here declared the clind no, language , user name and
password.
step 4- press save and then check the test connection.
Do reward if usefull.
regards,
vijay -
Call RFC Function Module and return 1000 records at a time
I would like to call a Remote Enabled Function Module from a non SAP system. This function module will select data from the database and return it to the calling program.
Suppose there are 100,000 records that need to be returned, but the calling module would like the data in chunks of 1000 records. Therefore the calling program would call the FM 100 times.
How do I code the function module to know on each subsequent call to grab the next chunk of 1000 records?
Let me know if additional information is needed.
Thanks,
AaronHello,
Here is how you can go for this issue:
1. Create one RFC function module with following parameter. These parameters are with respective of chunking logic.
Import: Package Size
Export: Total number of records
Changing: chunk count
Implement following logic:
1. First of you need to know how many chunks you need to fetch for that get the count of total number of records. This is one
time activity so you better maintain one flag import parameter will be set to 'X' only first call.
2. Get the number of chunk using total number of records / chunk size for e.g. 1000 / 100 so chunk count = 10.
3. Define internal chunk counter in function module which will be used to locate the correct chunk depending on the chunk
counter value sent from calling program.
4. Send first call with package size 100 and chunk count = 1, execute select statement and increment internal
chunk count check if chunk count = internal chunk count in current case chunk count = 1 so exit select statement and return
with first chunk.
5. Send second call with package size 100 and chunk count = 2. Execute select statement and check chunk count with internal
chunk counter, in current case it will be 1 so skip that data and go for next chunk of 100 records increment internal chunk
counter. In this case it will match with external chunk count = 2. load output table with that data and return to calling program.
6. Repeat step 4 until you reach last chunk.
You need to use SELECT...ENDSELECT with PACKAGE SIZE addition so for every loop it will return number of records mentioned in package size.
Hope this helps.
Thanks,
Augustin. -
Hello Guys,
I have a question regarding calling a RFC function module.
In BW - BI 7.0 I call a RFC function module:
(The ABAP program in BW-BI 7.0 is below)
CALL FUNCTION ''ZTESTFUNCTIONMODULE' " Function module in ECC
DESTINATION 'DECCLNT110' " ECC system
TABLES
it_gl_item = it_gl
it_errlog_gl = it_errlog_gl.
The 'ZTESTFUNCTIONMODULE' is RFC enabled in the ECC system.
The purpose is we retarct the data from BW to ECC.
When I run the function module it always asks for the user id and password.
The SAP logon screen appears and it asks for the user id and password.
The destination is maintained in the SM59 transaction and also the user is maintained there. I think it should login automatically into remote system and return the tables. is it correct. How to skip the logon screen.
Do I have to pass the user id and password in the function module. I think it should take the user id from the SM59 destination. Is it correct.
Please advise. As always thanks for your help guys.Hi Senthil,
I think you answered your query in your question itself
The user ID and password need to be maintained in RFC destination in SM59.
Go to SM59 and then click on test connection..if it does not ask for ID and passwoed that means correct ID and password is maintained in SM59 otherwise maintain it.
Regards,
Atish
Maybe you are looking for
-
How to Load data from a Table in BW to R3 Table .. any FM or Program if you
I want to load data from a Table in BW side to R3 side. Any FM or Program if you Know.
-
Error while creating database on 10.2 enterprise eidition
Hi, When i trying to create database through batch file on oracle version 10.2 enterprise edition, its giving error. ORA-01092: ORACLE instance terminated. Disconnection forced Following error message logged in log file: ORA-00604: error occurred at
-
IPhoto suddently can't see my pictures...
I've hunted around the forum a bit and haven't found a question that fits my situation. Yesterday I launched iPhoto and found that the application wasn't showing most of my photos. My library which normally has 3,000+ pictures was only showing 800 or
-
I can forward the message with the formatting when I use "the other browser" by choosing OPTIONS, then HTML. I don't see how to do this in Firefox and it all turns to plain text.
-
Problem with a sequence visibility...
Greetings, everybody I have a problem: In a Java application, there's a line that try to get a sequence value, as follows: PreparedStatement stmt = conn.prepareStatement("select any_schema.SQ_WHATEVER.nextval as NEXTVAL from dual"); //where conn is a