RFC Adapter: BAPI_PRODORDCONF_CREATE_TT and Commit
I call BAPI_PRODORDCONF_CREATE_TT through the RFC adapter and I have set the "Commit Control for Single BAPI Calls" flag to make sure COMMIT WORK is done.
If I get the documentation right return types like empty table, S, W and I should lead to COMMIT WORK by calling of BAPI_TRANSACTION_COMMIT afterwards. The actual return type is blank (but the table is not empty -> NUM = 000, so there is only line). Yet the there is still no commit, nothing is being processed.
If I try the same thing on the destination system via a test sequence in SE37 (--> first calling BAPI_PRODORDCONF_CREATE_TT then calling BAPI_TRANSACTION_COMMIT) it works pretty well.
Right now I don't have a clue ...
Thanks for any kind of input.
Cheers,
Andy
In the end I was able to solve the problem but I couldn't figure out how to get i work as explained in the documentation. I've tried all the option (commit control, return values etc.) - actually it was kind of strange: sometimes it worked, sometimes it didn't. So finally I decided to go the old fashioned way (as in 3.0) and made a copy of BAPI_PRODORDCONF_CREATE_TT with a hard coded commit in the end to have a reliable solution:
FUNCTION YAR_BAPI_PRODORDCONF_CREATE_TT.
* begin of insertion AR20090326
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
* IMPORTING
* RETURN =
* end of insertion AR20090326
Another thing: If you want errors to be posted to the confirmation monitor (CO16/CO16N), make sure the POST_WRONG_ENTRIES segment is populated with value '2' either by setting a constant in your PI message mapping or by already delivering it from your shop floor solution (or whatever system you have attached).
Cheers,
Andy
Similar Messages
-
Why is the RFC Adapter so unstable
Hi all,
I have a scenario where an IDOC is sent from the sender system and an RFC enabled Function Module is called on the target system. Sometimes I get an error in the Adapter for no aparent reason. I check the RFC adapter trace file but none of the exceptions was raised and I am not able to see what was the problem.
But, if I restart the RFC Adapter and send the IDOC again, everything's allright. Why? Is there any other trace avilable somewhere? Is there any way to restart the RFC Adapter periodically and automatically?
Thanks and regards,
NunoThis sounds like a bizarre scenario. Why would a Idoc (asynchronous) be calling an RFC (synchronous)?
Unless the RFC is doing update? Then you have more problems. You are mixing your QoS from EO to BE. The delivery is no longer guaranteed. The posting to the RFC could work but XI may not get the acknowledgement - RFC adapter does not do commit so you must have a commit in the remote function. If no acknowledgement is received, do you resend and risk duplicate updates? How do you guarantee EO delivery? The sender system is right in expecting EO for it's outbound Idoc.
In all the training material RFC is intended for data retrieval, not data posting. This is consistently done with Idoc (EO, or EOIO).
I would consider changing the scenario to Idoc->xi->Idoc. -
Hi Everybody,
I'm currently trying to debug a problem with the RFC adapter. Is there a flag that can be set that would allow me to see the actual JCO code being executed by the RFC adapter? I'm in a situation where the RFC is being executed and it's generating an error message but it seems to be data related...however, the data in the XML looks correct so I need to see how the RFC adapter is interpreting the XML message. Of course, I'm definitely open to any other ideas that you may have.
Thanks alot,
...Scottd
p.s.I'm using XI 3.0!Hi, Soctt,
Go to the J2ee Visual Admin tool. Check the service Log configurator. Go to the RFC adapter file and set the trace level to debig mode. Save it. Noe try to test your sceanrio and check the file system for the traces...You have more info from the trace now.
Looks like you have a problem with the data you trying to send thorouch XI.
Regards
Prasad -
RFC adapter with load balacing
Hi Guys,
I have configured RFC adapter for load balancing and i am getting the following error.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Adapter
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIAdapterFramework</SAP:Category>
<SAP:Code area="MESSAGE">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.af.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.af.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to message server host failed Connect_PM TYPE=B MSHOST=sapdev02 GROUP=PUBLIC R3NAME=EDV MSSERV=sapmsEDV PCS=1 ERROR service 'sapmsEDV' unknown TIME Mon Jun 4 17:11:55 2007 RELEASE 700 COMPONENT NI (network interface) VERSION 38 RC -3 MODULE niuxi.c LINE 1725 DETAIL NiPGetServByName2: service 'sapmsEDV' not found SYSTEM CALL getservbyname_r COUNTER 1</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack />
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
any help would be appreciated
Thanks,
sriniHi,
check out these:
1) SM59 - test connection
2) look all the parameters of Receiver RFC adapter configuration
Proper authentication details etc
3) Save the RFC adapter channel and activate the same
4) Refresh the cache for the Adapter metadata. Go to Integration BuilderAdmin>Cache Overview-->Directory -->Adapter Metadata
5) Probably the problem may be becuase of RFC Adapter is not active. Restarting the RFC adapter at J2EE admin level may solve your problem
Hope this helps,
Regards,
Moorthy -
Hi everybody!
In my scenario I post an RFC call to a BAPI (BAPI_GOODSMVT_CREATE). The call succeeds (empty RETURN parameter, material document numer is returned). However, the resulting material document is not available in MB03 - I assume this is due to a missing COMMIT after the RFC call.
However, our system has SP 18 - and I have read that the RFC adapter is able to add a COMMIT after a successful call automatically starting from SP 14. What confuses me is the fact that the descriptions in the online sources state that I should check the "Extended Mode" checkbox in the RFC adapter config screen and then I should check the "Commit..." option. However, when I set the checkbox for extended parameters, I only get a simple table where I can enter property/value pairs.
Has something gone wrong with the upgrade and my RFC adapter doesn't have SP 18 yet? Or am I doing something wrong?
Regards, JoergHi Joerg,
Check in your Repository if you imported the newest adapter metadata.
Check Software Component SAP BASIS - > SAP BASIS 6.40 -> http://sap.com/xi/XI/System
There Adapterobjects -> Adaptermetadata -> RFC
search after the attribute ..<b>singelBapiCommit</b>
Because you dont see a SP version there.
Maybe its better to search afer the label:
<b>Commit handling for singel BAPI-calls</b>
When you dont find the attribute .. try to reimport your BASIS 6.40 Software Componenent.
Regards,
Robin -
Rfc Adapter - commit work and wait
Hi,
Here is my problem:
I'm calling a BAPI specifying 'Commit' in Communication Channel. After this call, in BPM i call another RFC (or BAPI) that needs to modify or use objects created in the first call. The problem is that the work made by the first BAPI wasn't updated in the database yet, and i receive errors in next calls.
Is there anyway to wait for commit?
Jose NevesHi again,
Thanks for your attention...
Well i am using the 'WAIT' between Steps... But this is not how i would like to keep things... i can't assume how long i should wait and i don't want to have unneeded pauses during process (each process has about 18 calls to R3!).
The only solution i see everywhere is Wrap Wrap Wrap... unfortunately this implies changing every BAPI to Z...
I know that RFC Adapter uses JCO... I think in JCO you can start a transaction, using an identifier, passing this ID to every BAPI call, and call commit at the end, but i don't see anyway to do this in XI.
Another solution i have heard around, is about using ABAP Proxy... is that true that i can encapsulate many BAPI calls in a proxy, and execute all in the same session? We have some configuration problems, and we are not using ABAP Proxy so we can't try... But if this is the solution... -
RFC Sender problem between 46D and RFC adapter
Hi,
I have this simple integration scenario where I want to send data to a archiving system;
SAP -> (tRFC) -> XI -> (MQ) -> BizTalk -> (MQ) Arch.syst.
SAP side ***
A Z-program using a Z func. like;
CALL FUNCTION 'ZSD_DCF_SEND_TAG'
IN BACKGROUND TASK
DESTINATION 'XISYSTEM_TRFC_DCF'
EXPORTING
pt_filing_info = gt_filing.
COMMIT WORK AND WAIT.
XI side ***
Both IR and ID is configured correctly, in the development environment everything works just great. I have created a test program where I can define how many calls I will do, looping over the func. call with a commit inside the loop - 500 or more msgs are ok.
The integration scenario is transported to quality enviroment using CMS, and the RFC sender comm.ch. is configured accordingly.
The problem in quality ***
When sending just 1 msg, everything is just fine, message received and delivered to MQ.
When sending >= 2 msgs, the 1 msg is always ok, BUT all others fails due to the following from Adapter monitor;
RFC_HISTORY
- Error: 2006-01-19 10:55:18 CET: com.sap.aii.af.rfc.afcommunication.RfcAFWException: lookup of alternativeServiceIdentifier via CPA-cache failed for channel 'RFCSender_XI0002' (02d4d30de3593874942ed0659add0827, party '', schema 'TechnicalSystem', identifier 'Q93#120')
- OK: 2006-01-19 10:55:17 CET: Message processed for interface ZSD_DCF_SEND_TAG
My sending system is Q93 CLI 505 so I can understand the error, BUT I cannot understand why the RFC adapter is saying the TechnicalSystem is Q93#120 - it should be Q93#505. My Q XI has client 120...
It seems to me that the RFC adapter is kind of confused about the sender..
I have created a OSS message and SAP has looged on and looked into it with both a XI expert and RFC expert without being able to answer - all is configured correctly.
- The SLD config. for bus.system Q93 is ok -
- The bus.system in ID is showing correct vaues for
Adapter Specific Identifiers (SID Q93, client 505)
- Both Dev. and Qual. environment are running on XI 3.0 SP 14 latest patch, RFC component version on the SAP side is identical between dev. and qual. SAP systems
- It doesn't matter which gw I use (Q93 gw or XI gw), the error is persistent
- It doesn't matter if I increase initial conn, max conn.
I have also tried to use qRFC instead, but with the same result.
Anyone using tRFC for asynch. communication from SAP to XI seeing something similar?
Meanwhile, I will do RFC trace on GW and RFC Adapter on AE....
Please, do not say SP15, oss msg for FAQ RFC adapter or links to RFCAdapter config....
best regards
TorsteinHi,
SAP Note 730870 FAQ: XI 3.0 RfcAdapter Q.no 15
<i>Q 15: Whats wrong when the error message "lookup of alternativeServiceIdentifier via CPA-cache failed" shows up while sending a RFC call to the RfcAdapter?
A: A RFC sender channel is located beneath a service within the Integration Directory. Within this service choose "Service" -> "Adapter-Specific Identifiers". The values in the fields "R/3 System ID" and "Client" has to be maintained with the correct values of the system, that sends the RFC call to the RfcAdapter. It normaly only makes sense to have these values filled for services of type "Business System". If maintained in SLD, this fields will be filled automaticaly for services of type "Business System" and can be updated with the button "Compare with System Landscape Directory".</i>
- Give correct appserver and gateway service details in XI.
- Open the service holding the RFC adapter you are trying to use. On the top menu, goto Service -> Adapter Specific Identifiers..
Regards,
Prateek -
Commit Handling In RFC adapter
hi...
Can any one explain what is the commit Handling in RFC Adapter scenario
venkatHi ,
From documentation
<i>"Commit Control for Individual BAPI Calls
If you want to use this communication channel to call BAPIs as remote-enabled function modules that change data in the database, set the indicator.
If executed successfully, the transaction is written to the database by calling the function module BAPI_TRANSACTION_COMMIT explicitly. If an error occurs, the transaction is rolled back by BAPI_TRANSACTION_ROLLBACK.
The result is determined by the value of the field TYPE in parameter RETURN. If successful, the tables are empty and the values , S, I, and W are displayed. All other values are regarded as errors.
To change this setting, set the indicator BAPI Advanced Mode.
In the Successful RETURN-TYPE Values table, enter the values that should lead to a successful execution."</i>
We have a " Commit Control for Individual BAPI Calls" option in RFC reciever adapter to commit the BAPI.
Sekhar -
Hi,
to enable the commit for BAPI calls (for me it was BAPI_SALESORDER_CREATEFROMDAT2), on the corresponding RFC adapter, i
- checked the checkboxes: Advanced Mode and Commit Handling for Single BAPI call
- saved and activated everything
- called again my bapi and got S and W messages and the document no
but at the SAP GUI, it appears, the sales order was not committed.
Any helpful advise is appreciated.
Regards
Gregor
Ps. Please:
- do not point me to the help, i did my homework
- and writing a wrapped bapi is not an option for my eitherHi Gregor,
Sorry i just noticed these points mentioned in your post now....so i have edited my answer as i dont feel that the info i provided earlier will help you.
<i>Ps. Please:
- do not point me to the help, i did my homework
- and writing a wrapped bapi is not an option for my either</i>
Regards,
abhy
Message was edited by: Abhy Thomas -
Multiline BAPI return structure and RFC Adapter
Since SP14 RFC Adapter check return structure of RFC function.
But how it works if BAPI returns multiline BAPIRET2?
Will adapter loop all elements and perfom commit only if <b>all</b> alements don't have errors.I'am about this:
<i>As of SP 14 support for commit handling for single BAPI calls was added to the RfcAdapter receiver channel. If activated in the receiver channel setting, the received XI message will be executed as synchronous RFC (sRFC) in the receiving system. This is also true for asynchronous (QoS EO) XI messages to receive and analyze the execution result by the RfcAdapter.
The received response is parsed by the RfcAdapter to get the BAPI return parameter with name "RETURN". This return parameter can be of BAPIRETURN, BAPIRET1 or BAPIRET2 types. The "RETURN" parameter is checked for the response status (field TYPE) which can take following values:
1. 'S' : Success
2. 'I' : Information
3. 'W' : Warning
4. '' : Empty String
5. 'A' : Abort
6. 'E' : Error
If the response contains one amongst the first four response status then it implies that the BAPI was successful. If the response contains one amongst the last two response then the BAPI failed. If the BAPI "RETURN" parameter is of not of type ABAP structure rather of type ABAP table, a empty table is also considered as successful execution result.
In case of a successful execution the BAPI function module "BAPI_TRANSACTION_COMMIT" is called within the same context to trigger the commit of the BAPI. In case of a failure the BAPI function module "BAPI_TRANSACTION_ROLLBACK" is executed by RFC Adapter which rolls back the changes.</i> -
Sender RFC Adapter AND Rec. File Adapter
Hi
Workflow of my scenario is like this :
<b>SAP R/3 ---> Sender RFC Adapter ---> XI Server -
> Rec. File Adapter -
> Legacy System</b>
I am using Async Inbound interface for this as I dont need any response back & I just need to create file.
I am just picking some data from BAPI & creating a file on a folder in Legacy System.
Now during execution, file is getting created but I am getting dump on SAP R/3 and even when I am using Async communication, response is coming back from Legacy Business System ( service ) & giving an error " <i>No Mapping Program Found</i> " in sxmb_moni.
Kindly suggest how can I avoid getting response from Legacy System. Pls. take note again I am using Async Inbound Interface.
Regards
- Lalit -Hi Lalit,
When your RFC is called from R/3 by default it would be in Sync mode. When this is in Sync mode it obviously will expect a response and where as in your scenario XI dose'nt give any response and there is no mapping for that and I think that is the reason you are getting that error.
So when your Sender RFC is triggered it will like this in ABAP
CALL Function "Function Name" <SM59 Destination>
and this is Sync call. To make it Async i should be
CALL Function "Function Name" IN BACKGROUND TASK <SM59 Destination>
Hoep this helps
Thanks,
Prakash -
Soap Sender and RFC Adapter receiver getting APPLICATION_ERROR
Hi, all,
I have a webservice soap sender and RFC Adapter receiver scenario, it works fine with RFC "RFC_SYSTEM_INFO", When i tried the RFC "RFC_READ_TABLE", getting the following error message, <SAP:Code area="RFC_ADAPTER">APPLICATION_ERROR</SAP:Code> in
SXI_MONITOR, in webservice client, i am getting error message like this:
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<rfc:ZZTEST_RFC_READ_TABLE.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
<Name>TABLE_NOT_AVAILABLE</Name>
<Text>QUERY_TABLE not active in Dictionary</Text>
</rfc:ZZTEST_RFC_READ_TABLE.Exception>
Thanks a lot!Hi
Its not compulsory but its good to wrap it as Z object.
Well if you are facing problem with SOAP data. Then try to do one thing. Check with the data you received from SOAP message. If this works
Then try to check in mapping is it passing the data correctly or not. With this check with the user authorization PIAPPLUSER. if its having less authorizations to execute this BAPI in ECC
Thanks
Gaurav -
Hi All,
In my scenario, i am sending file from a database system to SAP system. Here I am using JDBC/ webserveices adapter at outbound side to query the database and FILE and RFC at inbound side to send file and workflow notification.
my requirement is to send file as batch to SAP system(after business hours), send workflow notiication to the responsible person, and when the file is stored on application server then only i should send the notification to the person.
I know this can be acheived by BPM by using wait step but I am not sure how to do it only for RFC adapter to kick the notification once the file has stored and confirmed.
Can anyone help me in this issue.
Reg
Sre.>
sre wrote:
> Hi All,
>
> In my scenario, i am sending file from a database system to SAP system. Here I am using JDBC/ webserveices adapter at outbound side to query the database and FILE and RFC at inbound side to send file and workflow notification.
> my requirement is to send file as batch to SAP system(after business hours), send workflow notiication to the responsible person, and when the file is stored on application server then only i should send the notification to the person.
>
> I know this can be acheived by BPM by using wait step but I am not sure how to do it only for RFC adapter to kick the notification once the file has stored and confirmed.
>
> Can anyone help me in this issue.
>
> Reg
> Sre.
There are two options,
1. With BPM you can have the send step for file request an acknowledgment and then have the send step for the RFC call after the previous file send step.
2. Without BPM, use the same Business system (single receiver det.) and have multiple interface determination (file&RFC). Use the option maintain order at runtime and have the file interface above the RFC. This will act like an EOIO. -
How to use IDOC and RFC adapter in 1 scenario?
We have AAA field and BBB field and we want to send AAA field to receiver sap system using IDOC adapter and BBB field to receiver sap system using RFC adapter. But how to use IDOC and RFC adapter in 1 scenario and how to map and what are the design and configuration objects we require to create?
To achieve this you have to use
Two Interface Determinations
Two Communication Channels (IDOC & RFC)
& Two Receiver Aggrements.
Use the Enhanced Interface determination and give your conditions there. Based on you condition your interface mapping will be triggered and data will be sent to IDOC & RFC respectively. -
Hi!!
I try to sent a message from R3 (RFC) to XI and then to File Adapter.
I configure all but I've problem with "Service" Rfc2XmbService.
I don't understand how configure that!!
1) with which gateway I configure it?!?!
And where?!?
In XI System?!?!
With XI System Number(sapgw<sysnr>)?!?!
2) in R3 when I launch the RFC what destination I use?!?
I must create a new TCP/IP destination?!?!
With Rfc2XmbService?!?
And the Gateway?!?
I'm not a Basis and I want only find a solution for verify the configuration (mine and the system)!!
Thanks to all,
Mik
Message was edited by: Michele UgattiHi Michele,
please use XI version in subject (i.e. XI20: Rfc Adapter..)
I think that XI 2.0 SR1 Configuration Guide contains quite detail description. See http://service.sap.com/instguides->SAP Components->SAP Exchange Infratsructure->Release 2.0 SR1 ->Configuration Guides or URL https://websmp105.sap-ag.de/~sapidb/011000358700002429232003E
Jiri
Maybe you are looking for
-
Missing fonts in FrameMaker 9 even after installing Adobe Type Manager
Hi, We are using Formata family fonts in our templates. We import the templates and don't see the font family. We then installed the Adobe Type Manager and tried reimporting the template. No results. We then edited the makers.ini file and added the F
-
Can't import audio in AE 7.0
After Effects Freezes up when I try to import an .mp3 file (I've tried multiple) ASlso I noticed that when I try to import audio, it tries to import it as a footage item, and there's no option to change it to just audio. Thanks all
-
Here's a bit of a puzzle. First a bit of history..... A year or two ago, I bought a Dazzle video digitizer and it came with Studio 9. The plan was to digitize my older VHS tapes that contain lots of early footage from music events I have been associa
-
Recover HTML DB Aplication From a Oracle Full Backup
I lose all my instance becauae a disk problem, but i Have a Full Oracle Backup, I nned to recover my HTML DB Aplication , What I did I restore the FLOWS_FILES Schema,FLOWS_010600 Schema and User WorkSpace Schemas but the same Packege on the FLOWS_010
-
Finalizing JDBCConnectionWrapper on unclosed connection! - java.lang.Except
Hello Guru's, on our SAP NetWeaver AS, Java with Enterprise Portal, we have the follow error message very often in our default trace. what can we do to solve this problem? finalizing JDBCConnectionWrapper on unclosed connection! - java.lang.Exception