Call RFC in BSP

Hi all
Can anybody suggest me how to call the remote function module from a another SAP system. When i give the destination and call the FM it is opening a new GUI window promting user id and pwd.
Is there a way to skip this and call the remote FM.

Hi Vijaya,
Your coding is probably already correct.
Where the issue will be is with the RFC destination.  If the RFC destination is configured with a valid username and password then you will not be prompted with a logon screen.
To check the RFC destination is valid, use transaction SM59.  Select the desired destination and go to change or display it.  From the menubar you should see the option, Test->Test Authorisation.  If you use this option and the test comes back ok then the destination is correct.  If not, either a user is not maintained for the destination, or the user is invalid (locked, wrong password, etc.).
Hope that helps.
Brad
PS: Given my sarcastic response to your last thread, I'm ok if you dont award anything for this response!!!
Edited by: Brad Williams on Feb 21, 2008 6:10 PM - Fixed Typo!

Similar Messages

  • Excel sheet generation through RFC call from a BSP application

    Hi,
      I am calling a RFC FM ( in R3)  in Event handler 'OnInputProcessing' of a BSP application in a SRM server.
    That function submits a report program which geneates a excel sheet using download FM . Excel sheet is not getting generated.
    But when i am calling this RFC FM  (in R3) from a report program ( in srm server)
    this is generating an ecel sheet.
    I want to have call RFC from BSP application.
    I tried the way of submit a program ( which contains RFC call) from BSP application ,but it is also not generating excel sheet.
    My ultimate AIM is to generate excel sheet by trigerring CALL or submit from BSP
    application.
    can any one propose solution for it.
    Useful answers will be rewarded.

    Hi,
    Which FM is it. I guess that the download generated is a SAP gui oriented solution, which will never work in a web environment
    Eddy
    PS. Reward useful answers and earn points yourself

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

  • CNTR_ERROR While calling BDC from BSP

    Hi ALL
    I am calling a RFC from BSP which in turn call a BDC for the transaction TP04.
    When i run the BSP in debugging mode its posting data and  working fine.
    But otherwise also it doesn't throw any error on browser. but when i check ST22 it throws exception CNTL_ERROR.
    My function is remote enabled and i am using destination 'NONE' as well.
    I have also checked the Blog by Brian.
    suggestions are welcome
    Naresh

    Hi
    Browser is not giving any error,Friendly HTTP is turned off.
    I am calling my own fucntion module like this
    CALL FUNCTION 'ZTM_FM_TP04' destination 'NONE'
              EXPORTING
                emplno  = employeeno
                STARTDATE   = strtripbegin
                STARTTIME   = strstarttime
                ENDDATE     = strtripend
                ENDTIME     = strendtime
                FIRSTDEST   = strfirstdest
                COUNTRY     = strcountry1
                REASON      = strreason
                CASHADVANCE = strcashadvance
                CASHCURR    = strcashcurr
                BANKADVANCE = strbankadvance
                BANKCURR    = strbankcurr
              TABLES
                ADDDEST     = adddest.
    and within the function module i am calling Call Transaction like this
    CALL TRANSACTION 'TP04' USING BDCDATA
                         MODE   'N'.
    But its not posting any data and while checking thru ST22 its giving following error
                                                                                    A RAISE statement in the program "CL_GUI_CUSTOM_CONTAINER=======CP " raised th 
    exception                                                                     
    condition "CNTL_ERROR".                                                        
    Since the exception was not intercepted by a superior program                  
    in the hierarchy, processing was terminated.

  • Passing table to the RFC from BSP!

    Dear friends,
    I am trying to call a RFC (on 4.6c) from a BSP page( on a 6.20 System). i am trying to pass a table from the BSP to the RFC and get the result back. This is not working as expected.
    The Function module  at R3 (4.6c) which takes a table as an input and gives string as an output.
    The code is for Function module is given below.
    <b>FUNCTION ZBHAVIN1.
    ""Local interface:
    *"  EXPORTING
    *"     VALUE(TEMP) TYPE  STRING
    *"     VALUE(TEMP1) TYPE  STRING
    *"  TABLES
    *"      ITAB STRUCTURE  ZITAB
    TEMP  = ITAB-MESSAGE.
    TEMP1 = ITAB-MESSAGE1.
    ENDFUNCTION.</b>
    To call this function module the code for the bsp page (created on a 6.20 System) is :
    <b>
    <%@page language="abap"%>
    <% TYPE-POOLS ZBSP1. %>
    <html>
      <head>
        <link rel="stylesheet" href="../../sap/public/bc/bsp/styles/sapbsp.css">
        <title> Display Page </title>
      </head>
      <body class="bspBody1">
        <%
        DATA TEMP2  TYPE STRING.
        DATA TEMP3 TYPE STRING.
        DATA ITAB1 TYPE TABLE OF ZBSP1_ITAB11.
        DATA WA LIKE LINE OF ITAB1.   
        WA-MESSAGE  = 'THIS IS FIRST ELEMENT'.
        WA-MESSAGE1 = 'THIS IS SECOND ELEMENT'.
        APPEND WA TO ITAB1.
        CALL FUNCTION 'ZBHAVIN1'
             DESTINATION 'TCLCLNT200'
               IMPORTING
                  TEMP  = TEMP2
                  TEMP1 = TEMP3
               TABLES
                  ITAB  = ITAB1
               EXCEPTIONS
                 OTHERS = 1.
        %>
        <P><%=  TEMP2  %>
        <P><%=  TEMP3 %>
      </body>
    </html></b>
    This code is not working for me as it is.
    If i remove the comments, then it works, which means that the table passed from the BSP has no Header Line.
    So , do i need to always chnage my Receving RFC to take care of this issue? or is there a way to pass the Tabkle with Header line to the RFC from BSP?

    You'll have to define a table type either in the Types tab of the BSP application or as a Dictionary object.
    Then you can define a page attribute for the table and call the code from your OnCreate event handler (just to clean up your page layout)
    You have to remember that you are working with the whole OO context and so working with the tables inside the BSP are quite different.
    Have a look at this article for some examples: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/unkown/exploring bsp development and the miniwas.htm

  • Call RFC  In ABAP XSLT

    Hello Experts,
          I have a requirement where in i need to call RFC(Which is created in R/3 system) In ABAP XSLT Mapping(defined iN xi system).
    Can some one help me to achieve this??
    **ITS URgent****
    Thanks and Regards,
    Prakash Babu.

    Hi James,
             Check here............
    /message/5182263#5182263 [original link is broken]
    RFC connections
    /message/5102602#5102602 [original link is broken]
    Regards,
    Vijay.

  • Error when call RFC Function module in R/3

    Dear All,
    We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
    we are facing the error "Error while lookup Exception during processing the payload. Error when calling an adapter by using the communication channel CC_PPPI_MES_RFC_Rcvr (Party: , Service: WCD_320, Object ID: 16563889b449328eac76caa6a3bc592e) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'. Cause Exception: 'com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'."
    This is the first time we are doing this configuration.
    Could you please let me know what woulbe the reason.

    read the original message
    We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
    I am talking about the above Receiver RFC channel which you guys are using to call R/3 from XI. That where you need to change the commit parameter

  • Java call rfc check in original:error while checking in and storing.

    hi,experts.
    java call rfc check in original:error while checking in and storing. BAPI in the RFC is "BAPI_DOCUMENT_CJANGE2",
    the RFC was fine in SE37 and calling by Visual Basic. and in java,when mConnection.setAbapDebug(true), and  runing by step and step, was fine too.
    if mConnection.setAbapDebug(false) in JAVA, up error in title was displayed.
    what cause this error?
    Best Regards.

    Hi Priya
    Please use Su53 after getting the error and find any authorization is missing for the user..
    S_GUI Full Authorization is required..
    Since by giving BASIS Authorization its rectificed, then it shud be mostly due to Auth issues only
    Regards
    Aby

  • Error while calling RFC

    Hi all WebDynpro Gurus
    I am using EP7.
    I am developing an WD application for KM functionality in which I need to call RFC from backend. I followed the "<b>Creating WD application accessing ABAP function</b>" example.
    But when I executed the application I got following exception.
    <i><b>Root Cause</b>
    The initial exception that caused the request to fail, was:
       com.sap.lcr.api.cimclient.CIMClientException: java.net.MalformedURLException: URL must have a host part
    <b>Correction Hints</b>
    Accessing the System Landsape Directory (SLD) failed. Depending on the concrete reason (see root cause) check the following:
    is the SLD Supplier in the J2EE engine configured correctly? See the SLD documentation for more details about the SLD and about how to configure it.
    are all JCO destinations maintained correctly? Use the preinstalled Web Dynpro Content Admin application to check/edit the destination. Use the Ping and Test functions of the Content Admin to verify that each destination is properly configured.</i>
    I checked JcO connections in the webdynpro content admin. There the status is unknown and create tabs are disabled.
    I checked the SLD connections in content admin , the entries are as below:
    <b>Host name : blank
    Port: -1
    User: blank
    Url: http://.-1/sld</b>
    Where could i configure these SLD settings and what should be the new entries ?
    I dont have permission to view WebDynpro console.
    Please help me out.

    Vinod,
    Claim: "Hello, World" application with WD and RFC is the "Hello, World" application with most complex configuration.
    Prove:
    1. You need to run http://host:port/sld and import CIM context
    2. You need to add technical WebAS ABAP systems to SLD (same URL)
    3. You need to run Visual Administrator and setup SLD connection parameters (host, port, user, password)
    4. You need to (re)deploy your WD application
    5. You need to run web-based WebDynpro Content Administrator and configure JCO connections.
    Fortunately, [1]-[4] is necessary only ones per server, [5] is necessary per every application.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net
    P.S. After I'd started working with XI I understood that procedure described above is not complex at all

  • Standard Component in CRM that will call RFC Function Module

    HI all,
    Is there any Standard Component in CRM that will call RFC Function Module from ECC and that called RFC FM should Fetch the data from ECC.

    You can call RFC from different places, like programs, function modules, web dynpros, classes...
    So you just have to have appropriate RFC on ERP side and call it from CRM side. To call it you use the following statement...
          CALL FUNCTION 'YOUR RFC FUNCTION'
            DESTINATION i_dest "name of server
            EXPORTING
              your export parameters
            IMPORTING
              your import parameters
    Regards.

  • Call RFC on non ABAP-Host

    Hi experts,
    we try to integrate a machine into SAP.
    Therefore we want to use RFC-Communication.
    This means, the machine will call RFC-FMs on SAP.
    I know that this works and I only need to create a "normal" RFC-FM.
    But how can I call a RFC-FM on the machine out of SAP?
    Do I need to make a an RFC-FM like in ABAP but the destination is the machine (which is defined in SM59)?
    Kind regards

    Hi ,
    Please learn this link Connections to Non-SAP Systems (SAP Library - ALE Programming Guide)
    http://help.sap.com/saphelp_nw04/helpdata/en/52/16aafa543311d1891c0000e8322f96/content.htm
    You can take a look into idocs. For idocs processing you require RFC Library of the RFC Software Development Kit (RFC-SDK) on the non sap system side for processing RFC's.
    Regards,
    Sivaganesh

  • Can we call RFC in any other way except using adaptive

    Hi,
    I want to know if there is any possible way to call RFC other than using the adaptive model.
    Answers will rewarded.
    Regards

    Hi,
    you can use JCO or Enterprise Connector to connect with R/3.
    JCO-->http://www.sapdevelopment.co.uk/java/jco/jcohome.htm
    EC-->http://help.sap.com/saphelp_webas630/helpdata/en/79/c6213e225f9a0be10000000a114084/content.htm
    Regards,
    Naga

  • 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

  • Calling RFC from Adobe Interactive Form

    Hello,
       After creating and calling Adobe Interactive form from ABAP web dynpro, within the form designer is it possible to call RFC or Business Object method from the form script to get the data back from SAP for specific Click events?

    Yes,
    this is possible, but not through pure RFC, but using webservices and webservice enabled function modules within SAP.
    Technically it is quite simple. Create a functionmodule, and create a webserve from that (all SE37 or SE80 but from WAS 6.40). Generate a WSDL (with the Java tool) and import that into the form that you are designing. From there you can bind the data from the dataset (as defined in the WSDL) to screenfields or treat the data any other way Javascript can.
    BTW. I only managed this so far by using anonymous logins, so with a password and username bound to the webservice (in SICF).
    Hope this helps, regards, Hans Gmelig Meyling

  • Call RFC from java (j2ee) /  call to j2ee from R/3

    hello
    i´ve browsed the forum for some time to find how to:
    1.) call ejb from r/3 system via rfc
    2.) call rfc enabled function modules on r/3 from within an j2ee enviroment
    but i didn´t quite get it, because i was a bit confused about all the mentionend techniques
    what i found out about
    1.) use ejb (session bean) and jndi; configure RFC-Engine Service (we use sap webas)
    2.) use jco / jca
        (or all rfc enables rfm´s are available as web service, but didn´t find anything about this)
    so my question:
    are these the preferred techniques to connect j2ee (webAS) <-> r/3; if not are there any others, maybe easier methods?
    and last but not least: are there any good online tutorials for this topic?
    thanks in advance
    franz

    Just as a short partial reply.
    The generic Java --> RFC method is JCO (it will work on older versions as well), you can think of it as a JDBC driver where R/3 is the database, it behaves very similar in many ways.
    EJB development on SAP WAS is really not any different from EJB development on any other J2EE server. The deploy tool is superb. very easy to use and the JNDI registry, etc. are standard stuff...
    ABAP to EJB calls, haven't looked at this in over a year now, but back then we did a Proof Of Concept based on information at http://help.sap.com and it did work indeed. The only thing was back then that you needed to do a few tweaks to get it to work properly.
    As mentioned above, look at the JCO examples and then you can ask more specific questions once you get stuck.
    Good Luck!
    Cheers,
    Kalle

Maybe you are looking for

  • SO-Free goods found but not apply

    HI everybody, Please help me solve this problem: I've finished free goods and tested OK 2 months ago. It doesn't work when I come back and check again. I have configed and define master data VBN1, I use free goods analysis to check, system found cond

  • Processing bank incidental charges incurred in Procurement using  ME22N

    We are trying to add bank charges incurred in payment of our newsprint supplier,but are failing with error pointing to material class and currency. What could be wrong here,please note these bank charges are in foreign currency.The process is easy wi

  • Material and Price export to an External System

    I've a Problem, I will send Materials with sales Price from SAP to an external System. I will use the IDOC MATMAS01, but I can't send the price with it? Is that correct? How I can send the sales Price for each Material? Is it possible to send more th

  • How install Java on osx 10.6.7

    Need Java installed to utilize large file resumable downloader for you tube...anybody have any luck doing this?

  • 2D arrays

    Hi all, I was wondering if anyone could help me in creating a 2-d array, which will store strings being read in from a txt file. I am reasonably knew to java and any help (examples, sites) would go a long way. Thankyou.