SAP SWUO_CREATE_TEMPLATE_API Function Module for









SWUO_CREATE_TEMPLATE_API is a standard swuo create template api SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for swuo create template api FM, simply by entering the name SWUO_CREATE_TEMPLATE_API into the relevant SAP transaction such as SE37 or SE38.

Function Group: SWUO_OI
Program Name: SAPLSWUO_OI
Main Program: SAPLSWUO_OI
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SWUO_CREATE_TEMPLATE_API pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'SWUO_CREATE_TEMPLATE_API'"
EXPORTING
WF_ID_DEF = "ID of Workflow Definition
WF_VERSION = "
* DOC_TYPE = ' ' "
* CONTAINER_REF = "Container - Implementation of a 'Collection'

IMPORTING
PROPERTIES = "

TABLES
* CONTAINER = "Workflow container

EXCEPTIONS
WF_NOT_SPECIFIED = 1 CREATE_FAILED = 2
.



IMPORTING Parameters details for SWUO_CREATE_TEMPLATE_API

WF_ID_DEF - ID of Workflow Definition

Data type: SWD_WFD_ID
Optional: No
Call by Reference: No ( called with pass by value option)

WF_VERSION -

Data type: SWD_VERSIO
Optional: No
Call by Reference: No ( called with pass by value option)

DOC_TYPE -

Data type: SWUO_DTYPE
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CONTAINER_REF - Container - Implementation of a 'Collection'

Data type: IF_SWF_CNT_CONTAINER
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SWUO_CREATE_TEMPLATE_API

PROPERTIES -

Data type: SWUOPROP
Optional: No
Call by Reference: Yes

TABLES Parameters details for SWUO_CREATE_TEMPLATE_API

CONTAINER - Workflow container

Data type: SWCONTDEF
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

WF_NOT_SPECIFIED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

CREATE_FAILED -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SWUO_CREATE_TEMPLATE_API Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lt_container  TYPE STANDARD TABLE OF SWCONTDEF, "   
lv_wf_id_def  TYPE SWD_WFD_ID, "   
lv_properties  TYPE SWUOPROP, "   
lv_wf_not_specified  TYPE SWUOPROP, "   
lv_wf_version  TYPE SWD_VERSIO, "   
lv_create_failed  TYPE SWD_VERSIO, "   
lv_doc_type  TYPE SWUO_DTYPE, "   SPACE
lv_container_ref  TYPE IF_SWF_CNT_CONTAINER. "   

  CALL FUNCTION 'SWUO_CREATE_TEMPLATE_API'  "
    EXPORTING
         WF_ID_DEF = lv_wf_id_def
         WF_VERSION = lv_wf_version
         DOC_TYPE = lv_doc_type
         CONTAINER_REF = lv_container_ref
    IMPORTING
         PROPERTIES = lv_properties
    TABLES
         CONTAINER = lt_container
    EXCEPTIONS
        WF_NOT_SPECIFIED = 1
        CREATE_FAILED = 2
. " SWUO_CREATE_TEMPLATE_API




ABAP code using 7.40 inline data declarations to call FM SWUO_CREATE_TEMPLATE_API

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
 
 
DATA(ld_doc_type) = ' '.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!