com.sap.conn.jco
Interface JCoFunction

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable

public interface JCoFunction
extends java.lang.Cloneable, java.io.Serializable

Class that represents a function. A function instance consists of a name, an import parameter list, a changing parameter list, an export parameter list and a table parameter list. Moreover, it can have a list of AbapExceptions.


Method Summary
 JCoFunction clone()
          Clones this JCoFunction instance.
 void execute(JCoDestination destination)
          Executes the function on the given target destination synchronously using the sRfc protocol.
 void execute(JCoDestination destination, java.lang.String tid)
          Executes the function on the given target destination in transactional mode using the tRfc protocol.
 void execute(JCoDestination destination, java.lang.String tid, java.lang.String queueName)
          Executes the function on the given target destination in queued transactional mode using the qRfc protocol.
 JCoParameterList getChangingParameterList()
          Returns the list of changing parameters.
 AbapException getException(java.lang.String key)
          Returns the ABAP exception for the specified key.
 AbapException[] getExceptionList()
          Returns the list of defined ABAP exceptions that can occur.
 JCoParameterList getExportParameterList()
          Returns the list of export parameters.
 JCoFunctionTemplate getFunctionTemplate()
          Returns the function template, i.e.
 JCoParameterList getImportParameterList()
          Returns the list import parameters.
 java.lang.String getName()
          Returns the function name.
 JCoParameterList getTableParameterList()
          Returns the list of table parameters.
 boolean isAbapClassExceptionEnabled()
          Returns the boolean value that indicates whether or not the server is permitted to transmit an ABAP class exception when executing this function.
 void setAbapClassExceptionMode(AbapClassException.Mode mode)
          Sets the mode for ABAP class exceptions.
 java.lang.String toXML()
          Returns the function as an XML string.
 

Method Detail

clone

JCoFunction clone()
Clones this JCoFunction instance.

Returns:
a clone of this instance
Since:
JCo 3.0.14

getName

java.lang.String getName()
Returns the function name.

Returns:
the name of the function

getImportParameterList

JCoParameterList getImportParameterList()
Returns the list import parameters.

Returns:
the import parameters or null if the function does not have any import parameters

getExportParameterList

JCoParameterList getExportParameterList()
Returns the list of export parameters.

Returns:
the export parameters or null if the function does not have any export parameters

getChangingParameterList

JCoParameterList getChangingParameterList()
Returns the list of changing parameters.

Returns:
the export parameters or null if the function does not have any changing parameters

getTableParameterList

JCoParameterList getTableParameterList()
Returns the list of table parameters.

Returns:
the table parameters or null if the function does not have any table parameters

getExceptionList

AbapException[] getExceptionList()
Returns the list of defined ABAP exceptions that can occur.

Returns:
the list of exceptions or null if the function does not have any defined ABAP runtime exceptions

getException

AbapException getException(java.lang.String key)
Returns the ABAP exception for the specified key.

Parameters:
key - ABAP's error key
Returns:
the ABAP exception for the specified key or null if it is not defined

setAbapClassExceptionMode

void setAbapClassExceptionMode(AbapClassException.Mode mode)
Sets the mode for ABAP class exceptions. Enabling means that the ABAP server is permitted to transmit an ABAP class exception, whereas disabling signifies that the server must not transmit such an exception.

Parameters:
mode - the value determining whether ABAP class exceptions are permitted (full or limited to the exception chain) or not

isAbapClassExceptionEnabled

boolean isAbapClassExceptionEnabled()
Returns the boolean value that indicates whether or not the server is permitted to transmit an ABAP class exception when executing this function.

Returns:
true or false depending on whether transmitting ABAP class exceptions is permitted or not, respectively

execute

void execute(JCoDestination destination)
             throws JCoException
Executes the function on the given target destination synchronously using the sRfc protocol.

Parameters:
destination - the destination on which the function module should be executed
Throws:
JCoException - if an exception occurred during the call execution

execute

void execute(JCoDestination destination,
             java.lang.String tid)
             throws JCoException
Executes the function on the given target destination in transactional mode using the tRfc protocol.

Parameters:
destination - the destination on which the function module should be executed
tid - the transaction ID to use for the tRFC call
Throws:
JCoException - if an exception occurred during the call execution

execute

void execute(JCoDestination destination,
             java.lang.String tid,
             java.lang.String queueName)
             throws JCoException
Executes the function on the given target destination in queued transactional mode using the qRfc protocol.

Parameters:
destination - the destination on which the function module should be executed
tid - the transaction ID to use for the qRFC call
queueName - the inbound queue name to use for the qRFC call
Throws:
JCoException - if an exception occurred during the call execution

toXML

java.lang.String toXML()
Returns the function as an XML string. Its format depends on the used interface implementation and is not guaranteed to remain stable. This method is meant to be used as a more powerful toString() variant which allows to view the function within XML viewing tools thus making it easier to have a closer look at single parameter values.
Please note that only an XML fragment is returned which does not include an XML header.

Returns:
the function serialized in XML format

getFunctionTemplate

JCoFunctionTemplate getFunctionTemplate()
Returns the function template, i.e. the description of the function and its parameters, which was used to create this function instance.

Returns:
the function template


Copyright © 2008-2016 SAP SE. All Rights Reserved.