RFC-Call from a xslt/javamapping error

Hi.
We implemented an Szenario IDOC to Mail(attachement).
Our incomming IDOC is a standard-IDOC from SAP.
ISU_INTERVAL_USAGE_INFORMATION.ISU_VDEW_MSCONS
our Target is an EDIFACT-File attached to a mail.
We did this succesfully before in a similar Szenario with UTILMD-IDOCs to a CSV-attachement of a mail.
Because there is no Mailinformation in these IDOCs, we do a RFC-Call to a backendsystem (SAP-ISU) wich delivers the information selected by the IDOC-number.
This is the XSLT for this call:
  <xsl:variable name="maildata" select="emailadress:new($param1, $param2, $inputparam)" />
  <xsl:variable name="from" select="emailadress:getSenderEmailAdress($maildata)" />
  <xsl:variable name="to" select="emailadress:getReceiverEmailAdress($maildata)" />
  <xsl:variable name="cc" select="emailadress:getCcReceiverEmailAdress($maildata)" />
  <xsl:variable name="bcc" select="emailadress:getBccReceiverEmailAdress($maildata)" />
when I test the Mapping in the Integration Builder, the RFC-call gives us the following error message:
08:42:39 Teststart
Creating XSLT mapping iDoc_MSCONS_to_Mail
URIResolver called with href = iDoc_to_MSCONS.xsl and base = iDoc_MSCONS_to_Mail.xsl
Source resolved. System id = iDoc_to_MSCONS.xsl
Call XSLT processor with stylsheet iDoc_MSCONS_to_Mail.xsl.
Method fatalError called, terminate transformation
javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: -> com.sap.engine.lib.xml.util.NestedException: Variable '$maildata' has not been bound to a value at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:251) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150) at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: com.sap.engine.lib.xml.util.NestedException: -> com.sap.engine.lib.xml.util.NestedException: Variable '$maildata' has not been bound to a value at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:377) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) ... 18 more Caused by: com.sap.engine.lib.xml.util.NestedException: Variable '$maildata' has not been bound to a value at com.sap.engine.lib.xsl.xpath.ETVariableReference.evaluate(ETVariableReference.java:42) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:83) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:132) at com.sap.engine.lib.xsl.xslt.XSLTopVariable.process(XSLTopVariable.java:42) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:360) ... 20 more -
com.sap.engine.lib.xml.util.NestedException: -> com.sap.engine.lib.xml.util.NestedException: Variable '$maildata' has not been bound to a value at com.sap.engine.lib.xsl.xpath.ETVariableReference.evaluate(ETVariableReference.java:42) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:83) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:132) at com.sap.engine.lib.xsl.xslt.XSLTopVariable.process(XSLTopVariable.java:42) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:360) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150) at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) -
at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:377) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150) at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: com.sap.engine.lib.xml.util.NestedException: Variable '$maildata' has not been bound to a value at com.sap.engine.lib.xsl.xpath.ETVariableReference.evaluate(ETVariableReference.java:42) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:83) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:132) at com.sap.engine.lib.xsl.xslt.XSLTopVariable.process(XSLTopVariable.java:42) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:360) ... 20 more
TransfromerException during XSLT processing:
javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: -> com.sap.engine.lib.xml.util.NestedException: Variable '$maildata' has not been bound to a value at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:251) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150) at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: com.sap.engine.lib.xml.util.NestedException: -> com.sap.engine.lib.xml.util.NestedException: Variable '$maildata' has not been bound to a value at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:377) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) ... 18 more Caused by: com.sap.engine.lib.xml.util.NestedException: Variable '$maildata' has not been bound to a value at com.sap.engine.lib.xsl.xpath.ETVariableReference.evaluate(ETVariableReference.java:42) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:83) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:132) at com.sap.engine.lib.xsl.xslt.XSLTopVariable.process(XSLTopVariable.java:42) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:360) ... 20 more -
com.sap.engine.lib.xml.util.NestedException: -> com.sap.engine.lib.xml.util.NestedException: Variable '$maildata' has not been bound to a value at com.sap.engine.lib.xsl.xpath.ETVariableReference.evaluate(ETVariableReference.java:42) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:83) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:132) at com.sap.engine.lib.xsl.xslt.XSLTopVariable.process(XSLTopVariable.java:42) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:360) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150) at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) -
at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:377) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150) at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: com.sap.engine.lib.xml.util.NestedException: Variable '$maildata' has not been bound to a value at com.sap.engine.lib.xsl.xpath.ETVariableReference.evaluate(ETVariableReference.java:42) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:83) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:132) at com.sap.engine.lib.xsl.xslt.XSLTopVariable.process(XSLTopVariable.java:42) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:360) ... 20 more
08:42:39 Testende

Hi Harald,
I guess this is the IDEX package delivered by SAP?
In the latest version of the package SAP also deliveres a package for eclipse to test the mappings.
Also make sure that your data in IS-U (serviceanbieter) is maintained correct!
Regards Mario

Similar Messages

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • Error in starting SAP GUI as part of an Java RFC call from a PC

    Hi,
    We are on the 4.6C version of SAP and have the latest basis kernel patches that allow an RFC connection to start the SAP GUI. The program that I am running externally is java using the 3.0.1 JCo. The OS of the PC I am using is Windows XP. The SAPGUI version is 7.10 patch level 11.
    The program seems to be working properly as the command prompt window goes grey as if there is another window being opened but then I get back this error message and I do not see the GUI.
    The message I am getting back is:
    Exception in thread "main" com.sap.conn.jco.JCoException:(136) JCO_ERROR_ILLEGAL_STATE:Launching SAP GUI failed, though it was requested(error message:Communication with SAPGUI timed out)
    at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.startSAPGui(MiddlewareJavaRfc.java:1853)
    at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1285)
    at com.sap.conn.jco.rt.ClientConnection.connect(ClientConnection.java:661)
    at com.sap.conn.jco.rt.PoolingFactory.init(PoolingFactory.java:103)
    at com.sap.conn.jco.rt.ConnectionManager.createFactory(ConnectionManager.java:171)
    at com.sap.conn.jco.rt.DefaultConnectionManager.createFactory(DefaultConnectionManager.java:44)
    at com.sap.conn.jco.rt.ConnectionManager.getFactory(ConnectionManager.java:160)
    at com.sap.conn.jco.rt.RfcDestination.initializ(RfcDestination.java:766)
    at com.sap.conn.jco.rt.RfcDestination.getSystemID(RfcDestination.java:794)
    at com.sap.conn.jco.rt.RepositoryManager.getRepository(RepositoryManager.java:32)
    at com.sap.conn.jco.rt.RfcDestination.getRepository(RfcDestination.java:865)
    at GISToSAPWO_Test.get_wo_call(GISToSAPWo.java:91)
    at GISToSAPWO_Test.main(GISToSAPWO_Test.java:206)
    I have been all over trying to find the solution to this and have come up empty. Any help will be greatly appreciated. If this is the wrong forum for this please let me know and I will re-post.
    Thank you in advance for any information you can pass on about the issue,
    Mark

    Hi Greetson,
    Thank you in advance for your response. It is greatly appreciated.
    1) In a way yes. I am using the connection setting USE_SAPGUI = 1. This is suppose to start the GUI prior to starting the RFC's program run. If this is not correct please let me know.
    2) The code is part of the JCo and the RFC library from what I have read. If this is not correct please let me know.
    3) I am only testing from my PC at this moment. I have re-installed my SAP GUI and am now at patch level 13 on 7.10.
    4) The application passes in the connection information which includes username and password along with the parameters for the RFC call. I would like the SAP GUI to open without the user having to re-enter his/her username and password. I thought that once the RFC is called using the dialog users credentials that the GUI would then open using the connection. I have used the java pooled connection method and it still does not open the GUI.
    5) The purpose is to pass Equipment objects, Functional Location objects and Leak Id objects to an RFC to open a list screen from IW39, List Maintenance Order transaction, for display of each at one pass, as well as open Excel with data from classification for the Leak Id's.
    Hope this sheds some light on the problem I am having. Please let me know if more information is needed.
    Best regards,
    Mark

  • RFC call from Delphi (Bad Variant Type error)

    Well, I'm trying to call an RFC function from Delphi via ActiveX objects..
    I have Codegear 2009 installed and it works without any problem..
    But on another system with Delphi7 installed when I ran same code it gives "Bad Variant Type" error when assigning SapLogonControl's connection object to SapFunction's connection parameter... Both computers have same SAP installation. And on both systems ActiveX objects imported correctly on Delphi.
    Here is the code:
    unit logon1;
    interface
    uses
    Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
    ExtCtrls, OleCtrls, StdCtrls, SAPFunctionsOCX_TLB,
    Grids, SAPLogonCtrl_TLB;
    type
      TForm1 = class(TForm)
      SAPFunctions1: TSAPFunctions;
      Button2: TButton;
      Grid: TStringGrid;
      Edit1: TEdit;
      Edit2: TEdit;
      Label1: TLabel;
      Label2: TLabel;
      SAPLogonControl1: TSAPLogonControl;
    procedure Button2Click(Sender: TObject);
    private
    { Private-Deklarationen }
    public
    { Public-Deklarationen }
    end;
    var
    Form1 : TForm1 ;
    Table, Funct, Connection : VARIANT ;
    implementation
    {$R *.DFM}
    procedure TForm1.Button2Click(Sender: TObject);
    begin
      Connection                  := SAPLogoncontrol1.newConnection;
      Connection.User             := 'testuser';
      Connection.System           := 'CRD';
      Connection.Client           := '300';
      Connection.ApplicationServer:= '10.1.1.10';
      Connection.SystemNumber     := '00';
      Connection.Password         := 'testpass';
      Connection.Language         := 'EN' ;
      if Connection.LogOn(0,true) = true then
      (* parameter "true" = SilentLogOn *)
      begin
        (* assign the existing connection to the *)
        (* component SAPFunctions1                *)
        SAPFunctions1.Connection := Connection; // It gives error on this line...
        Funct := SAPFunctions1.add('ZGIS_TEST_FUNC');
      end;
    end;
    end.
    As I said while Codegear 2009 runs this code without any problem, Delphi 7 crashes on that assignment.. Also I tried outside Delphi, and the file compiled with Codegear works on both systems while the file compiled with Delphi 7 again crashes on buth systems...
    Is there a problem with Delphi 7? Should I use at least Delphi 8 or something for compiling?

    Hi Hakan,
    You must use Non-Unicode RFC library for Delphi 7.0.
    ( Bende Delphi 7.0 kullaniyorum. Ayni hatayi aldim. Unicode library kullanmistim. Kaldirip Non-Unicode olani kullandim. Su an hata yok. RFC cagirabiliyorum. )
    Mustafa Yalcin

  • 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 BPM - message expired

    Hi guys,
    I have a scenario with BPM where I'm doing a sync RFC call to ECC and then I want to process the result. However, the processing of BAPI take approx 5 minutes and my messages get expired after 3 minutes.
    How to resolve this issue?
    Thanks a lot,
    Olian

    Hello,
    Problem might be at BAPI end.  Please check BAPI by executing with your set of inputs. If BAPI goes for exception for yoru set of input values.. you may not get response from R3. So you might have error..
    secondly.. Please post the error in the communication channel and errro in the SXMB_Moni as well.
    Thanks,
    subbu

  • RFC call from MSSQL 2000 stored procedure

    Hi. I need call SAP RFC transaction from stored procedure of MS SQL Server 2000.
    When i'm execute example from T-SQL Help it's work perfect
    Examples
    A. Use Prog ID
    This example creates a SQL-DMO SQLServer object by using its ProgID.
    DECLARE @object int
    DECLARE @hr int
    DECLARE @src varchar(255), @desc varchar(255)
    EXEC @hr = sp_OACreate 'SQLDMO.SQLServer', @object OUT
    IF @hr <> 0
    BEGIN
       EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT
       SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc
        RETURN
    END
    When i'm execute:
    DECLARE @object int
    DECLARE @hr int
    DECLARE @src varchar(255), @desc varchar(255)
    EXEC @hr = sp_OACreate 'SAP.Functions',
        @object OUT
    IF @hr <> 0
    BEGIN
       EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT
       SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc
        RETURN
    END
    i'm recieve error:
    0x800401F3
    ODSOLE Extended Procedure
    Wrong string with class name
    BUT! This example work perfect via another way: in VBS script, in VBA macros, in Visual FoxPro program.
    What wrong in MS SQL ???

    Hi Vitaly Ashmarin.
    Pls, Did you solve this issue?
    Ty

  • Is there any way to limit the number of RFC calls from xMII to SAP R/3

    Hi All!
    I wanted to know whether the number of simultaneous RFC connections made from xMII to SAP R/3 system can be controlled in any way. Suppose we have a scenario wherein some million Sales Orders or Production Orders are to be updated in SAP R/3 from xMII in a short span of time. For all these updations to take place, multiple RFC calls will be established from xMII to SAP at the same time. This will increase the load on the SAP R/3 system and affect performance of the SAP R/3 system. Is there any check on xMII side to limit the number of RFC calls that can be made to SAP R/3 system?
    Regards
    Anupam

    Anupam,
    If you are using 11.5 just keep in mind that the JCO connection points to a single application server (based upon the SAP Server alias connection settings), but the traffic itself to make a BAPI request is effectively the same as any client user traffic.  There will obviously be limitations on performance and throughput, with network and server constraints added to the number and size of the R/3 requests, but there is no magic formula to plug-in because of all of these variables.
    If you are using 12.0 (or plan to migrate when it goes GA) then taking advantage of the JRA (java resource adapter) and the associated application server pooling that it offers on the NetWeaver side of things will greatly help you in the throughput capacity.
    If you have put some of your xMII application into either test or productive use and are running into issues then I would highly recommend entering the specifics into the customer / partner support portal so that they can help you through any associated problems.
    Regards,
    Jeremy Good

Maybe you are looking for

  • Z2 Waterproof, NOT!! DO NOT BUY THE Z2!

    So, I just got a Z2 two weeks ago. Used for a couple days and then took my daugther to a waterpark. Had the phone in my swinsuit pocket while running around after her. I made sure that both tabs were completly closed and at no point was the phone sub

  • How could I pass a value of metric to a script in QUERYDESCRIPTOR?

    It is possible to use the current or previous value of a metric as a argument to be passed to a script in QUERYDESCRIPTOR? As I am developing a MYSQL plug-in, and in my metadata xml file, I want to use the value of a metric I already defined as a arg

  • Woork book view problem

    Hi all , I am calculating td% cusing with %CT funation.It is working fine. When i changewd work book view like charcterstic into columns and key figuers in rows in this view td% values are not diplaying, it is displaying 'x' insted of values.But in o

  • "Unable to install the GEAR driver set at this time...."

    Hello, I have been having trouble installing iTunes. I uninstalled it because I wasn't able to put songs on my iPod. And when I tried to reinstall it, I got this error: "Unable to install the GEAR driver set at this time. The GEARAspiWDM service use

  • Reading images efficientl​y

    Hi all, I have a question that I want to ask before I start building my next application. I have a camera which sends me images to a specified folder and with specified name format. At the moment the name is taken as a data in the following format: 0