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

Similar Messages

  • Call RFC from DELPHI Windows Services Program

    Hi all,
    Are there any way to call RFC from DELPHI Windows Services Program?
    Best regards.
    Munur EBCIOGLU

    Hi again Bhagat,
    1. Yes, it's included on 7.4 ABAP Stack (SAP NetWeaver 7.4 SP8 - Optimized for SAP HANA, Cloud and Mobile - Service Release 2 available now!). In a recent customer, SAP licences GW by user but there are other license model like session licensing: https://store.sap.com/sap/cp/ui/resources/store/html/SolutionDetails.html?pid=0000009470&catID=&pcntry=US&sap-language=EN&_cp_id=id-1385059687642-0
    2. You could install as an AddOn on your 7.3 system, there are many options depending on your desired infrastructure: SAP Gateway deployment options in a nutshell For example our customer have deployed Central Hub Gateway in a standalone stack ABAP to act as an standalone oData bridge between ABAP/nonAbap systems.
    3. You could deploy SAPUI5 apps in 7.x, Java Web Servers or HTTP Web Servers. You must consider your SSO scenario:
    - SSO Logon Tickets. You will need to configurate SSO Logon Tickets between SAP NW Portal & SAP NW Gateway & your backend (ECC, etc). In order to pass SAP session cookie you will need setup SAP Web Dispacther and access portal & gateway throught SAP WD with the same domain.
    - SAML2 Tickets. This scenario lets you provide portal & gateway on different domains enabling SSO. You could configure SAP NW Portal as an Identity Provider and other systems must trust SAP Portal as IdP.
    Cheers

  • 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

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

  • 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

  • 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

  • Call RFC From PL/ SQL

    Hi Everybody, i have some question:
    Its Possible from PL / SQL, call RFC Functions?...
    Please can you give me some examples or tell me if is technicaly impossible to do that?..
    Thanks a lot.
    Greattings
    Wilmer Figueroa

    Hey,
    It is not that easy,
    SAP didn't published an package to link PL/SQL to RFC,
    however, it is possible with some work:
    the PL/SQL can execute command on operation system of the DB
    for example 'dir' in windows or 'ls' in unix,
    instead of running dir/ls you can execute a program that will execute an RFC in the SAP system.
    the program can be developed by .Net connector, see:
    NW RFC SDK - is there a guide somewhere?

  • Call RFC  using java procedure

    Hi
    How can I to use java procedure and call RFC for to access tables of SAP ?
    Thank You

    RFC? That term in the IT environment usually means "+Request For Comments+" and refers to Internet protocol and usage standards.
    Do you perhaps means RPC (Remote Process/Procedure Calls)? Or something else?
    Also, SAP is a company. Not a product. SAP has a product called R3. This runs inside a database.
    Connecting from Java to a database typically requires nothing more than a JDBC driver. So why can't you use a JDBC driver and need to call the database (and access tables) using another method?

  • Call RFC

    hai
         how to call RFC prog.

    Technical Overview
    A remote function call (RFC) is the call of a function module that runs in an external system to the calling program. Although it is also possible to call a function module in the same system as an RFC, normally RFCs are used when the caller and the called function module run in the same system.
    In the SAP system, these functions are provided by the RFC interface system. The RFC interface system enables function calls between two SAP systems, or between an SAP system and an external system.
    [edit]
    The RFC Interfaces
    The RFC- interface system is made up of the following interfaces:
    Calling interface for ABAP programs
    Each ABAP program can call a remote function module using the command CALL FUNCTION...DESTINATION. The parameter DESTINATION informs the SAP system that the called function module runs in a different system to the calling system. RFC communication with the remote system takes place as a part of the CALL FUNCTION command.
    RFC function modules in an SAP system must be proper function modules and must be registered in the SAP system as remote.
    If the calling program and the called program are both ABAP programs, the RFC interface provides both communication partners. The calling program can be any ABAP program, and the called program must be a function module that is registered as remote.
    For more detailed information on calling function modules that are registered as remote, see Calling RFC Function Modules in ABAP.
    For more information on writing function modules that you want to call remotely, see Writing RFC Function Modules in ABAP.
    Interfaces for calling non-ABAP programs
    If either the calling program or the called partner is not an SAP program, this program must be programmed in such a way that it can play the role of the other partner in RFC communication.
    To support you when implementing RFC partner programs in non-SAP systems, read: Components of the SAP Communication Technology
    RFC-supported and GUI-supported interfaces can be used by external programs to call function modules in SAP systems, and execute them in these systems. Likewise, ABAP programs can also use these interfaces to use functions supplied by external programs.

Maybe you are looking for