com.sap.conn.jco
Interface JCoFunction

All Superinterfaces:
Serializable

public interface JCoFunction
extends Serializable

Class that represents a function. A function instance consists of 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
 void execute(JCoDestination destination)
          Starts the execution of the function on the given destination.
 void execute(JCoDestination destination, String tid)
          Starts the execution of the function on the given destination.
 void execute(JCoDestination destination, String tid, String queueName)
          Starts the execution of the function on the given destination.
 JCoParameterList getChangingParameterList()
          Returns the list of changing parameters.
 AbapException getException(String key)
          Returns the ABAP exception for the specified key.
 AbapException[] getExceptionList()
          Returns the list of 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.
 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.
 String toXML()
          Returns the function as XML String.
 

Method Detail

getName

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 ABAP exceptions that can occur.

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

getException

AbapException getException(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 not defined

setAbapClassExceptionMode

void setAbapClassExceptionMode(AbapClassException.Mode mode)
Sets the mode for ABAP class exceptions. Enabling means 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
Starts the execution of the function on the given destination.

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,
             String tid)
             throws JCoException
Starts the execution of the function on the given destination.

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,
             String tid,
             String queueName)
             throws JCoException
Starts the execution of the function on the given destination.

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 to use for the qRFC call
Throws:
JCoException - if an exception occurred during the call execution

toXML

String toXML()
Returns the function as XML String. The format is depending on the implementation, and is not guaranteed. It's a more powerful toString() variant, that allows to view the function in XML viewing tools, which makes it easier to have a closer look at a single parameter. Please note, that this is just an XML fragment, 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 © 2015 SAP. All Rights Reserved.