Where should i call the rfc function module? in xi or in r/3
where should i call the rfc function module?
for the synch scenario: file < -- > xi <---> rfc
i know the type of rfc is tcp/ip; but i'm not sure with the followings,
and with some trials i can not even see any message via rwb even all the setting
can be activated without errors.
where should i create the rfc destination? in r/3 or xi
where should i call the rfc via abap program? in r/3 or xi
i guess the calling program should belong to the different server with the rfc itself....
so confused....
Thanks for your reply!!
Jun
if i create the destination in xi point to r/3, then i call the rfc use the destination in r/3 right ?
The call doesnt use the destination in R3. XI has the RFC destination which is just used to connect to the R3 system
but where i need to create the fm via se37? in xi or r/3 ?
In R3
Regards,
Prateek
Similar Messages
-
Problem while calling an RFC Function Module in Background
Hello,
I have created a RFC function module for reading data from an external DB system. The FM calls an external RFC program (coded in C++ using RFC SDK), which delivers the required data. This external program is maintainged as an TCP RFC Connection in SM59.
Further I have created a report, that calls the RFC function module to get the data from the external RFC programm.
My problem is, when I call the report in foreground, everything works OK, the RFC connection works and data can be read from the external program.
However, when I schedule the report to run in background as a job, the report is stating in the protocoll that there was a problem calling the defined RFC connection (although the connection is working properly at that time).
More funny is, this particular problem with running in background occurs only in the productive system, in test and development system the report works correctly also while running as a job in background.
Can you suggest the solution to this problem? Could it be something with authorisations or server settings?
I will be on holiday for the next 6 weeks, so take your time to answer .
Regards,
Dusan.
Edited by: Julius Bussche on Jan 22, 2009 7:19 PM
Please read the forum rules about u r g e n t ...This is an external RFC server program, not a remote enabled ABAP RFC function module as the others seem to be assuming, right?
Is it possible that your DEV and QAS systems only have one application server, but the PROD has many and dedicated one(s) for processing low priority background jobs?
It might be that the target server of your TCP connection is not this BTC instance, and your RFC server is returning the data "locally" - so, into nirvana...
Just guessing, but might be worth checking.
Cheers,
Julius -
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 -
Error in calling the Remote Function Module
Hi all,
I am trying to call the Remote function Module which is in CRM from ECC .
But we are not able to detect the function module as it is showing the error as Function Module not found.
Can anybody help us in calling the Remote Function Module .
Regards,
MadhaviPlease check the foll 2 things :
RFC radio button clicked in se37 for that FM
RFC connection established with the remote server in SM59
Thanks -
Unable to find the RFC function module in the impoting list in IR
HI
I am trying to import a RFC function module from the R/3 system.
I am not able to find the RFC in the list that comes for the RFC function modules that can be imported.
The RFC is present in the destination system and is actiated too
If anyone has and idea why is such a thing happning
Regards
NikhilHi Nikhil,
The Checklist,
1. Check the connection parameter at XI
2. Make sure ur function module is remote enabled
3. Make sure ur RFC exists for the same user, client credentials
Regards,
Prateek -
Unknown error calling a RFC Function Module in BODI
Hi all,
I am having an issue identifying the error that my batch job in BODI is giving with regards to a RFC function module call in my query. The value returned by the standard parameter 'AL_RFC_RETCODE' are square characters ( ).
At the completion of the job, the error message 'RFC CallReceive error <Function ZCT_INDSLS_SLS_TRN_INSERT: Invalid request.. Invalid request.>.' is being output.
Correct me if I'm wrong but the parameter 'AL_RFC_RETCODE' should return standard values as per the techical manual provided to undertand any errors that might occur during a RFC FM call.
Can anyone help me on this?
Best regards,
Andrew WongHi 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 -
Calling Synchronous RFC Function Module in Background
Hi all,
Currently we are working on some requirement where in we have to retrieve data from one system(CRM) and update the same into another system(ECC). We have developed a RFC Function in CRM system and it is being called from ECC system as in synchronous mode via a batch program.
Now since all sychronous call to a RFC function will be dialog there is a constraint on the runtime which is being set by maximum run time for each dialog work process. So my question is there an option to call an RFC function synchronously in background (background task) so there is no runtime performance.
The standard TRFC, QRFC calls in background runs asynchronously and so I am trying to check with the SDN world as whether has anyone tried SRFC(Synchronous) call in background?
Thanks in advance,
JagathSo my question is there an option to call an RFC function synchronously in background (background task) so there is no runtime performance.
One solution would be to increase the value of the "time out" parameter defined the CRM system. This i feel is not a fool-proof solution as the run-times cannot be predicted. Check this thread: Re: RFC timeout profile parameter
For me a better solution would be to implement tRFC call instead of a synchronous call. Any reasons why you don't want to implement a tRFC ?
BR,
Suhas
Edited by: Suhas Saha on Jun 26, 2010 8:52 AM -
Regarding the RFC Function Module call from PI
Hi All,
I am working on one File to RFC interface, in which File adapter picks the file, this file data has to goto 2 function modules in SAP system. For this i added 2 Inbound interfaces in INTERFACE DETERMINATION and I developed 2 RECEIVER AGREEMENTS. In 2 RECEIVER AGREEMENTS i added single receiver RFC Communication Channel.
Now i want assurance that once 1 st function module will execute completely, then only my second function module should be called. Is there any setting that i can do to make this sync?????.
what is the use of Send 'Confirm Transaction' in receiver RFC Communication Channel under Adavanced Mode.
Thanks,
BaluHi,
As per you requirement I would suggest to change your scenario as File To Proxy. It will much more easier and 100% sure to process second BAPI only after first gets successful inside the proxy.
Pass the data from file adapter to inbound proxy and then inside proxy code you first call the first BAPI and use commit wrok. Once commit work is successful then you call the second BAPI otherwise rollback the changes.
Example:
Call First_BAPI
<pass the data to it's import export parameters>
Commit work.
if sy-subrc =0.
Call Second_BAPI.
<pass the data to it's import export parameters>
Commit work.
endif.
Note: If you are not very much comfortable with ABAP the discuss this with your ABAP team mate.
Regards,
Sarvesh -
Issue with the RFC function module - parameters
Hi,
When i am creating RFC enabled function module, it was throwing an error like <b>'Reference parameters are not allowed with RFC'.</b>. I am implementing the test scenario to create BAPI, for that i have created table with 2 fields. My main intension is through RFC enabled function module planning to update the ztable.
When i was creating RFC enabled function module, it was giving error. I remembered that i need to use new structure when i create RFC enabled function module, so even i created structure also with the same fields of table fields.
can you please let me know the solution for this.
Thanks
jayaHi Ferry,
Your solution is perfect. can you please explain the below information...
Call by value
You pass the parameter with values. This means that the parameter
contents are copied both when the parameter is passed and when it is
transferred back to the calling parameter. For structures that contain
tables, performance may be reduced considerably. Therefore, you should
not do this.
I created the parameters with reference to table-fields, what do you mean by 'Call by value'check box usage there.
Is it mean ...if i change the contents of the field in FM will it pass back to the structure which i refered to this parameter, in this case its table-field.
Thanks
jaya -
Calling BAPI(RFC function module) in java? Part 2
Hi
Can any body tell me or give me source code for calling give BAPI...i need to give the inputs to that parameters..
data l_order_header_in like bapisdhd1.
data t_return like bapiret2 occurs 0 with header line.
data t_order_items_in like bapisditm occurs 0 with header line.
data t_order_schedules_in like bapischdl occurs 0 with header line.
data t_order_partners like bapiparnr occurs 0 with header line.
*data t_order_condition_ex like bapicond occurs 0 with header line.
*clear t_order_condition_ex.
*refresh t_order_condition_ex.
clear l_order_header_in.
l_order_header_in-doc_type = 'TA'.
l_order_header_in-sales_org = 'ZZ02'.
l_order_header_in-distr_chan = 'Z2'.
l_order_header_in-division = 'Z2'.
*l_order_header_in-purch_no = '12'.
clear t_order_items_in.
refresh t_order_items_in.
t_order_items_in-itm_number = '000001'.
t_order_items_in-material = 'HAMAM'. " 'LBYA1'.
t_order_items_in-target_qty = '0000000000001'.
t_order_items_in-comp_quant = '0000000000001'.
append t_order_items_in.
clear t_order_partners.
refresh t_order_partners.
t_order_partners-partn_role = 'AG'.
t_order_partners-partn_numb = '0000000006'.
append t_order_partners.
clear t_order_schedules_in.
refresh t_order_schedules_in.
t_order_schedules_in-itm_number = '000001'.
t_order_schedules_in-sched_line = '0001'.
t_order_schedules_in-req_qty = 1.
append t_order_schedules_in.
clear t_order_partners.
t_order_partners-partn_role = 'WE'.
t_order_partners-partn_numb = '0000000006'.
append t_order_partners.
break kumars.
call function 'BAPI_SALESORDER_CREATEFROMDAT2'
exporting
SALESDOCUMENTIN =
order_header_in = l_order_header_in
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT =
tables
return = t_return
order_items_in = t_order_items_in
ORDER_ITEMS_INX =
order_partners = t_order_partners
order_schedules_in = t_order_schedules_in
ORDER_SCHEDULES_INX =
ORDER_CONDITIONS_IN =
ORDER_CONDITIONS_INX =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_CCARD =
ORDER_TEXT =
ORDER_KEYS =
EXTENSIONIN =
PARTNERADDRESSES =
break venkat.
call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
Awaiting for ur responses..
Thx
PRadeepTo call an RFC, you need to import that first. For that right click on the project into which you need to add the rfc.
Import >>import RFC modules from r/3>>Give the package name and a port name for the rfc.
set the server options as your r/3 server properties.
Then you can search the Function name >> it will be displayed in the result area>> select it and press finish.
The RFC will be imported to your project.
Then you need to create JCO for calling that rfc.
Here is a sample code which calls an RFC and setting jco..
import com.sap.mw.jco.JCO;
import com.sapportals.portal.prt.component.*;
public class rfc extends AbstractPortalComponent
private JCO.Client jcoClient;
Insert_pgm_PortType insFunc=new Insert_pgm_PortType();
Zinsert_Pgm_Input ip=new Zinsert_Pgm_Input();
Zinsert_Pgm_Output op=new Zinsert_Pgm_Output();
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
this.connect();
insFunc.messageSpecifier.setJcoClient(jcoClient);
//setting input params
ip.setAssociate_Id1("44");
ip.setCourse_Objt1(2);
ip.setQlty_Content1(5);
ip.setSeq_Content1(2);
ip.setTraining_Id1("22");
//calling RFC
try{
op=insFunc.zinsert_Pgm(ip);
}catch(Exception e){}
response.write(op.getMessage());
this.disconnect();
//creating JCO connection
private void connect() {
try {
jcoClient =
JCO.createClient("Client","userid","password","Language","servername","Systemid");
jcoClient.connect();
} catch (Exception e) {
System.out.println("Error connecting to SAP ::" + e.getMessage());
e.printStackTrace();
private void disconnect() {
try {
jcoClient.disconnect();
} catch (Exception e) {
System.out.println(
"Error dis-connecting to SAP ::" + e.getMessage());
e.printStackTrace();
Hope this Helps
gEorgE -
Regarding: calling a rfc function module for web dynpro for JAVA
Hello all,
I want to call an rfc enabled function module from webdynrpo application.
*and there is one condition that function module should be called not threw bapi.*
Thanks
Edited by: Punit Pawar on Jul 21, 2008 10:38 AMHi
You can call RFC(remote enabled) from R/3 through Models in Webdynpro Java.You need to have JCO destinations.You connection properties of backend System
http://help.sap.com/saphelp_nw04s/helpdata/en/6a/11f1f29526944e8580c5e59333d96d/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0310cf8-8cdb-2910-4a82-df1f11619f4e
Thanks,
Tulasi Palnati -
Error while calling the Mapping function module for BW Extraction
Hi
iam getting runtime error while calling the BW mapping function
The error description is as shown below.
Runtime Errors CALL_FUNCTION_UC_STRUCT
Except. CX_SY_DYN_CALL_ILLEGAL_TYPE
<b>Short text</b>
Type conflict during structure parameter transfer at CALL FUNCTION.
<b>What happened?</b>
Error in the ABAP Application Program
The current ABAP program "GP466CV1Y7W2VML1PJ3VB80KDOP" had to be terminated
because it has
come across a statement that unfortunately cannot be executed.
<b>Error analysis</b>
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught in
procedure "CALL_MAPPING_FUNCTION" "(FORM)", nor was it propagated by a RAISING
clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
In the function "CMS_CB_BW_MAP", the STRUCTURE parameter "EXTRACT_DATA" is
typed in such a way
that only actual parameters are allowed, which are compatible in Unicode
with respect to the fragment view. However, the specified actual
parameter " " has an incompatible fragment view.
I am passing the EXTRACT_DATA parameter as specification LIKE with the associated type - corresponding structure
Please let me know how can i resolve this issue
Regards
LeonDear benarji ,
I'm having the same problem help me to correct . I have mentioned below as what error i got.
Runtime Errors CALL_FUNCTION_UC_STRUCT
Except. CX_SY_DYN_CALL_ILLEGAL_TYPE
Short text
Type conflict during structure parameter transfer at CALL FUNCTION.
What happened?
Error in the ABAP Application Program
The current ABAP program "ZDLROUTSTANDING_COPY" had to be terminated because it
has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught in
procedure "PDF" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
In the function "/1BCDWB/SF00000080", the STRUCTURE parameter "IT_WORKS_SF" is
typed in such a way
that only actual parameters are allowed, which are compatible in Unicode
with respect to the fragment view. However, the specified actual
parameter "SFTWORKS" has an incompatible fragment view.
Missing RAISING Clause in Interface
Program ZDLROUTSTANDING_COPY
Include ZDLROUTSTANDING_COPY
Row 876
Module type (FORM)
Module Name PDF
Trigger Location of Exception
Program ZDLROUTSTANDING_COPY
Include ZDLROUTSTANDING_COPY
Row 894
Module type (FORM)
Module Name PDF
Source Code Extract
Line SourceCde
864 ** i_logo = 'ENJOYSAP_LOGO'
865 * IT_LIST_COMMENTARY = I_LIST_COMMENTS1.
866
867 ENDFORM. "alv_top_of_page1
868 *&---------------------------------------------------------------------*
869 *& Form PDF
870 *&---------------------------------------------------------------------*
871 * text
872 *----------------------------------------------------------------------*
873 * --> p1 text
874 * <-- p2 text
875 *----------------------------------------------------------------------*
876 FORM pdf .
877
878 * *** Smartforms & PDF ***
879
880 ssfctrlop-no_dialog = 'X'.
881 ssfctrlop-preview = 'X'.
882 ssfctrlop-getotf = 'X'.
883 ssfcompop-tddest = 'ERP7'.
884 DATA : mcheck LIKE sy-subrc.
885 CLEAR : fm_name.
886
887 "Get Function module name for given smartform
888 CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
889 EXPORTING
890 formname = 'ZSFDLOS1'
891 IMPORTING
892 fm_name = fm_name.
893
>>>> CALL FUNCTION fm_name
895 EXPORTING
896 control_parameters = ssfctrlop
897 output_options = ssfcompop
898 mrefno = mrefno
899 * P_TITLE = MTITLE
900 IMPORTING
901 document_output_info = st_document_output_info
902 job_output_info = st_job_output_info " IT_OTF_DATA
903 job_output_options = st_job_output_options
904 TABLES
905 it_works_sf = sftworks
906 EXCEPTIONS
907 formatting_error = 1
908 internal_error = 2
909 send_error = 3
910 user_canceled = 4
911 OTHERS = 5.
912
913 IF sy-subrc NE 0.
Advance Thanks -
'Control parameters' when call the smartform function module
Hi all,
I want to know what we have to export as value to control papameter while calling the fm of smartform.
Plz also let me know the various parameters in CONVERT_OTF.
Thanks in advance.WA_CONTROL_PARAMETERS-GETOTF = 'X'.
the above is needed if you want OTF data, to convert it to PDF
WA_CONTROL_PARAMETERS-LANGU = 'E'.
Language of smartform
WA_CONTROL_PARAMETERS-DEVICE = 'PRINTER'.
*default o/p device
WA_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
if you dont want the pop up screen , that asks you for printing make the value as 'X' .
other wise make it as space or clear it.
WA_CONTROL_PARAMETERS-PREVIEW = SPACE.
if u want the print preview , make it as 'X' , otherwise SPACE
Below code shows how you can convert the OTF data to PDF data.
calling the smartform.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_SMARTFORM'
IMPORTING
FM_NAME = WF_FUNCMODULENAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
CALL FUNCTION WF_FUNCMODULENAME
EXPORTING
CONTROL_PARAMETERS = WA_CONTROL_PARAMETERS "Control Params
OUTPUT_OPTIONS = WA_OUTPUT_OPT "Output Options
WF_CARRID = WF_CARRID
WF_CONNID = WF_CONNID
WF_FLDATE = WF_FLDATE
IMPORTING
DOCUMENT_OUTPUT_INFO = WA_DOCUMENT_OUTPUT_INFO
JOB_OUTPUT_INFO = WA_JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS = WA_JOB_OUTPUT_OPTIONS
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
ARCHIVE_INDEX = WA_ARC_IDX
IMPORTING
BIN_FILESIZE = WF_NUMBYTES
TABLES
OTF = WA_JOB_OUTPUT_INFO-OTFDATA[]
DOCTAB_ARCHIVE = TB_DOCTAB_ARCHIVE[]
LINES = TB_LINES[]
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3. -
Facing Problem with RFC Function Module
Hi,
I have created an RFC function module to get some data in table format.
I have run the RFC in original system: It is giving the data.
However, when I run this in target system, It is not giving any values.
Could you please let me know, why it happens? I am not sure where I missed out.
Thanks,
SandeepHI,
i hope you are calling the RFC function module in the target system like this
CALL FUNCTION <FUNC NAME> DESTINATION <DESTINATION NAME> . The destination should be logical system name of the source Logical system .
Regards,
Nagaraj -
Debuggin a Call to Remote Function Module
Hi
I have a scenario where i have a Remote Function Module in r3 which is being called synchronously by an external java application. The FM has a lot of input and output parameters and many tables. The output returned by the FM is not as expected.
Can anyone tell me how debug a Remote Function Module when a call has been made from an external application.
I am not able to get the test data sent by the external application . So when the external application gives a call to this Remote FM and if it is possibele to debug it would be great.
regards
Nilesh Taunk.Hi Nilesh,
1) Login to SAP with the same ID with which you will calling the RFC function module from the outside system.
2) Goto transaction - se37/se38
3) Goto Utilities => Settings.
4) Select the ABAP Editor Tab.
5) Click on the Debugging tab.
6) Tick the Actv. button and give the user name with which you will be debugging the code. In this case the logged in user id.
7) Press Enter.
8) Now put an external break point inside the Function Module.
9) Load your external application (from where you want to debug the FM) once again.
The execution will stop in the FM.
Hope it helps..
Lokesh
PS: This was a simple question, but I guess the reason no one has answered your question is due to the fact that you havent rewarded points to members helping you. Also remember to close your post once it has been answered.
Maybe you are looking for
-
Replacement of a broken motherboard in an iMac is 595€ or 1.466€!!!
Replacement of a broken motherboard in an iMac is 595€ but if I ask to return the faulty motherboard (proof of replacement, example is class, curiosity) cost suddenly rises to 1.466€. Dealer claims 595€ is the price of an "exchange" and 1.466€ is the
-
While intending to perform a clean install of Mountain Lion while continuing with old apps and files, is it a waste to restore a backup that was made while running Mountain Lion as an UPgrade from Lion? Originally I was running Mountain Lion as an UP
-
XI to AS/400 DB2 connectivity_doubt
Hi, has anyone connected to an AS/400 DB2 from XI's Sender JDBC Adapter? if so, can you please suggest the procedure and the <b>driver</b> that was used. Regards, Balaji.M
-
How to Use " ASSERT ID " , in the programm and what is the use of it?
Hi, friends, I wanted to write a program (TEST CASE) by using ASSERT ID . But i got the description (Hint) like what iam mentioning below: *" Detects uses of ASSERT ID and flags cases where there is code to be executed after the command. In productio
-
[Solved] installation and setup question - gummiboot and EFI
Hi, This is the first time i'm installing arch. i hit the below issues. hope someone can help me out. my understanding of uefi is just about an hour worth of reading or less.. (the wiki didn't mention the kernel requirement when I started installing