Calling RFC problem...

Hi everyone,
I have a real strange problem trying to call custom RFC via WebDynPro.
If I call for example the BAPI_HELPVALUES_GET passing table and structure...everything works.
But if I call a simple custom RFC, it seems that the RFC gets emty tables...
Can someone help with this issue....
Thanks in adavnce for any help.

Hi Vijith,
I did write the wdContext.nodeOutput.invalidate();
after the execution.
Here is the description of this simple RFC :
- <b>import</b> : 2 parameters ->
                sname1 type char6 (pass by value checked)
                sname2 type char10 (pass by value checked)
- <b>export</b> : 1 parameter ->
                ex_msg type text100 (pass by value checked)
- <b>tables</b> : 1 parameter ->
                mytable like mytype
where mytype is a type that I created which is composed of 2 fields : fname type char6 and lname type char10.
I repeat that any other standard BAPI, I success calling them.
Do you see something wrong with that ?
Thanks for the help.

Similar Messages

  • RFC call having problem while calling from webdynpro

    Hi ,
    I am facing a strange problem .In my webdynpro i have a RFC function module . the structure is like this.
    Loop.
    <GET current system>.
    TRY.
    call <RFC FUNCTION MODULE> DESTInation <own system> .
    ENDTRY.
    ENDLoop
    With in the Function module we have created  a BDC seesion.
    Here the loop is running for 10 times .for the first time it is the rfc call is perfect and a session is created in sm35.
    For the second loop run the system is going to hang.and when i checked sm35 the next day 1 session is created (for the second loop)
    Like this the session are created in different days .And the session created times are like00:00:04,00:00:08 etc.
    I have checked if any hold time is there for the session but there is noting like this .
    And i digged more and checked in SM50 there the call is running in background and it is connected some other system though i have given the target system as own system.
    please advice me about this and how to find the root cause for this.
    thanks

    Thanks for your reponse .
    Here the problem is it has already been developed now the Bug is the function call is still running and the sessions created as
    below
    17.06.2010     00:00:30     SAPMSSY1
    17.06.2010     00:00:28     SAPMSSY1
    16.06.2010     00:00:36     SAPMSSY1
    15.06.2010     01:21:46     SAPMSSY1
    15.06.2010     00:59:33     SAPMSSY1
    15.06.2010     00:01:06     SAPMSSY1
    Now teh problem is why the sessions are not created at the same time i executed it.ie,on 11:06:2010.
    so,please let me know why is call is taking that much long time .(it is very rare for RFC call for such a long time ).

  • Problem when call rfc using function control

    i try to call rfc using functin control but error "wdtfuncs error '800a03eb' Fail to call Remote Function Module" be popuped.
    my code like that:
    Set objSAPFunction = Server.CreateObject("SAP.Functions")
              Set objSAPFunction.Connection = objSAPConn.NewConnection
              IsLogOnSAP = False
              If objSAPFunction.Connection.Logon(1, True) Then
                   IsLogOnSAP = True
                   'Upload Cancel Invoice
                  Set objFunc = objSAPFunction.Add("ZRFC_SD_BILLINGDOC_GET1")
                   Set objISGR1 = objFunc.exports("DOCUMENT")
                   Set objISGR2 = objFunc.exports("COMPANYCODE")
                   Set objISGR3 = objFunc.exports("YEAR")
                   set objOSGR1 = objFunc.imports("NETVALUE")
                   set objOSGR2 = objFunc.imports("CURRENCY")
                   set objOSGR3 = objFunc.imports("DATE")
                   set objOSGR4 = objFunc.imports("CUSTOMERCODE")
                   set objOSGR5 = objFunc.imports("CUSTOMERNAME")
                   objISGR1.value = cstr(doc)
                   objISGR2.value = cstr(companycode)
                   objISGR3.value = cstr(year)
                   bResult = objFunc.Call          <<<<< Error
                   GetDataFromSAP = Array(cstr(objOSGR1),cstr(objOSGR2),cstr(InvDateFormat(objOSGR3)),cstr(objOSGR4),cstr(objOSGR5))
                   If IsLogOnSAP Then
                             objSAPFunction.Connection.Logoff
                        End If
              End If
    These code can run on the A machine, but do not run on the B machine. And both two machines have been installed SAP FrontEnd.
    which problem about it?

    To change all definition of parameters of the function from type to like may be solution.

  • Error while calling RFC when using BSP Web Interface

    Hi,
    we have a problem with the Authorization when we use an Web Interface for BSP. We have assigned all roles to the user which were mentioned in the SAP standard documentation:
    R_AREA   
    R_METHOD 
    R_PACKAGE
    R_PARAM  
    R_PLEVEL 
    R_PM_NAME
    R_PROFILE
    R_STS_PT 
    R_STS_SUP
    R_WEBITF 
    S_RS_ADMWB
    S_RS_AUTH
    S_RS_COMP
    S_RS_COMP1
    S_RS_DAS 
    S_RS_ICUBE
    but we still get the error message: "Error while calling RFC".
    When using a user with SAP_ALL, it works.
    What can we do?
    Thx for your time.
    Joerg

    Actually that's surprising - because BSP (Business Server Pages) and RFC (Remote Function Call) are not related; they use totally different transport protocols (http vs. RFC). Even if an BSP application is calling a function module remotely (acting as RFC client) no authorizations for S_RFC are required - in the calling system (but in the called system, i.e. the RFC server).
    Since assigning SAP_ALL seems to "cure" the problem, it seems to be an authorization issue, indeed. In that case it makes sense to use the authorization trace (ST01 - notice: that's specific to one single ABAP application server; you might have to activate the trace on multiple instances) to find out which authorizations are checked / demanded.

  • Call RFC in Delphi

    Hi,all
        I am a SAP newbie .I have a strange question. My Delphi Development Environment is Delphi 7. SAP ECC 6 , Delphi Call RFC through COM.
    procedure TFrm_SAP.Button3Click(Sender: TObject);
    var
      myIFunction:IFunction;
      myIStructure_EDRAT:IStructure;
      myIStructure_ORDER:IStructure;
      myIParam_AUFNR  :IParameter;
      myIParam_AUTYP10:IParameter;
      myIParam_WERKS  :IParameter;
    begin
      if not Logon_bool then
      begin
        Showmessage('Logon SAP/R3 Failure');
        Exit;
      end;
      SAPFunctions1.Connection:=Connection;
      myIFunction:=SAPFunctions1.Add('Z_XX_GET_PRODORDER_HEADER') AS IFunction;
      myIParam_AUFNR:=myIFunction.Exports_['I_AUFNR'] AS IParameter;
      myIParam_AUFNR.value:='000001002864';
      myIParam_AUTYP10:=myIFunction.Exports_['I_AUTYP10'] AS IParameter;
      myIParam_AUTYP10.Value:='X';
      myIParam_WERKS:=myIFunction.Exports_['I_WERKS'] AS IParameter;
      myIParam_WERKS.Value:='2010';
      myIStructure_EDRAT:=myIFunction.Exports_['IT_ERDAT'] AS IStructure;
      myIStructure_EDRAT.Value['SIGN']  :='I';
      myIStructure_EDRAT.Value['OPTION']:='BT';
      myIStructure_EDRAT.Value['LOW']   :='20090101';
      myIStructure_EDRAT.Value['HIGH']  :='20090330';
      if  not myIFunction.Call then
      begin
        ShowMessage(myIFunction.Exception);  
      end
      else
      begin
         myIStructure_ORDER:=myIFunction.Imports['ET_ORDER'] AS IStructure;
      end;
    end;
    after  execute myIFunction.Call method ,Show
    I trace Log file , as following Show
    T:764 Error in program '': ======> Data error (invalid data type 17) in a Remote Function Call
    T:764 Error in program '': <* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
    T:764 Error in program '': <* RfcCallReceive [1] : returns 3:RFC_SYS_EXCEPTION
    Could anybody have helped me to resolve this problem?

    Hi
    Check RFC Import Parameters Data Type and Data Sent from your Delphi System is not matching , Some data type mismatch is going on.
    Check Data Type of when Sent from Delphi == Import (Request) of RFC is equal
    rgds
    srini

  • Can not call RFC contains "call transaction"  in webdynpro

    We use Webdynpro to develope a UI that can create service orders in CRM
    system. We create an RFC funciton "ZKLEE_CRM_ORDER_MODIFY" in CRM,which
    contain a statement of "CALL TRANSACTION 'CRMD_BUS2000120' USING T_BDC
    MODE 'N' MESSAGES INTO MESSTAB.".
    But as we exacute the RFC from WEB,we got 3 error messages in the
    output "MESSTAB":
    1.MESSAGE ID = "DC",MESSAGE NUMBER = "006", MESSAGE = "Control
    Framework: Fatal error - GUI cannot be reached".
    2.MESSAGE ID = "SY",MESSAGE NUMBER = "002", MESSAGE = "Exception
    condition CNTL_ERROR raised."
    3.MESSAGE ID = "00",MESSAGE NUMBER = "359",and it is a terminate
    message.
    The problem is that we can use webdynpro to call RFCs that do not
    contain "call transaction" freely. At first we suspect that it is our
    RFC function's fault, but we tried it in ABAP enviroment,and it works
    OK. We also tried to call this RFC in JSP through JCO,the same error
    occurs.
    Our system enviroment is CRM 4.0, J2EE 640, kernel 640 patch 109.

    HI,
    Thank you for your information.
    Maybe you are right that BAPI/RFC can not contain "call transaction" statement. But two weeks ago, one of my colleagues tried to use "call transaction" in RFC through JCO in our R/3 enviroment(not in CRM),and he successed.
    So I suspect the kernel release. The kernel of R/3 is 640,while CRM is 620(I said our CRM kernel release is 640 before,and it is a mistake.).I will confirm whether what my colleague said is right by myself, and will also told you the result.
    Message was edited by: Vincent zklee

  • How can I call RFC FM from webdynpro application for ABAP? Please help!

    Hi Experts,
              I have a requirement where I have to make a call to RFC enabled function module passing some data from webdynpro for ABAP application. How can I achieve this? Any tutorial or links or docs will be very helpfull.
    I have seen some tutorial on Adaptive RFC but it talks about webdynpro for Java.
    Can I use "Call function XYZ destination A10" statement in webdynpro for ABAP application?
    Thanks
    Gopal

    am doing same thing for my current SRM implementation.I am taking data to SRM server from another R/3 server .
    This is solution I have used
    1) First of all I have made ABAP connection in SM59 .
    Go to SM59 .In ABAP Connection creat ABAP connection with system with which u want communicate .
    Eg I am connection with Systems PB1.
    So i developed Connection call PB1CLNT800.
    2) In my requirement I have taken data in my context from another r/3,
    I have give called RFC in my supply function of node.
    Call to RFC is as usual.
    In my case,
    CALL FUNCTION 'RFC_MATNR'
    DESTINATION 'PB1CLNT800'
    TABLES
    IT_MATNR = IT_MATNR.
    Onwards I have read my itab IT_MATNR and populated data to context.
    Hope solution will serve your purpose.
    Give point if it works .If any problem i have other ways.
    Cheers
    Parag Bhise

  • Calling RFC Adapter fails - convert error

    Hi,
    I have a problem with calling RFC Adapter. I'm using JDBC->XI->RFC scenario. JDBC does just "select 'W' from dual". In the destination SAP system RFC function is created for test purposes. This function has one parameter - string type. After calling it, it should write a sysdate into the SAP Z_ table. The XI should call the function with the 'W' parameter. But this fails. Everything is ok, but calling the RFC returns following error (copied from the Runtime Workbench -> Message Monitoring :
    Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of 'W', in "u
    (Yes, this is thw whole error message. I don't know what u should be...)
    Did someone get this error?
    Thanx 4 answers, Peter

    Hello all,
    Let me reopen the topic of my colleague. I'm facing the same error though with bit different symptoms. Here it is.
    ERROR msg:
         Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of 'Z', in "T
    The XML message (MainDocument):
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Z_BAPI_ACCESSIBILITY_TEST_XI xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
      <BAPI1008 />
      <PARAM>Z_XID_500_ACC</PARAM>
      <ZTTOTH_BAPI1008 />
    - <b><ZTTOTH_STRUCT>
      <PARAM1></b>Z_XID_500_ACC</PARAM1>
      </ZTTOTH_STRUCT>
      </ns0:Z_BAPI_ACCESSIBILITY_TEST_XI>
    According to the error message the parser expects behind string ...<ZTTOTH_STRUCT><PARAM1> another tag, but the question is why.
    To make all this more funny here I paste another XML message of BAPI calling which works fine (without the error described above):
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Z_BAPI_PARAMETERS_TEST_XI xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
      <PARAM>Z_XID_500</PARAM>
    - <ZTTOTH_STRUCT>
      <PARAM1>Z_XID_500</PARAM1>
      </ZTTOTH_STRUCT>
      </ns0:Z_BAPI_PARAMETERS_TEST_XI>
    The BAPI functions are absolutely the same except those other two import-pramater structures (BAPI1008 and ZTTOTH_BAPI1008). I'm gonna to try to add those import-parameter structures into Z_BAPI_PARAMETERS_TEST_XI, but anyway - this is weird.
    Does anybody have an idea, what should be wrong ?
    Thx. Tom
    Message was edited by: Tomas Toth

  • Calling RFC in BPM

    Hi ,
          My requirement is to create a background Job in XI using a set of function modules
    BAPI_XMI_LOGON
    BAPI_XBP_JOB_OPEN
    BAPI_XBP_JOB_ADD_ABAP_STEP
    BAPI_XBP_JOB_CLOSE
    BAPI_XBP_JOB_START_IMMEDIATELY
    BAPI_XMI_LOGOFF
    I am calling these function modules in BPM
    the problem I am facing when I call RFC in BPM it is creating new session, the second RFC reads the global data that is created by first RFC, since each RFC is creating a new session, for second RFC the data created(Global table updated in the function pool)  by first RFC is not available.
    Is there any way to solve the problem
    With Regards
    K.Varadharajan

    Hi Vardharajan,
    see your RFCs are related to eachother....by BPM it will be difficult because you will have a RFC conn made for each RFC call - so creating a new session in each call..........
    i suggest a workaround for your problem......create a single RFC which will have all your above RFCs......then you can get the data of second RFC in first RFC as all rfcs will then be in a single RFC............call this RFC from BPM.......
    Thanks,
    Rajeev Gupta

  • Error when calling RFC

    When i try to call RFC in web dynpro it gives
    The initial exception that caused the request to fail, was:
       java.lang.NullPointerException .................................
    Please guide me as i am new in dynpro field.

    Hi,
    This looks like a Java Web Dynpro problem, not ABAP try posting in the Java forum.
    For what its worth, it would help if you posted the full Java stack trace so we can see what is actually causing the NullPointer.  Typically, it may be you haven't created an element in a context that is mapped to your model, or you have a field that hasn't been initialised but without any more info no-one can really help.
    Gareth.

  • The webdynpro/ABAP (WDA) calling RFC enabled FM of other ECC systems

    The webdynpro/ABAP (WDA) has problem calling RFC enabled FM of other ECC systems.
    WDA expects all the ABAPs, RFC FMs  of remote system(DEV, QA..) to reside inside its own instance.
    It is hard to transport and maintain these ABAPs FMs into a portal ABAP WDA instance.
    Proxy generation at WDA client:
    =======================
    1. If we can make an XI enable  an ABAP or RFC enabled FM of the remote ECC,
    I think the XI proxy classes can be generated at the client WDA system.
    Other options?
    How do I do it?  Can you give some tips.
    2. How do I manually code the RFC Call to BAPI/FM from Webdynpro controller or other interface?
    I am stuck with the above as the webservice option is not available at our ECC server.  It does not have a java engine installed for webservice to be available.
    Can you help on the above 2 options?

    Hi Mike ,
    <b><b> Answer of 2.</b></b>
    How do I manually code the RFC Call to BAPI/FM from Webdynpro controller or other interface?
    I am doing same thing for my current SRM implementation.I am taking data to SRM server from another R/3 server .
    This is solution I have used
    1) First of all I have made ABAP connection in SM59 .
    Go to SM59 .In ABAP Connection creat ABAP connection with system with which u want communicate .
    Eg I am connection with Systems PB1.
    So i developed Connection call PB1CLNT800.
    2) In my requirement I have taken data in my context from another r/3,
    I have give called RFC in my supply function of node.
    Call to RFC is as usual.
    In my case,
    CALL FUNCTION 'RFC_MATNR'
    DESTINATION 'PB1CLNT800'
    TABLES
    IT_MATNR = IT_MATNR.
    Onwards I have read my itab IT_MATNR and populated data to context.
    Hope solution will serve your purpose.
    Give point if it works .If any problem i have other ways.
    Cheers
    Parry B

  • Calling RFC

    Hi Team,
    I am calling RFC fron ECC 6.0 to SAP 4.6c.
    Destination is maitained in SM59.
    Problem:
    When i am calling RFC through my report program.
    Sy-subrc is 1.
    When running FM at orginal destination it is working fine.
    Any helpful pointers...

    Sy-subrc represents the value of the exception.
    For example
    CALL ZFUNC DESTINATION ZZ.
      EXPORTING
      IMPORTNG
    EXCEPTIONS
           data not found = 1.          "Check this description for your case, This is your error
           communication error = 2.
    Whatever is defined for one is your problem

  • Calling RFCs in Java WebDynpro

    Hello Experts,
    I'm new to WebDynpro. I'm a novice at best and have just learned the basics. I'll probably be asking a lot of questions about this soon. Here is one problem I recently encountered:
    I managed to call RFCs from R/3 using a user input and then another one by using one field retrieved from the first called RFC. Now i have to call a BAPI recursively from the data I got from the 2nd RFC that I called.
    Here is the code so far:
    public void executeBapi_Network_Getdetail_Input( )
        //@@begin executeBapi_Network_Getdetail_Input()
        //$$begin Service Controller(246259973)
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
          BigDecimal plannedCost = new BigDecimal(0);
           for (int i=0; i<wdContext.nodeZps_Fm_Get_Network_Num_Input().nodeNetworks().nodeEx_Networks().size(); i++) {
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Network(false);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Network_Activity(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Relation(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Activity_Element(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Activity_Milestone(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Component(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setNumber(
                wdContext.nodeZps_Fm_Get_Network_Num_Input().nodeNetworks().nodeEx_Networks().getEx_NetworksElementAt(i).getAufnr());
              wdContext.currentBapi_Network_Getdetail_InputElement().modelObject().execute();
              wdContext.nodeNetworkDetails().invalidate();
              plannedCost.add(wdContext.nodeBapi_Network_Getdetail_Input().nodeNetworkDetails().nodeE_Network().getE_NetworkElementAt(i).getPlanned_Cost());
    sorry if this is totally wrong. I'm totally a newbie here.
    Hoping for your kind and helpful responses.
    Cheers,
    Alfonso

    Hi Alfonso,
    Can you please try this code:
           IWDMessageManager manager = wdComponentAPI.getMessageManager();
             try
               BigDecimal plannedCost = new BigDecimal(0);
               // Initializing a IWDNode to make code more readable and clean
               IWDNode nodeEx_Networks = wdContext.nodeZps_Fm_Get_Network_Num_Input().nodeNetworks().nodeEx_Networks();
               // I have initialized the int variable because you should never calculate the size() in for loop.
               // It is major performance hit.
               int size = nodeEx_Networks.size();
               for (int i=0; i<size; i++) {
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Network(false);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Network_Activity(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Relation(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Activity_Element(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Activity_Milestone(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Component(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setNumber(nodeEx_Networks.getEx_NetworksElementAt(i).getAufnr());
                   wdContext.currentBapi_Network_Getdetail_InputElement().modelObject().execute();
                   // WHY IS THIS INVALIDATE DONE.. WHICH IS THIS NODE???
                   wdContext.nodeNetworkDetails().invalidate();
                IWDNode nodeE_Network = wdContext.nodeBapi_Network_Getdetail_Input().nodeNetworkDetails().nodeE_Network();
                  int sizeNetwork_Getdetail = nodeE_Network.size();
                  for (int i = 0; i < sizeNetwork_Getdetail; i++) {
                       plannedCost.add(nodeE_Network.getE_NetworkElementAt(i).getPlanned_Cost());
                  // Now you can check the plannedCost by printing it using the manager you have initialized above.
    I hope this solves your issue. If you have any further issue please revert back.
    Thanks and Regards
    Pravesh

  • Calling RFC from JSP : development component

    Hi everyone,
    I created JSP that call RFC from SAP/R3.
    I have problem with the DestinationService.
    Without DCs, it worked very good.
    But since I created a DC for my JSP project, I have exception at run time regarding
    the java.lang.NoClassDefFoundError: com/sap/security/core/server/destinations/api/DestinationService.
    Eventhough I add the specific jar, I get an excpetion.
    Thanks for the help.
    David

    Go to the application-j2ee-engine.xml file and add following reference:
         <reference
              reference-type="weak">
              <reference-target
                   provider-name="sap.com"
                   target-type="interface">tcsecdestinations~interface</reference-target>
         </reference>

  • WAD Call RFC and BAPI

    Dear all,
         I have a problem about using WAD call RFC and BAPI get BW data,who can help me?

    HI Bill,
    Please give details of what you are trying to do. 
    Brian

Maybe you are looking for

  • Scheduling Agreement as PDF in email ?

    Hi Friends, I am a new entry to the SDN group . I have a requirement : Need to send the Scheduling Agreement as a pdf email . Already for standard PO an output type is set . If i want to send an email of Sceduling agreement then what are the steps in

  • Itunessetup.exe is not a valid win32 application?!? help!

    has anyone else been getting an error message when trying to upgrade to itunes 7 that says something to the effect of "itunessetup.exe is not a valid win32 application" ??? does anyone know what this means or how i can fix it??

  • Upgrade from EP6.0SP2 to Netweaver 04

    Hi, Currently we have EP6.0Sp2 Patch3 installed and running. Recently we have got Netweaver 04. Kindly let me know what is the procedure for upgrading from EP6.0SP2 to Netwearver 04. DO we need to build a new system? or can old system be upgraded. Th

  • ITunes Gift Card Balance Mess Up

    So I recently just put in this $10 ITunes gift card.. I was attending on to BUY something for $10. Well turns out I inputted it in and my balanced showed up to $4.66. Why is that? I spent $10 for only $4? Before I put in this gift card I got from Vis

  • Job work order for non-valuated material

    All SAP Gurus, We are providing subcontracting services. For this we have created materials (incoming and outgoing both) as non-valuated. Now, can we bill the customer for the processing charges/ job work or we need to sale this material to customer?