Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 23.1

The Designer offers to communicate with an SAP server via the SAP RFC (Remote Function Call) protocol. You can invoke RFC functions using the SAP adapter, e.g. RFC enabled ABAP programs can be called as RFC functions. When calling RFC functions, the xUML service acts as an RFC client.

This requires the following steps:

1. Define the

SAP interface, resp. the RFC arguments.
  • Use the SAP adapter to perform an RFC.
  • Defining the SAP Interface

    The adapter interface follows the SAP ABAP conventions. Each SAP ABAP function has four parameter sections:

    • import (input)
    • export (output)
    • changing (input/output)
    • tables (IDoc handling)

    These parameters are mapped to the input and output parameters of the SAP adapter:

    Multiexcerpt include
    MultiExcerptNameparameters_saprfcadapter
    PageWithExcerptSAP
    shouldDisplayInlineCommentsInIncludesfalse

    SAP Parameters

    You need dedicated classes describing the interface of the RFC and the parameters. When calling for example the RFC_SYSTEM_INFO function, we need a set of export (output) parameters defined as properties on a dedicated class Export.

    Image Removed

    To specify the type mapping (see also SAP - ABAP Types Mappings), each property needs to have the stereotypes SAPIDocAttribute and XMLElement, that can have the following stereotype attributes:

    AttributeDescriptionMandatory
    nativeType

    Specify the native ABAP type. For allowed types and valid internal/native type combinations see appendix beneath.

    mandatory
    internalLengthSpecify the parameter length as given in the ABAP dictionary (except for FLT, INT, DATS, TIMS).mandatory
    decimalsSpecify the number of decimals if there are any.mandatory for native type DEC
    Info

    In any case, the upper multiplicity of the properties or associations must NOT be greater than one. Otherwise, the classes cannot be mapped to SAP parameters and SAP tables should be used instead.

    So, for the RFC_SYSTEM_INFO example, the structure would look like the following:

    RFC_SYSTEM_INFO ExampleStereotypeStereotype Attributes

    Image Removed

    SAP

    Image Removed

    Interfaces

    Image Removed

    RFCPort_RFC_SYSTEM_INFOSAPRFCModuleInterface

    Image Removed

    RFC_SYSTEM_INFO

    SOAPRPCOperation

    Image Removed

    out export : Export

    Image Removed

    Types

    Image Removed

    Export

     SAPParameters

    Image Removed

    CURRENT_RESOURCES : Integer

    Image Removed

    MAXIMAL_RESOURCES : Integer

    Image Removed

    RECOMMENDED_DELAY : Integer

    Image Removed

    RFCSI_EXPORT : RFCSI

    Image Removed

    RFCSI

    SAPStructure

    Image Removed

    RFCCHARTYPE : String

    SAPIDocAttribute

    • nativeType = CHAR
    • internalLenght = 4

    XMLElement

    • order = 2

    Image Removed

    RFCDATABS : String

    SAPIDocAttribute

    • nativeType = CHAR
    • internalLenght = 8

    XMLElement

    • order = 8

    Connection to an SAP System

    To define the connection to an SAP system, you can

    2. Perform an RFC Call Using the SAP Adapter

    Once you have created an SAP connector to your service (or defined the interface manually), you can add ABAP function calls via RFC from the connector to any diagram to create an SAP adapter to your service.

    ...

    ......

    The listed order attribute of the property derives from the order in the SAP data structure RFCSI.

    Image Removed

    The SAP types yet supported are listed on Native SAP - ABAP - xUML Base Type Mappings. Each SAP native type is mapped to an xUML base type. Because SAP types are sometimes restricted in their length and number of decimals, use stereotype attributes to transport this meta information as shown ion the table above.
    For details on the native type definitions, refer to the SAP documentation.

    Calling ABAP Functions via RFC

    Call the ABAP function via RFC by dragging it onto a diagram. 
    1. Add an operation from the SAP connector to a diagram to add a REST adapter.

    1. You can drag out operations from the data model to any diagram:
    The example below shows how to add a
    1. Configure the SAP adapter

    operation to an BPMN execution diagram.

    Image Removed

    It needs to get stereotype SAPRFCAdapter applied. The stereotype attribute alias points to the alias that defines the route to the SAP system that should be accessed.

    Configuring the SAP Adapter Operation

    Once a SAP operation has been added to a diagram, it needs to be configured as a SAP adapter.

    Image Removed

    Select the newly added SAP adapter operation and switch to the Attributes panel. Depending on the diagram type you can see the following information (example BPMN execution diagram):

    AttributeDescriptionAllowed Values / ExamplesNameThe name of the SAP adapter operation. RFC_SYSTEM_INFO TypeThe path to the operation within the data model. SAP.Interfaces.RFCPort_RFC_SYSTEM_INFO Symbol Type
    Operations added to an execution diagram are execution steps.Execution Step

    All of this is predefined and cannot be changed.

    1. to your needs.

      Info

      SAP RFC adapter operations need to get stereotype SAP RFC Adapter applied.

      Refer to SAP for more information on the configuration options of this adapter.

    Refer to Using Connectors for more information

    Image Removed

    Click Add Stereotype to define the selected operation as to bea SAP adapter.

    Image Removed

    Select SAPRFCAdapter from the list of available adapter stereotypes.
    Click Save.

    Image Removed

    The Attributes panel now shows the added adapter stereotype. Now you still need to configure the adapter.

    Expand the stereotype by clicking the arrow on the right.

    Image Removed

    A SAP adapter is configured via its alias.

    Click the  Image Removed  icon to add an alias to the SAP adapter.

    Image Removed

    You can select an existing alias from a drop-down list by clicking the text Select alias.

    If you want to remove an added alias, click the  Image Removed  icon on the right or select None from the drop-down list:

    Image Removed

    Image Removed

    You can also create and add a new alias by clicking the corresponding  Image Removed  icon.

    Refer to Aliases for more information on how to create a new alias.

    Image Removed

    A new dialog opens where you can name and configure the new alias.

    Refer to SAP for more information on the configuration options of this adapter

    .

    Otp
    Floatingfalse

    Multiexcerpt include
    SpaceWithExcerptINTERNAL
    MultiExcerptNameSAPAdapter_RFC_Example
    PageWithExcerptINTERNAL:_designer_examples
    shouldDisplayInlineCommentsInIncludesfalse

    Rp

    Children Display
    depth1
    pageSAP Adapter