Asynchronous RFC call
I need to Send some information to an RFC and my friend is saying that, I cannot call RFC Asynchronously and I couldnot understand that point, could some one help me please.
Thanks.
Dear Saravana,
Dear Sravya,
I would like to do the following scenario:
SAP/PS --> XI --> JMS
In SAP I call the Bapi: BAPI_NETWORK_MAINTAIN and sends network datas to JMS through XI.
In the design:
I only imported the BAPI to my SWCV. (I don't use any own made Data types/Message types/Message interfaces.)
In the config:
I used this imported BAPI name (BAPI_NETWORK_MAINTAIN) as my interface.
It works, but it sends the message synchronously...
I would like to use this simplicity (only import the BAPI and don't use any own created interfaces,DTs, MTs and BPM neither)
But if I don't create any own Message Interface I can't control the synchronous/asynchronous mode.
Is it feasible that way??
Thank you in advance!
Andras
Similar Messages
-
Asynchronous RFC call from R/3
I need to make an asynchronous RFC call from R/3. I receive an error message in R/3 stating that my RFC destination can only be of type I (Internal) or type 3 (R/3 system). In order for it to reach XI I need it to be of type T (TCP/IP). Any help would be appreciated.
Here is the function call.
CALL FUNCTION 'Z_B2B_R3_FUNCTIONAL_ACK' starting new task 'SESSION1'
destination 'RFC2XMBSERVICE'
EXPORTING
MSG_TYPE = msg_type
ORDER_HEADER_RETURN = order_header_return
TABLES
RETURNCODE = i_return.
the RFC desitnation RFC2XMBSERVICE is of type TCP/IP which by default makes it synchronous.
Thanks,
Jimhi,
have you tried:
CALL FUNCTION 'Z_B2B_R3_FUNCTIONAL_ACK'
in background task
destination 'RFC2XMBSERVICE'
EXPORTING
MSG_TYPE = msg_type
ORDER_HEADER_RETURN = order_header_return
TABLES
RETURNCODE = i_return.
commit work.
Regards,
michal -
Error with Asynchronous RFC call to JDBC
Hi all,
We are working on a scenarion where in we have to make an asynchronous RFC call to JDBC.
We have configured RFC sender adapter following this weblog
/people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
We have created data types only for the database as RFC does not require any data types.
And also we have created message types,message interfaces accordingly.
In Message Mappping,we mapped the export parameters of RFC to the access fields of database message type.
Also we have created sender agreement,interface determinations etc.... accordingly
And for sending RFC request asynchronously we followed this weblog
/people/swaroopa.vishwanath/blog/2006/12/28/send-rfc-to-sap-xi-150-asynchronous
Once done with all the above steps we could able to trigger the RFC call and caught with the following errors in SXMB_MONI and no errors are seen in communication monitoring
SOAP Error:
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>+
+- <!-- Request Message Mapping+
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_curr_exg_mm2_</SAP:P1>
<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
<SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" /> <SAP:Stack>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_curr_exg_mm2_: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Also trace shows the following error thogh the interface determinations are properly configured
<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
- <!-- ************************************
-->
<Trace level="1" type="T">--start sender interface action determination</Trace>
<Trace level="1" type="T">select interface BAPI_EXCHRATE_GETCURRENTRATES*</Trace>
<Trace level="1" type="T">select interface namespace urn:sap-com:document:sap:rfc:functions</Trace>
<Trace level="1" type="T">no interface found</Trace>
<Trace level="1" type="T">--start receiver interface action determination</Trace>
<Trace level="1" type="T">Loop 0000000001</Trace>
<Trace level="1" type="T">select interface *</Trace>
<Trace level="1" type="T">select interface namespace</Trace>
<Trace level="1" type="T">no interface found</Trace>
<Trace level="1" type="T">--no sender or receiver interface definition found</Trace>
<Trace level="1" type="T">Hence set action to DEL</Trace>
<Trace level="1" type="B" name="CL_XMS_MAIN-PERSIST_READ_MESSAGE" />
<Trace level="1" type="T">Note: the following trace entry is written delayed (after read from persist)</Trace>
<Trace level="1" type="B" name="SXMS_ASYNC_EXEC" />
- <!-- ************************************
-->
<Trace level="1" type="T">----</Trace>
<Trace level="1" type="T">Starting async processing with pipeline CENTRAL</Trace>
the above errors are shown as part of request mapping..
Can any one please let me know what other configurations do we need to do?
I did not map the RFC import parameters,do we need to do that
Any help in this regard is really appreciated
Rgds,
SanthoshHi,
I am really happy to hear that the problem with mapping is resolved.
Now as per your requirment It needs to be aynschornous RFC--> XI ---> JDBC call. In XI you should map the RFC Export parameters to the traget structure of JDBC.
then the question is to how to trigger the RFC Function Module in R/3 to XI.
Plesae follow below steps to trigger it from SAP R/3
1. Create a RFC in the R/3 system
2. Configure the SM59 and Sender Communication channle as given in the Michal's blog. Also test if it is succesful.
/people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
3. Import the RFC in XI
4. Do the mapping to the target strucutre
5. Configure the JDBC receiver adapter
/people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
6. You can trigger the RFC from R/3 sytem by using
Async Call - in ABAP program use below syntax to call RFC. Here the export parameters will be passed on to XI which further have mapped to JDBC.
CALL Function "RFC Name" IN BACKGROUND TASK destination <sm59 destination>
COMMIT WORK.
Sync Call
CALL Function "RFC Name" destination <sm59 destination>
Thanks
Swarup
Edited by: Swarup Sawant on Jan 27, 2008 9:14 AM -
It is possible to get a response of a asynchronous RFC call thru wait loop
Hi Experts,
The requirement is that i queue up all the requests from a web services ( One queue per plant for example) which i set in the HTTP sender URL ( i mean the queue name ). and i am posting the records thru a RFC call.
1. Let the RFC call be synchronous and in case the R/3 system is done.. Will the XI queue keep the Call and keep on retrying it till the R/3 system is up.
2. Otherwise if the RFC call be asynchronous, is it possible to introduce a wait loop in BPM to listen to the RFC till i get some response ( i think this is not possible).
Need your suggestion on the same...
The requirement demands that no single request from the web service should be lost.. in case of failure of R/3 they should be queued up and re tried.. Forget about the error because of exception in RFC this will be taken care manually..
Thanks for your response in advance.Hi Rajesh,
you can queue and restart only asynchronous messages. I think you can build a Business Process, where you repeat sending a message til you have success or maximum number of tries is reached. But no good idea, coz you will get timeout at HTTP sender. Aynchronous messages dont have a response.
May be, XI can solve your task in the standard: In transaction SMQR you can just configure what you describe. All asynchronous messages will be queued and restartet in case of receiver not reachable. You can configure no of retries and intervall between.
Regards,
Udo -
Dynamic queue selection with Asynchronous RFC call
Hi Experts,
I have a new requirement in designing the business process thru XI. The scenario is posting production orders from a web service thru XI to R3 ( RFC calls). The requirement is that the production orders may come from different plant (Plant and production line combination). So in order to faciliate the load balancing we need to dynamically allot all the process orders from a Plant to single or two queues ( by queues i mean the queuing of the RFC requests with QoS = EO or EOIO). So dynamic selection of queues (XBIXnn) is possible in XI ?.
Please let me know in case you need further clarification on this
Thanks in advanceRajesh,
Some more interesting read from,
http://help.sap.com/saphelp_nw04/helpdata/en/43/65ce41ae343e2be10000000a1553f6/content.htm
<i>Define Quality of Service (EOIO)
8. Specify EOIO (Exactly Once in Order) as the quality of service, as required.
Messages are then delivered in the same sequence that they are sent in by the integration process.
a. Specify a queue in the Queue Name field.
You can choose the name of the queue yourself.
Max. length: 16 characters
Permitted characters are alphanumeric characters and the following special characters:
/ (slash)
_ (underscore)
- (hyphen)
All send steps that have the same queue name are delivered in the sequence that they are sent in by the integration process.</i>
Should be possible if you use a BPM.
Regards
Bhavesh -
Asynchronous RFC calling using BPM
Hi to all,
I have this scenario:
FILE -> XI -> RFC -> XI
I want to use the BPM to do this, thus I have built this BPM:
START -> RECEIVE -> BLOCK1(SEND) -> BLOCK1(RECEIVE) -> STOP
My problem is that I want to use an asynchronous scenario and, thus, when XI sends message to RFC, BPM seems to become inactive and the BPM is not able to receive the RFC Response. How can I solve this problem? How can I mantain BPM active to receive the RFC Response?
Thanks to all!Hey,
I suppose you are trying to do a similar senario
The scenario must be executed asynchronously, but there needs to be an automatic confirmation that the business data was successfully processed (this would be the equivalent of an applicationacknowledgement). Cross-component BPM (ccBPM) will be used to process the confirmation message.
How To Use BAPI wrappers in asynchronous scenarios with ccBPM
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/59ef6011-0d01-0010-bfb0-b51381e00509
<b>Cheers,
*RAJ*
*REWARD POINTS IF FOUND USEFULL*</b> -
How to Use synchronous RFC calls during test run for remote accesses
there is a Setting for the usage of RFC accesses from a tested system
using eCATT.
'X' - Use asynchronous RFC calls during test run for remote accesses
' ' - Use synchronous RFC calls during test run for remote accesses
I developed an eCATT as following :
SAPGUI ( SAPGUI_1 , Target_system_1 ).
SAPGUI ( SAPGUI_2 , Target_system_2 ).
My question is how to run the eCATT in a synchronous RFC calls
PS: I do not want to change the Target_system to the same one in the
above script of ecatt.Because I need to run it in 2 different Target
systems sometime.
for example, I give a Target_system_3 when run this eCATT
I want the SAPGUI_1 and SAPGUI_2 run the Target_system_3 but not the
Target_system_1 or Target_system_2 .
Could you please tell me how to make it without the changes in script?
Edited by: Weitong Liu on Mar 24, 2011 9:44 AMHi Liu,
Weitong Liu wrote:
> ' ' - Use synchronous RFC calls during test run for remote accesses
This is the standard option value. Asynchronous are not the standard way and used only for very special purposes.
Weitong Liu wrote:
> I developed an eCATT as following :
> SAPGUI ( SAPGUI_1 , Target_system_1 ).
> SAPGUI ( SAPGUI_2 , Target_system_2 ).
> My question is how to run the eCATT in a synchronous RFC calls
The commands will be executed in sequence. So each call will be synchronously replayed against TS1 and TS2.
What is you issue with this standard procedure?
Kind regards,
Christoph -
Hi All,
Do you know if there is a monitor that logs incoming RFC calls to a system?
We have an XI scenario where an asynchronous RFC call takes place from XI to R/3. But it's not working. So we're trying to see of XI is actually calling the RFC.
Let me know!
Thanks,
Roman D.Hi !
If there is a comunication problem you may find some protocols in the sending system.
SAP can only trace the activity if the remote login was succesfull.
If there is any problem with the remote login the SM20 may be helpful. All unscuccesfull login activity is loged there....
Regards
Rainer
Some points would be nice if that helped a bit -
Are implicit DB commits initiated when there are Sync or Async RFC call
BC414,Page 3-8 says, whenever there are synchronous and asynchronous rfc calls,implicit DB commits are always initiated.
But I test it in ABAP program as following steps.
1: insert data into dbtable.
2: Call Function "RFCFunction".(within this function, insert data into dbtable).
3: Rollback Work.
All the data is not inserted into db table at all.
Are there anything wrong with my understanding?Hi!
Strange behavior. Yes, every remote call (can) cause an implicit commit work (or is anyway linked to commit work, 'in background'...).
Also implicit commit works should end a database LUW -> no rollback any longer (see http://saphelp.euroset.lan///EN/41/7af4bfa79e11d1950f0000e82de14a/frameset.htm).
Currently my first guess would be: being on same application server is an exception.
There are quite a number of places, where a implicit commit work occurs (e.g. wait!, PAI). Instead of wondering, why in one exception rollback is still working, remind these cases and build up save booking procedures.
Regards,
Christian -
Hi Everybody,
Could yo pls guide me on how to implement asynchronous RFC. When i run my RFC using Report :
CALL FUNCTION 'Z_HR_NO_ALTINN_TX' DESTINATION 'Q3A2X7A'starting new task 'test'
exporting
PASSWORD = 's'.
I get the error saying :
<b>What happened?</b>
When executing the asynchronous RFC, the RFC destination "Q3A2X7A" had
neither an internal (connection type 'I') nor an R/3 communication
type (connection type '3'.
Error in ABAP application program.
The current ABAP program "Z_ALTINN_TEST" had to be terminated because one of
the
statements could not be executed.
This is probably due to an error in the ABAP program.
<b>Error analysis</b>
A typical cause of error is the
execution of external programs (RFC destinations of the type
TCP/IP) via asynchronous Remote Function Call (RFCs with the
addition 'STARTING NEW TASK taskname').
RFC destination... "Q3A2X7A"
I would like to know if async RFC call is possible to XI.
Regards,
RajHi,
you need to call the RFC from ERP, R3
with
call function XXXXX
<b>in background</b>
and Commit work.
Regards,
michal -
Hello,
I am setting up a very simple scenario where I am making a sychronous RFC call to a BAPI in R/3 (Version 4.6c) from an XI Sandbox (Version 7.0).
I have the RFC Communication channel properly configured, or so I think, and have verified everything else as well. I initiate the message from the Runtime Workbench and it shows with status "Successful" in the Message Monitoring section. However, when I look in SXMB_MONI transaction I am unable to find a response message from the BAPI coming back in the payload. I notice that even though the scenario is synchronous, the "Type" column in the SXMB_MONI transaction results shows it as "Asynchronous". Also, in the message details there is a Payload (which I am sending when I create and send the message from the RWB), in every step, until the Call Adapter step. After that there is no payload in the Call Adapter or the Response steps, just the SOAP Body with the Manifest.
In the message details I see that the <SAP:Processing Mode> entry is set to "Asynchronous" rather than "Synchronous".
Does anyone have any idea why this is so?
Thanks,
Murtaza.
Message was edited by:
Murtaza MadraswalaHi Amitabha,
I looked in the location you suggested and got a list of "Success" messages. These are listed below for you to look at:
Time Stamp Status Description
2007-06-18 15:17:54 Success Message successfully received by messaging system. Profile: XI URL: http://camapox1:50100/MessagingSystem/receive/AFW/XI Credential (User): XIISUSER
2007-06-18 15:17:54 Success Using connection RFC_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
2007-06-18 15:17:54 Success Message successfully put into the queue.
2007-06-18 15:17:54 Success The message was successfully retrieved from the receive queue.
2007-06-18 15:17:54 Success The message status set to DLNG.
2007-06-18 15:17:54 Success Delivering to channel: GeneratedReceiverChannel_RFC
2007-06-18 15:17:54 Success MP: entering
2007-06-18 15:17:54 Success MP: processing local module localejbs/RfcAFBean
2007-06-18 15:17:54 Success RFC adapter received an asynchronous message. Attempting to send tRFC for Z_SD_RFC_ATP_WRAPPER with TID XIlc32S1tf4Togkm0mRWaHRG
2007-06-18 15:17:55 Success MP: leaving
2007-06-18 15:17:55 Success The message was successfully delivered to the application using connection RFC_http://sap.com/xi/XI/System.
2007-06-18 15:17:55 Success The message status set to DLVD.
The problem that I am seeing is that this is posted under the list of Asychronous Received Messages. Thats something I am just unable to understand. I have a Synchronous Outbound Interface defined and an RFC Communication Channel, which is Synchronous as far as I know. So why is the processing mode for the message being chosen as Asynch? Which config setting have I missed that is causing this problem? I am just unable to find the answer so far.
I appreciate your help. Please let me know if you have any clues.
Thanks,
Murtaza. -
Hi all,
I have a issue in makeing RFC call to a function module . The scenario is , i have a custom built transactions which in turn call few standard transactions in one server(A) and i want to open these transactions from another server(B) using RFC calls and hence i made a remote enabled function module in server(A) and i called this function module from server(B) using destination. But the transaction that i call inturn call another standard transaction in its code which in turn call another standard transaction using the statement "LEAVE TO TRANSACTION" . Because of this the RFC connectivity is getting disconnected.
Hence i made a asynchronous call by using the statement
call function "xxxx" destination 'd' performing new task 't1' .
This worked fine & i was able to execute the transaction. But this asynchronous call has destroyed the 2EE server process on the ITS . But with other normal RFc calls everything is running fine .
What should i do now coz this asynchronous call is killing the performance and server. Can anyone suggest me anyother approach.
Thanks & regards,
RajbarathHi,
In SM59 Check if Radio button for Trusted System is YES (Selected). Then it should not ask even after that if it asks then provide the password in Logon details in Logon and Security Tab available in SM59 for your Destination System.
Thanks,
Prashanth
Edited by: Prashanth KR on Feb 11, 2009 12:13 PM -
"No Receiver Determined" in BPM Sync RFC Call
My scenario is xml file -> XI BPM -> RFC1 -> RFC2 (will call RFC2 if RFC1 is successful).
I am still just trying to get the RFC1 call working properly. I have been using blogs 1822, 1403 and 1926. I have also used some related BPM threads. It seems to be making the RFC call properly, but failing on the response.
<SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_BE
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>No receiver could be determined</SAP:Stack>
These docs show my IB Repository and Directory setups. Can anyone look at them and tell me what is missing? Thanks in advance!
http://webpages.charter.net/kpwendel2/bsmDir.jpg
http://webpages.charter.net/kpwendel2/bsmRep.jpgKeith,
the problem is quite clear.
In your BPM, you have a synchronous interface in your sync send step.
However, in configuration, you have configured two asynchronous interfaces.
To be able to use sync send step in BPM, your RFC needs to be able to send a response back. Then you need to have two message mappings (one for bpm->rfc messages, and other for rfc_response -> bpm_response messages) and a interface mapping between the 2 sync interfaces (bpm_sync_int -> rfc_sync_int) using these 2 message mappings.
Also, some hints:
1. Don't do these mappings in BPM transformation step. You can execute them outside of BPM. Doing this, you will get better performance and also won't need to create abstract interfaces for RFC messages.
2. Use configuration wizard in Integration Directory (first, remove and reimport your BPM in Integration Directory). This way, you avoid different interfaces errors.
Regards,
Henrique. -
Handle timeout exception in rfc call
Dear SAP Experts,
I have been searching for a while and could not find a satisfactory answer to my problem.
I use SAP - CRM and call other SAP and non-SAP systems via RFC.
I need to handle all exceptions, otherwise WEB UI displays a full page exception details, which is unacceptable on a production system.
I have the following piece of code:
CALL FUNCTION FUNCTION_NAME DESTINATION DEST
EXPORTING
S_IMPORT = INPUT_DATA
IMPORTING
S_EXPORT = OUTPUT_DATA
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE err_msg " catch system failure
COMMUNICATION_FAILURE = 2 MESSAGE err_msg " catch communication errors
OTHERS = 99. " catch everything else
It handles most of exceptions, however, it cannot process timeouts. Is there a way to handle timeout in ABAP RFC call? Is timeout exception uncatchable? If so is there a way around?
Can you please suggest some solution as I am running out of ideas.
Regards,
DominikI have found a solution. To approach this I use asynchronous function call.
TRY.
CALL FUNCTION ZZ_TEST_TIMEOUT' DESTINATION lv_dest STARTING NEW TASK 'TIMEOUT_TASK'
CALLING me->callback ON END OF TASK
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE err_msg " catch system failure
COMMUNICATION_FAILURE = 2 MESSAGE err_msg " catch communication errors
OTHERS = 99. " catch everything else
WAIT UNTIL READY EQ 'X' UP TO 55 SECONDS.
IF READY NE 'X'.
RAISE EXCEPTION TYPE CX_TIMEOUT.
ELSE.
WRITE / 'success'.
ENDIF.
CATCH CX_ROOT INTO OREF.
WRITE / 'TIMEOUT EXCEPTION'.
ENDTRY.
callback sets variable READY to abap_true when data is received.
The trick is to use UP TO 55 SECONDS. after wait, which is shorter than the server timeout. This terminates function call and gives opportunity to code your own timeout behavior. -
if you call a SAP-function via RFC from an external RFC-client, the function runs in a SAP dialog-process and a timeout can occur dependent on the runtime.
do anybody know a possibility to run the RFC-function in a batch-workprocess ? perhaps a asynchronous RFC (aRFC) or transactional RFC (tRFC) can guarantee this ? or perhaps I can configure the RFC-connection in any way in SM59 ?
thanks and regards
torsten manhardtYes, you can run an RFC FM in batch. You might also check if you are calling the same RFC multiple times in a loop. If so, see if you can run it once, but return all the data you need in a table.
Rob
Maybe you are looking for
-
SQL*Plus - how to suppress the SQL in a spool file
This is my SQL*Plus script. I thought I had solved the problem, but it is back now and I don't know what I am missing. But I don't want the query at the top of the file. SET SERVEROUTPUT ON SET MARKUP HTML ON -SILENT SET ECHO OFF SET PAGESIZE 33 SET
-
I have a domain name that I changed to point to a different website. But it is still pointing to the old site. When I put the domain name in my iPad, it goes to the new site. But the old site seems to be in the memory of Safari on my computer. Any i
-
How do I re-enable showing the download files history in the download manager window?
System: Windows XP I am trying to re-enable showing/retaining the list of downloaded files in the download manager window. I want to be able to drag and drop directly from that window into a folder of my choosing. (I used to be able to do this, but a
-
IE7 Padding Bug with Spry Effects
I'm having a recurring issue with using the Spry Blind effect in IE7 where, when upon trigerring the Blind, the width of the element being expanded/contracted is expanding out to the right over it's edges. For example. A div with a width of 800px and
-
Serial Numer not working??
I don't know where else to get advice soon. I bought CS3 Wed Standard, installed it and entered the serial number and all worked fine.... for about 3 weeks and then yesterday I was working in DW and closed it and then a while later tried to open it a