RFC Call from ABAP (R3) to Webdynpro EP

Hi experts,
I have a requirement to initiate a call from an ABAP program on R3 to a standard Portal (Webdynpro) API. Does anyone have any experience with this?
I understand that normally Portal (Webdynpro) applications will make the RFC call to ABAP via the established JCO connection. However there's very limited literature elaborating how the call can be made in the other direction i.e. from ABAP R3 to Portal
Anyone, please kindly advise how, if this can be done. Many thanks!
Best regards,
Lionel

Hi,
I'm trying to make a RFC call from the ABAP program to a built in Java method residing on EP. It is part of a suite of methods provided by the UME engine.
Typically a call is made from a webdynpro program to a SAP ABAP function module. In this case, I'd like to make a call from the SAP ABAP report to the EP method.
Best regards,
Lionel

Similar Messages

  • Asyncronic JCO RFC call from JAVA to ABAP

    Hi,
    Please could you provide a sample java code to establish JCO RFC call to ABAP?
    Thanks.

    Hi Denis,
    Import the model In NWDS for ABAP for RFC.
    Please check here [Accessing ABAP Functions using the Adaptive RFC Model |http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a00f7103-6790-2a10-ac9c-fcac7c5b18a3?quicklink=index&overridelayout=true]
    [Web Dynpro Model: Backend Access|http://www.sdn.sap.com/irj/sdn/nw-wdjava?rid=/webcontent/uuid/403e6bf5-426e-2910-b0a8-a95548724af9#section10 [original link is broken]]
    Also check here /docs/DOC-8661#section10 [original link is broken]
    Hope it helps,
    Redards,
    Arun

  • Making an RFC call from within the VM container

    Hi all,
    since a long time I am searching for information on how to implement an RFC call from within the VMC. The problem is that we have implemented several (p)functions in ABAP and we need to implement them in JAVA.
    Now I am searching for a way how to just call the already existing pfunctions???
    Is it possible to read CRM DB tables too?
    Thank you in advance
    Boris

    Hi Freeto,
    This may be due to the Network Failures.
    If you have triggered a job then because of the Network fluctuations the system may not respond properly and cannot execute the job.
    So, this is the cause for the failure.
    Hope you understood.
    With Regards,
    Ravi Kanth

  • Invoke MII Transaction thru RFC Call from SAP

    Hi,
    We want to get the data from Oracle DB table thru MII (12.0.2).
    We need to use RFC call from SAP to MII.
    Is it possible to invoke the MII transaction thru RFC by setting in Message Listener?
    We have used iDoc messages but not tried with RFC.
    How to do that?
    Regards,
    Senthil

    I feel MII doesn't have anything equivalent to RFC in ECC. You may try web services in an ABAP program
    Hope the article below helps you
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9f101377-0c01-0010-269f-c3ee905d583b&overridelayout=true
    Regards,
    Musarrat

  • RFC call from Excel using VBA

    I am trying to do an RFC call from Excel to SAP using VBA. RFC is working fine for most the RFC enabled Function Modules except DDIF_FIELDINFO_GET and DDIF_FIELDLABEL_GET.
    What can be the reason for this?
    Can someonme please help me with a macro code where these FMs are working.
    Also can someone please help me with some tutorial on SAP connection with Excel.
    <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Edited by: Alvaro Tejada Galindo on Nov 12, 2008 9:14 AM

    Hello Jon.
    DDIF_FIELDINFO_GET is not working for me either. But I have used another FM (/ZOPTION/LIVE_DDIF_FIELDINFO):
    Public Sub RFC_FIELDINFO()
    Dim Func As Object
    Dim sapConn As Object
    Dim tblFIELDTAB
    Dim tblFIXED_VALUES
    Dim intRow%
    Dim intCol%
    '* Sub     : Call FM /ZOPTION/LIVE_DDIF_FIELDINFO                         *
    '* Author  : Holger Köhn                                                  *
    '* Created : 23.08.2014                                                   *
    '* Changed :                                                              *
    ThisWorkbook.Sheets("TEST").Activate
    Cells.Select
    Selection.ClearContents
    ThisWorkbook.Sheets("TEST").Range("A1").Select
    '* create RFC-Connection                                                  *
    Set sapConn = CreateObject("SAP.Functions")
    sapConn.Connection.RfcWithDialog = True
    If sapConn.Connection.LogOn(1, False) <> True Then
        MsgBox "Cannot Logon to SAP"
        Exit Sub
    End If
    DoEvents
    '* run FM /ZOPTION/LIVE_DDIF_FIELDINFO                                    *
    Set Func = sapConn.Add("/ZOPTION/LIVE_DDIF_FIELDINFO")
    Func.Exports("TABNAME") = "AUFK"
    Set tblFIELDTAB = Func.Tables("FIELDTAB")
    If Func.Call = False Then
         MsgBox Func.Exception
         Exit Sub
    Else
        Application.ScreenUpdating = False
            For intCol = 1 To tblFIELDTAB.ColumnCount
                ThisWorkbook.Sheets("TEST").Cells(1, intCol).Value = tblFIELDTAB.ColumnName(intCol)
            Next
            If tblFIELDTAB.RowCount > 0 Then
                For intRow = 1 To tblFIELDTAB.RowCount
                    For intCol = 1 To tblFIELDTAB.ColumnCount
                        ThisWorkbook.Sheets("TEST").Cells((intRow + 1), intCol).Value = tblFIELDTAB(intRow, intCol)
                    Next
                Next
                ThisWorkbook.Sheets("TEST").Activate
            End If
            Columns.AutoFit
        Application.ScreenUpdating = True
    End If
    '* clear tblFIELDTAB                                                      *
    Do Until tblFIELDTAB.RowCount = 0
         Call tblFIELDTAB.Rows.Remove(1)
    Loop
    Set sapConn = Nothing
    Set Func = Nothing
    Set tblFIELDTAB = Nothing
    End Sub

  • Asynchronous RFC call from R/3

    I need to make an asynchronous RFC call from R/3. I receive an error message in R/3 stating that my RFC destination can only be of type I (Internal) or type 3 (R/3 system). In order for it to reach XI I need it to be of type T (TCP/IP). Any help would be appreciated.
    Here is the function call.
    CALL FUNCTION 'Z_B2B_R3_FUNCTIONAL_ACK' starting new task 'SESSION1'
       destination 'RFC2XMBSERVICE'
          EXPORTING
               MSG_TYPE            = msg_type
               ORDER_HEADER_RETURN = order_header_return
          TABLES
               RETURNCODE          = i_return.
    the RFC desitnation RFC2XMBSERVICE is of type TCP/IP which by default makes it synchronous.
    Thanks,
    Jim

    hi,
    have you tried:
    CALL FUNCTION 'Z_B2B_R3_FUNCTIONAL_ACK'
    in background task
    destination 'RFC2XMBSERVICE'
    EXPORTING
    MSG_TYPE = msg_type
    ORDER_HEADER_RETURN = order_header_return
    TABLES
    RETURNCODE = i_return.
    commit work.
    Regards,
    michal

  • 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

  • RFC call from a Windows Service

    Hi All,
    I have created a simple windows service which is making an RFC call to R/3 system. This is not working. Whereas the same piece of code written in a windows application projects(exe) works properly. Does anyone had similer issues working with Windows services ? Is it a known issue of RFC calls from windows service ???
    Thanks & Regards
    Ganesh Datta

    Hi Juergen,
    After I put the debug statements I figured out that connection to R/3 system is unsuccessful.
    I am using the SAP .Net Connector 2.0. I wrote a windows service which is manually started. Withing my service I am using Single sign on to connect .This is what was causing the problem. If I disable Single sign on and supply userID and password then connection is successful and also subsequent RFC calls.
    I guess within windows service Single sign on does not work.
    Thanks for your reply
    Best Regards
    Ganesh Datta

  • Best approach for RFC call from Adapter module

    What is the best approach for making a RFC call from a <b>reciever</b> file adapter module?
    1. JCo
    2. Is it possible to make use of MappingLookupAPI classes to achieve this or those run in the mapping runtime environment only?
    3. Any other way?
    Has anybody ever tried this? Any pointers????
    Regards,
    Amol

    Hi ,
    The JCo lookup is internally the same as the Jco call. the only difference being you are not hardcoding the system related data in the code. So its easier to maintain during transportation.
    Also the JCO lookup code is more readable.
    Regards
    Vijaya

  • Java calls from ABAP code in XI

    Java and ABAP gurus,
    Is it possible to make java call from ABAP. Is a sample out there I can take a look at.
    Please help.
    Thanks.

    Hi,
    YES, Very well it  is Possible,
    This will help you
    /people/bv.pillai/blog/2006/09/28/calling-mdm-java-api-application-executable-from-abap
    /people/vijayasarathy.raghunathan/blog/2005/12/28/java-editor-inside-abap
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    JCo Outbound( calling Java Function from ABAP )
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    Call Java Class and Methods from ABAP
    Regards
    Agasthuri Doss

  • RFC call from java webdynpro

    Hi,
    I'm creating a Java Webdynpro where I call RFC's from SAP.
    For the images in the webdynpro, I call the standard SAP function 'CVAPI_DOC_VIEW'
    When I execute the function in SAP, I get the url to the contentserver with the correct image.
    After calling the same function in my Java Webdynpro, the url is empty.
    I've checked the importing parameters after calling from webdynpro and SAP and they are the same.
    After debugging, I saw that the function 'CVAPI_DOC_VIEW' is the problem. He's exporting an empty url after calling from the webdynpro.
    Does anybody knows the possible fault and solution for my problem?

    I'm not an ABAPer but the last time I've dealt with DMS from Web Dynpro an ABAPer wrote a custom function that gets the file content (XSTRING) by sending DMS parameters (documenttype, documentnumber, documentversion, documentpart).
    After getting the XSTRING from my Web Dynpro Java, I convert it to byte[] and created URL by using WDResourceFactory.
    Hope it helps...
    Omri

  • SOFM: Dsiplay method is not working when called from ABAP Webdynpro

    Hi All,
    I want to open an attachment from ABAP Webdynpro.
    I have approached in this fashion:
    1) Get the attachments as SOFM object key
    2) On Click of a link on Webdynpro, I am calling a function module within which I am creating an instance of the SOFM object
    3) Then I am calling the DISPLAY method
    It is not opening.
    But, if it opens when I driectly execute the function module. It open when I directly test the business object.
    Any Idea ?
    Thanks & Regards,
    Deb

    Display Method uses the Dialogue Module, You should not access such methods in web dynpro which are SAPGUI specific.
    Web Dynpro Applications are run in Browser environment which cannot understand Dialog, it can understand only HTML.
    Read the attachments and get the content and use FileDownload UI element to show it to user.
    Abhi

  • RFC call from XI ABAP stack to XI

    Hi All,
    I have a RFC in the XI ABAP stack. When I created an RFC connection (TCP/IP) connection on the XI ABAP stack through SM59, and tried test connection, it is not working. Am I doing something wrong here? If I am trying to call XI JAVA stack from XI ABAP stack do I need to use an RFC adapter or is there any other way of calling the XI JAVA stack?
    Thanks,
    Geetha
    Edited by: Geetha on Feb 5, 2008 12:18 PM

    XI ABAP Stack and JAVA Stack are connected using the JCO connections, if you want to call the RFC in the ABAP stack of XI using the RFC adapter which sits on the JAVA stack
    1. whats the purpose of creating the RFC on the XI ABAP Stack, is it a business stack?
    2. the created RFC destination in the XI ABAP stack should work if it is properly created...check the SAPHostname, gateway information? and also the registred program id.
    3. use the same registred progrram iD in the RFC sender adapter and actiavte it then it will work.....

  • Import parameter is empty after an RFC call from BW to JCo

    I am calling a Java function (implemented using JCO and deployed on J2EE stack of the Portal box) from within a user-exit in BW (on a separate box) using RFC. The code in BW looks like:
    CALL FUNCTION 'Z_BW_VALIDATE_PROXY' DESTINATION 'ACF2PROXY'
        EXPORTING
            IREQUESTOR = 'AE012345'
            IREQUESTED = '012345'
        IMPORTING
            ERESULT = lv_result
        EXCEPTIONS
            SYSTEM_FAILURE = 1 message lv_rfc_mess
            COMMUNICATION_FAILURE = 2 message lv_rfc_mess.
    The following are working/setup correctly:
    1. RFC destination ACF2PROXY, in BW using transaction SM59;
    2. Java function 'Z_BW_VALIDATE_PROXY' , as the server log on the Portal(J2EE) shows the correct IMPORT and EXPORT parameters after processing a call from BW;
    The data types of the parameters in the function call above matches with those of the formal parameters in Java function where they are defined using JCO data types (export parameter is defined at CHAR 1 at both places).
    The problem is that I am not getting any value back in the IMPORT parameter 'lv_result'. I am expecting either '0' or '1' which is populated correctly in the Java function.
    Any insight is appreciated.

    The following is the code of the method in the class that inherits from JCO.Server. In this method the export parameter ERESULT is set with the value of variable 'result'. I thought it may be helpful to reporduce it here.
    protected void handleRequest(JCO.Function function) throws MMException
              if (function == null) {
                  LOGGER.logInfo("handleRequest - JCO.Function object is null.");
                   return;
              LOGGER.logDebug("handleRequest(" + function.getName() + ")");
              //process this function only, although I don't know what else would fall to this
              //server request method...
              if (function.getName().equalsIgnoreCase(ACF2Listener.ABAP_RFC_PROXY_FUNCTION)) {
                   //get input & output definitions from RFC. These are defined in the repository interface definition
                   JCO.ParameterList input = function.getImportParameterList();
                  JCO.ParameterList output = function.getExportParameterList();
                  LOGGER.logDebug("Received the following from ABAP: " + input.toString());
                  String requestor = input.getString("IREQUESTOR");
                  String requested = input.getString("IREQUESTED");
                  //call DAO to read ACF2 for these values
                  String result = null;
                  try {
                       ACF2DAO acf2 = ACF2DAO.getInstance();
                       if (acf2 != null) {
                            result = acf2.getACF2Delegation(requestor,requested);
                  catch (MMException e) {
                      LOGGER.logError("Exception occured during ACF2 DAO lookup: " + e.getMessage());
                      throw e;
                 output.setValue(result, "ERESULT");
                 LOGGER.logDebug("ACF2 Service Call returning: " + output.toString());
              else {
                   throw new JCO.AbapException("NOT_SUPPORTED","This service is not implemented by the ACF2 Proxy external server.");
    Thanks
    Sanjeev

  • RFC call from Lotus Notes

    Hi,
    I have create an RFC function,and have a successful test in R/3.
    And when I call this RFC function from Lotus Notes.The return message is AA 291 'No correction'.
    Anybody know the reason?
    Best regards,
    leric

    Hello Leric,
    as an alternative option to using RFC, you may also consider using WebServices. SAP Systems as of Web Application Server 6.20 onwards offer all BAPIs as Web Services.
    please take a look at the R/3 web services browser: http://<hostname>:<icmport>/sap/bc/bsp/sap/WebServiceBrowser/search.html
    you may also take a look at SAP TechED 2006 session ID SOA150 (Providing and consuming web services in ABAP - http://www.sapteched.com/06/emea/edu_sessions/viewall.htm)
    Regards
    Michael
    PS: if you want to use RFC, you may consider using different connectivity options such as LEI Domino connector from IBM, ZeNotes from Konplan (http://www.konplan.com/public1/_EN/solutions_zenotes.php) or it.smartconnect from itelligence (http://it-smart-connect.itelligence.de/)

Maybe you are looking for

  • Code and GUI Elements Altered When Working Between Windows 8, and = Windows 7

    This is not the usual "My fonts look different" problem we get when running application executables on different PCs.  The bug I am seeling (yes, I'm calling it a bug) is that when I bring up code to work on in Windows 8, several things change, both

  • Trying to install XP on external CD drive

    I've looked around, trying to find out how to fix my problem but it I haven't been successful yet so I thought I would ask for help. I have OSX 10.5.5, I have successfully used Boot Camp Assistant to create a boot camp partition. I can see and select

  • Can't view computer video on TV. Only my desktop picture

    Fire connection from Mac to TV will show my desktop image but not play the video the Mac is playing.

  • Printing a PDF from JSF

    Hello Everybody, I have some procedure that, retrieves a pdf after some processing that incluyes DB queries, then after having the name of a PDF stored in the File System, I need to send a print command. How could I do it? In the forums I have found

  • Cant change window Icon in a JFrame

    I cannot seem to set the icon in the upper left of the window or in the task. I am using NetBeans and it created my JFrame for me using the following code to initialize: java.awt.EventQueue.invokeLater(new Unable() {             public void run() {