Have a look at my RFC call, it doesn't return anything

Hi all,
In my project, I create a RFC Model named 'SCO' which will call bapi function 'BAPI_SALESORDER_CREATEFROMDAT1', if successfully a SALEDOCUMENT should return.
below is the code in my custom controller
  public void wdDoInit()
    //@@begin wdDoInit()
          Bapi_Salesorder_Createfromdat1_Input input =
               new Bapi_Salesorder_Createfromdat1_Input();
          wdContext.nodeCSOC_Input().bind(input);
          input.setOrder_Header_In(new Bapisdhead());
          input.addOrder_Items_In(new Bapiitemin());
          input.addOrder_Partners(new Bapipartnr());
    //@@end
public void executeBapi( )
    //@@begin executeBapi()
          try {
               wdContext.currentCSOC_InputElement().modelObject().execute();
          } catch (WDDynamicRFCExecuteException e) {
               // TODO Auto-generated catch block
               System.err.println(e.getMessage());
               e.printStackTrace();
          } finally {
//               wdContext.nodeCSOC_Input().invalidate();
    //@@end
In my view(TestSOCView) I mapped a node named SOC_Input has the structure
Order_Header_In
-Distr_Chan
-Division
-Doc_Type
-Sales_Org
Order_Partnr_In
-Partn_Numb
-Partn_Role
Order_Items_In
-Material
-Req_Qty
Output
-Return
--Message
--Type
-Salesdocument
I have a very simple view which has only one button and two textview (one bind to Output-Salesdocument, another to Output-Return-Message)
In my action method, I have the code
  public void onActionCreateSO(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionCreateSO(ServerEvent)
          IOrder_Header_InElement newHeader =
               wdContext.currentOrder_Header_InElement();
          IOrder_PartnersElement newPartner =
               wdContext.createOrder_PartnersElement(new Bapipartnr());
          IOrder_Items_InElement newItem =
               wdContext.createOrder_Items_InElement(new Bapiitemin());
          newHeader.setSales_Org("1000");
          newHeader.setDoc_Type("OR");
          newHeader.setDistr_Chan("10");
          newHeader.setDivision("00");
//          wdContext.nodeOrder_Header_In().addElement(newHeader);
          newPartner.setPartn_Role("SP");
          newPartner.setPartn_Numb("1000");
          wdContext.nodeOrder_Partners().addElement(newPartner);
          newItem.setMaterial("TEST2");
          newItem.setReq_Qty("00001000");
          wdContext.nodeOrder_Items_In().addElement(newItem);
          wdThis.wdGetSOCControllerController().executeBapi();
    //@@end
This is all my implementation, I dont know why there's always nothing retrieved, even no Return Message.
I of course have the right JCO connection, if not, this view will not display.
My wonder is my initilization for two table maybe wrong:
input.addOrder_Items_In(new Bapiitemin());
input.addOrder_Partners(new Bapipartnr());
because I know there's a method
set<Node>(AbstractList)
but this is not java.util.AbstractList, I dont know how to initiate this list.
And if I follow the turtorial which will enable the line after execution
wdContext.nodeCSOC_Input().invalidate();
This will make my application run only one time, the second time a NullPointerException will be thrown. So there's also a question: what's the usage of this line?
Any one have a look at my problem? Thanks in advance
And at last,
Happy New Year to everyone.
Wish you all a nice new year.
best regards,
William

Hello William,
Try using the following code:
public void wdDoInit()
//@@begin wdDoInit()
    Bapi_Salesorder_Createfromdat1_Input input =
    new Bapi_Salesorder_Createfromdat1_Input();
//@@end
public void onActionCreateSO(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionCreateSO(ServerEvent)
<b>/*** Instantiate the Structure ***/
/// <Name of the Structure> = <Order_Header_In></b>   Order_Header_In newHeader =
    new Order_Header_In();
    newHeader.setSales_Org("1000");
    newHeader.setDoc_Type("OR");
    newHeader.setDistr_Chan("10");
    newHeader.setDivision("00");
    wdContext.currentBapi_Salesorder_Createfromdat1_Input().setOrder_Header_In(newHeader);
<b>*** Instantiate the Structure ***/
/// <Name of the Structure> = <Order_Partners></b>    Order_Partners newPartner = new Order_Partners();
    newPartner.setPartn_Role("SP");
    newPartner.setPartn_Numb("1000");
    wdContext.currentBapi_Salesorder_Createfromdat1_Input().modelObject().addOrder_Partners(newPartner);
<b>*** Instantiate the Structure ***/
/// <Name of the Structure> = <Order_Items_In></b>    Order_Items_In newItem = new Order_Items_In();
    newItem.setMaterial("TEST2");
    newItem.setReq_Qty("00001000");
             wdContext.currentBapi_Salesorder_Createfromdat1_Input().modelObject().addOrder_Items_In(newItem);
    wdThis.wdGetSOCControllerController().executeBapi();
//@@end
This will work.
<b>
Please reward appropriate points</b>
Bala

Similar Messages

  • Strange response time for an RFC call viewed from STAD on R/3 4.7

    Hello,
    On our R/3 4.7 production system, we have a lot of external RFC calls to execute an  abap module function. There are 70 000 of these calls per day.
    The mean response time for this RFC call is 35 ms.
    Some times a few of them (maybe 10 to 20 per day) are way much longer.
    I am currently analysing with STAD one of these long calls  which lasted 10 seconds !
    Here is the info from STAD
    Response time :                10 683 ms
    Total time in workprocess : 10 683 ms
    CPU time  :                               0 ms
    RFC+CPIC time :                       0 ms
    Wait for work process           0 ms
    Processing time           10.679 ms
    Load time                            1 ms
    Generating time                   0 ms
    Roll (in) time                        0 ms
    Database request time         3 ms
    Enqueue time                      0 ms
    Number      Roll ins            0
                     Roll outs           0
                     Enqueues         0
    Load time   Program             1  ms
                      Screen              0  ms
                     CUA interf.          0  ms
    Roll time    Out                 0  ms
                      In                  0  ms
                    Wait                0  ms
    Frontend    No.roundtrips       0   
                      GUI time            0  ms
                      Net time            0  ms
    There is nearly no abap processing in the function module.
    I really don't uderstand what is this  10 679 ms processing time especially with 0 ms cpu time and 0 ms wait time.
    A usual fast RFC call gives this data
    23 ms response time
    16 ms cpu time
    14 ms processing time
    1 ms load time
    8 ms Database request time
    Does anybody have an idea of what is the system doing during the 10 seconds  processing time ?
    Regards,
    Olivier

    Hi Graham,
    Thank you for your input and thoughts.
    I will have to investigate on RZ23N and RZ21 because I'm not used to use them.
    I'm used to investigate performance problems with ST03 and STAD.
    My system is R/3 4.7 WAS 6.20. ABAP and BASIS 43
    Kernel 6.40 patch level 109
    We know these are old patch levels but we are not allowed to stop this system for upgrade "if it's not broken" as it is used 7/7 24/24.
    I'm nearlly sure that the problem is not an RFC issue because I've found other slow dialog steps for web service calls and even for a SAPSYS technical dialog step  of type <no buffer>. (what is this ?)
    This SAPSYS dialog step has the following data :
    User : SAPSYS
    Task type : B
    Program : <no buffer>
    CPU time                       0 ms
    RFC+CPIC time              0 ms
    Total time in workprocs    5.490 ms
    Response time               5.490 ms
    Wait for work process           0 ms
    Processing time             5.489 ms
    Load time                            0 ms
    Generating time                   0 ms
    Roll (in+wait) time                0 ms
    Database request time          1 ms ( 3 Database requests)
    Enqueue time                       0 ms
    All hundreds of other SAPSYS <no buffer> steps have a less than 5 ms response time.
    It looks like the system was frozen during 5 seconds...
    Here are some extracts from STAD of another case from last saturday.
    11:00:03     bt1fsaplpr02_PLG RFC     R     3     USER_LECKIT     13     13     0     0
    11:00:03     bt1sqkvf_PLG_18      RFC     R     4     USER_LECDIS     13     13     0     0
    11:00:04     bt1sqkvh_PLG_18      RFC     R     0     USER_LECKIT     19     19     0     16
    11:00:04     bt1sqkvf_PLG_18      RFC     R     4     USER_LECKIT     77     77     0     16
    11:00:04     bt1sqkve_PLG_18      RFC     R     4     USER_LECDIS     13     13     0     0
    11:00:04     bt1sqkvf_PLG_18      RFC     R     4     USER_LECDIS     14     14     0     16
    11:00:05     bt1sqkvg_PLG_18      RFC     R     0     USER_LECKIT     12     12     0     16
    11:00:05     bt1sqkve_PLG_18      RFC     R     4     USER_LECKIT     53     53     0     0
    11:00:06     bt1sqkvh_PLG_18      RFC     R     0     USER_LECKIT     76     76     0     0
    11:00:06     bt1sqk2t_PLG_18      RFC     R     0     USER_LECDIS     20     20     0     31
    11:00:06     bt1sqk2t_PLG_18      RFC     R     0     USER_LECKIT     12     12     0     0
    11:00:06     bt1sqkve_PLG_18      RFC     R     4     USER_LECKIT     13     13     0     0
    11:00:06     bt1sqkvf_PLG_18      RFC     R     4     USER_LECKIT     34     34     0     16
    11:00:07     bt1sqkvh_PLG_18      RFC     R     0     USER_LECDIS     15     15     0     0
    11:00:07     bt1sqkvg_PLG_18      RFC     R     0     USER_LECKIT     13     13     0     16
    11:00:07     bt1sqk2t_PLG_18      RFC     R     0     USER_LECKIT     19     19     0     0
    11:00:07     bt1fsaplpr02_PLG RFC     R     3     USER_LECKIT     23     13     10     0
    11:00:07     bt1sqkve_PLG_18      RFC     R     4     USER_LECDIS     38     38     0     0
    11:00:08     bt1sqkvf_PLG_18      RFC     R     4     USER_LECKIT     20     20     0     16
    11:00:09     bt1sqkvg_PLG_18      RFC     R     0     USER_LECDIS     9 495     9 495     0     16
    11:00:09     bt1sqk2t_PLG_18      RFC     R     0     USER_LECDIS     9 404     9 404     0     0
    11:00:09     bt1sqkvh_PLG_18      RFC     R     1     USER_LECKIT     9 181     9 181     0     0
    11:00:10     bt1fsaplpr02_PLG RFC     R     3     USER_LECDIS     23     23     0     0
    11:00:10     bt1sqkve_PLG_18      RFC     R     4     USER_LECKIT     8 465     8 465     0     16
    11:00:18     bt1sqkvh_PLG_18      RFC     R     0     USER_LECKIT     18     18     0     16
    11:00:18     bt1sqkvg_PLG_18      RFC     R     0     USER_LECKIT     89     89     0     0
    11:00:18     bt1sqk2t_PLG_18      RFC     R     0     USER_LECKIT     75     75     0     0
    11:00:18     bt1sqkvh_PLG_18      RFC     R     1     USER_LECDIS     43     43     0     0
    11:00:18     bt1sqk2t_PLG_18      RFC     R     1     USER_LECDIS     32     32     0     16
    11:00:18     bt1sqkvg_PLG_18      RFC     R     1     USER_LECDIS     15     15     0     16
    11:00:18     bt1sqkve_PLG_18      RFC     R     4     USER_LECDIS     13     13     0     0
    11:00:18     bt1sqkve_PLG_18      RFC     R     4     USER_LECDIS     14     14     0     0
    11:00:18     bt1sqkvf_PLG_18      RFC     R     4     USER_LECKIT     69     69     0     16
    11:00:18     bt1sqkvf_PLG_18     RFC     R     5     USER_LECDIS     49     49     0     16
    11:00:18     bt1sqkve_PLG_18     RFC     R     5     USER_LECKIT     19     19     0     16
    11:00:18     bt1sqkvf_PLG_18     RFC     R     5     USER_LECDIS     15     15     0     16
    The load at that time was very light with only a few jobs starting :
    11:00:08 bt1fsaplpr02_PLG RSCONN01                     B 31 USER_BATCH     39
    11:00:08 bt1fsaplpr02_PLG RSBTCRTE                     B 31 USER_BATCH     34
    11:00:08 bt1fsaplpr02_PLG /SDF/RSORAVSH                B 33 USER_BATCH     64
    11:00:08 bt1fsaplpr02_PLG RSBTCRTE                     B 33 USER_BATCH     43
    11:00:08 bt1fsaplpr02_PLG RSBTCRTE                     B 34 USER_BATCH     34
    11:00:08 bt1fsaplpr02_PLG RSBTCRTE                     B 35 USER_BATCH     37
    11:00:09 bt1fsaplpr02_PLG RVV50R10C                    B 34 USER_BATCH     60
    11:00:09 bt1fsaplpr02_PLG ZLM_HDS_IS_PURGE_RESERVATION B 35 USER_BATCH    206
    I'm thinking also now about the message server as there is load balancing for each RFC call ?
    Regards,
    Olivier

  • RFC call  - issue

    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,
    Rajbarath

    Hi,
    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

  • 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,
    Santhosh

    Hi,
    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

  • RFC call in Servlet problem

    Hello,
    I have servlet in my web application module, and I try to make RFC call, within it. I use com.sap.mw.jco.*.
    I compile it but when run the server respond with
    Application error occurs during processing the request.
      Details:   java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO  The ID of this error is
    Exception id: [000C763FB7EE00390000001F000007E800043A148A45F9B4
    I think that I should packaged the jco lib in my war and make it available to servlet, but how can I do this ?
    Thank for any help.

    Hello,
    Thanks a lot Maksim, Bhavik, you helped me.
    I try to make a reference and now the library ClassNotFound error is gone.
    But now I have a next problem with RFC call, I also wrote it to post (Webdynpro VS. Java Servlet). I have a code in which I make RFC call. When I embed this code into regular Java aplication and run, it will return results as I expect. (of course I must run it with jco lib .jar in classpath). But when I run it on my servlet, I got an exception with message: "'mshost' missing"
    I don't know what this supposed to mean, because I run the mentioned application, also from PC where I have j2ee engine installed and it work.
    If you can please help.
    (and thank for your help again (Maksim, Bhavik))

  • RFC call failed : Error when opening an RFC connection

    Hi,
    As a result of "Start Data Collection" operation in the t-code RZ70, I have got this error.
    "RFC call failed : Error when opening an RFC connection"
    Others things are with success message.
    Regards,
    Bala Raja

    hi
    check this links
    http://help.sap.com/saphelp_nw04s/helpdata/en/9b/da0f41026df223e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/9b/da0f41026df223e10000000a155106/frameset.htm
    also check Tcode: SLDAPICUST.
    run tcode SLDCHECK? any error?
    Thanks
    Rodrigo
    PS: If useful reward points

  • My iphone 6 connects to the car via bluetooth, the music works good, but the phone calles does not work.  It looks like it is working but doesn't.  I have tried in my Hyundai and a Dodge rent car and get the same results.  I updated the last 8.0.2.

    My iphone 6 connects to the car via bluetooth, the music works good, but the phone calls does not work.  It looks like it is working but doesn't.  I have tried in my Hyundai Sonata and a Dodge Dart rent car and get the same results.  I updated the last 8.0.2.  It worked the first day i had the phone, and then i updated to Ios 8.0.2 and it quit working.
    Now when i get in the car, it acts like it is connected and makes the same call it was on after syncing to bluetooth, but it really isn't on a call.  This is happening on both cars.
    Does anyone know if this is the phone and i need to take it to Apple or if there is an issue that Apple is working on getting a fix for?
    My son in law has the exact same phone as me, we both got the on 10/6, he had a Dodge Dart and his is working via bluetooth.
    Someone HELP please, as i consider this a safety issue by not having my calls go to bluetooth.

    We had the same problem, but figure out the solution.
    You MUST have at least 1 song added to your ITUNE!  After you add a free song, then everything else should work as normal!
    Hope this helps!

  • Best practice on integration message augmentation via user exit or rfc call

    I am looking for documentation that would provide best practices on whether to use user exits to augment the data on an IDOC or to forward the standard SAP produced IDOC to PI where rfc calls are made to augment the data as required for the specific target system.
    I am sure there are pros and cons for both solutions, but I am hesitant to use user exits since we now have moved the knowledge of what a target system wants from the integration layer to the source layer.  If a second target system comes along in the future, the user exit becomes more complicated with additional target specific requirements. 
    Any links to best practice documentation on this subject is greatly appreciated.
    Edited by: Sean Sweeney on Oct 15, 2009 6:59 PM

    Hi Steve,
    Might be trying for solution for a long time, If i understood your question clear let me clarify you few points.
    You are trying to access the bex query which is designed with the exit's in the background based on the logic and trying to call the entire dimensions and key-figures in a single connection. Then you are trying to map those data in the charts.
    Steve, try to make more connections based upon the logic and split them. use the same query but split them by sales per customer group, sales per day, sales per week by making three different connections and try. You can merge the prompts from all connections.
    Hope this Helps!!!
    Sorry if i misunderstood your question.
    --SumanT

  • RFC CALL canu00B4t execute Functions module ??

    Hello everybody,
    I have a problem with a Function module. The function module should open an link (it´s a Link of a Webdynpro Application).
    I have the following constellation.
    Bex Analyzer execute a RFC Call to open/execute the Function module. The Function module should open a URL (Webdynpro Application), but it doesn´t work.
    I don´t know why. The Connection of the RFC Call is ok. I have tested the RFC with any Object´s and it works (He "answered").
    What ist wrong in the Function Module, why can´t the FM open the URL??!
    Simple Code of Function Module
    call method cl_gui_frontend_services=>execute
    exporting
    document = 'URL'
    exceptions
    others = 1.
    Endfunction.
    A other test
    *CALL FUNCTION 'PRGN_GENER_EXECUTE_URL'
    *EXPORTING
    *NODE_DATA = 'url'.
    The VBA Code for RFC
    Sub Login()
    Dim functionCtrl As Object
    Dim sapConnection As Object
    Dim theFunc As Object
    Dim sReturn As Boolean
    Dim l_export As String
    Dim objQueryTab As Variant
    Set functionCtrl = CreateObject("SAP.Functions")
    Set sapConnection = functionCtrl.Connection
    sapConnection.Client = "100"
    sapConnection.user = "xy"
    sapConnection.Language = ".."
    sapConnection.SystemNumber = "xy"
    sapConnection.ApplicationServer = "xy"
    sapConnection.Language = "x"
    sapConnection.codepage = "xy"
    sapConnection.Destination = "xy"
    sapConnection.System = "x"
    sapConnection.SystemID = "......"
    sapConnection.Password = "xy"
    sapConnection.autologon = 1
    If sapConnection.Logon(0, True) <> True Then
    MsgBox "Keine Verbindung"
    Else
    Set theFunc = functionCtrl.Add("SS_RFC_URL_TEST")
    objQueryTab = "200"
    theFunc.Exports("I_PAR") = objQueryTab
    sReturn = theFunc.call
    If sReturn = True Then
    objQueryTab = theFunc.Imports("E_PAR")
    End If
    sapConnection.logoff
    End If
    End Sub
    >E_PAR is the Exportparameter of the Function module
    >I_PAR is the Importparameter of the Function module
    Thanks
    Edited by: Schwarzenberger Stefan on May 9, 2011 1:59 PM

    Hi, I have a similar situation.  Within VBA I am calling the RFC 'RFC_CALCULATE_TAXES_DOC'.  This RFC is used to communicate with external tax software like Taxware; it gets applicable tax rates, amounts, etc. based on tax jurisdiction code and other data.  The RFC is remote-enabled (has to be to talk to Taxware).
    This RFC requires an RFC Destination in order to work.  Within VBA, I have not been able to figure out the syntax required to enter the Destination name.  I saw Shreeram's post saying to use CALL FUNCTION 'PRGN_GENER_EXECUTE_URL' DESTINATION <RFC Destination Name>.  However, this looks like ABAP syntax and not VBA syntax.
    Does anybody know if this is possible within VBA?  Sounds like it's not but wanted to double-check.
    Thanks!!
    Kory Squire
    <<Removed email address>>
    Edited by: Matt on May 18, 2011 6:37 AM

  • RFC call from ECC to SCM -- Debug Steps required

    Hello,
    The steps being done for this issue is:-
    1) In ECC system ,CN22 Transaction Code (Change Networks) --> Click on Schedule (at the Header) and click on SAVE
    2) This seems to trigger an RFC call to SCM server (as per the trace log).
    3) From SCM, it comes back to ECC server as User 'BATCHRFC'. This has been defined in SM59 correctly.
    4) BATCHRFC in ECC system calls an RFC FM 'CIF_PJ_INBOUND' and changed the status of networks to DSEX (date set by External system)
    We are trying to understand why is the RFC call being made? I can debug the FM in ECC when an external breakpoint is used.
    However, I want to know where in ECC is the RFC call made (to SCM), and how? How can I control it as we do not want this to happen? How can I debug to understand how an RFC call is made?
    Your views would be appreciated.
    Regards,
    Sanjiv

    Hi,
        What you do is, enter the Tcode, CN22, then in Command window activate debugger by entering /H
    It takes u to debugger, from menu > utilities set a break point at Satetment Call Function, it will stop at all the Function modules in debugger, so you can look for the RFC FM in the program where it is called.
    And also look for setting in debugger, may be u have some options for RFC FM.
    Regards
    Bala Krishna

  • Message transfer between R/3 to XI By RFC call

    Hi all,
    I am trying to pass some parameters to XI by making an RFC call from R/3.In sm59 the connection is working fine with the RFC destination declared.I have created an RFC enabled function module and  it has   5 import parameters .The FM doesn't contain any query as i have queried in the calling program. The program as followes;
    DATA  : IT_ZXIRFC LIKE ZXIRFC.
    DATA: IS_BILL_NUM LIKE ZXIRFC-BILL_NUM,
          IS_BUYERVATNUM LIKE ZXIRFC-BUYERVATNUM,
          IS_BUYERACCNUM LIKE  ZXIRFC-BUYERACCNUM,
          IS_PRODUCTDES LIKE  ZXIRFC-PRODUCTDES,
          IS_BUYERNAME LIKE ZXIRFC-BUYERNAME.
    SELECT * FROM ZXIRFC INTO  IT_ZXIRFC
             WHERE BILL_NUM = 'ABC1234'
               AND BUYERVATNUM = 'CH456789'
               AND BUYERACCNUM = 'THE456789'.
    ENDSELECT.
           IS_BILL_NUM = IT_ZXIRFC-BILL_NUM .
           IS_BUYERVATNUM = IT_ZXIRFC-BUYERVATNUM.
           IS_BUYERACCNUM = IT_ZXIRFC-BUYERACCNUM.
           IS_PRODUCTDES = IT_ZXIRFC-PRODUCTDES.
           IS_BUYERNAME = IT_ZXIRFC-BUYERNAME.
    CALL FUNCTION 'ZRFC_XI_TEST1' IN BACKGROUND TASK  DESTINATION 'SAP_X3ATEST'
      EXPORTING
        I_BILL_NUM          =  IS_BILL_NUM
        I_BUYERVATNUM       =  IS_BUYERVATNUM
        I_BUYERACCNUM       =  IS_BUYERACCNUM
        I_PRODUCTDES        =  IS_PRODUCTDES
        I_BUYERNAME         =  IS_BUYERNAME
    COMMIT WORK.
    I am getting notthing in moniter of XI when i excecute this program.
    Please have a look at this and suggest me the solution.
    Thank you,
    Best regards,
    Priya parmeshwar.

    Hi,
    In SM59 my RFC destination is working fine.I have done the configuration according to Michal' blog
    https://weblogs.sdn.sap.com/pub/wlg/1438.The [original link is broken] [original link is broken] [original link is broken] [original link is broken] RFC  destination details as followes:
    RFC destination :  SAP_X3ATEST
    Gateway Host :   ld8022
    Gateway service: sapgw22
    Program Id : RFCTEST1
    and here i have checked the Registered server program.
    The same data has been updated in communication channel  with a sender RFC adapter type.
    Thankx,
    Priya

  • XI RFC call failing

    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 Madraswala

    Hi 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.

  • How to transfer the webservice username/PW to the RFC call in PI 7.0

    Hey,
    I would like to transfer the username/PW, which is supplied, when a specific web service is called. The web service is supposed to be exposed on PI 7.0 and will transfer the request to a function module in ECC 6.0 via an RFC communication channel in PI 7.0. Typically, you specify the username/PW in the RFC comm. channel in PI, but how do I dynamically specify the received username/PW from the web service call in that RFC call to ECC 6.0? Maybe SAML is the answer, but it seems a bit cumbersome in my case.
    BR
    Mikael

    Hi Michal
    Thanks for the link. I have been looking for blogs/material on how, in a mapping in PI, to place the value of SRemoteUser in a field in the target message but without luck. Is it really the case, that I have to use batch input in order for it to work?
    What is wrong with this code in a UDF where there is no input variable. Will it work?:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "SRemoteUser");
    String WSuser = conf.put(key);
    return WSuser;
    Or should I skip this UDF all together and in stead use Variable Transport Binding and set XHeaderName1 = SRemoteUser   ?
    Looking forward to your book on iDocs in August
    Mikael

  • RFC call From BPM

    Hi,
    I have a  scenario where I need to access a Function Module from BPM for certain business validations. My FM is in XI and I need to invoke that FM from BPM. How can we do that ? I am trying an RFC call but it gives me an error "No identifier defined for the system".
    Pl advise, where am I wrong OR if there is a better way to do that.
    Thanks,
    Sid

    This doesn't look like an issue for BPM.  Please check whether the connection is working fine by testing a call to the RFC in a simple scenario(file to RFC or whatever).
    In BPM all you need to do is a synchronous send step with abstract message type defined for both request and response structures of the FM . And in ID a receiver determination+channel and all for this step.
    Best of luck...

  • Sync RFC call from XI

    Hi
    I've a requirement for a XI Inbound Order that I need to check for each MATNR on the Order Line it's associated Division (SPART).  Once I know the Division I'll then split up the Order per Division.
    Can I from my BPM collect the message, call a RFC via Send Sync Step to return the Divisions and then continue with my transformation ?
    I was looking for an example of how to call an RFC from a BPM.  NOT using Sync<>Async bridge.
    Does anybody have a link to a blog etc for that.?

    Hi,
    You can either use RFC lookup in mapping or use Sync RFC call in the BPM.
    Refer the Blog RFC Scenario using BPM --Starter Kit By Arpith Seth for Sync RFC call in BPM.
    Refer this document [Mapping Lookups: Remote Function Calls API|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439] for making RFC lokup from mapping.
    Thanks
    SaNv...

Maybe you are looking for