SAP SKWF_CTX_CREATE Function Module for Create Context
SKWF_CTX_CREATE is a standard skwf ctx create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create Context processing and below is the pattern details for this FM, 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 skwf ctx create FM, simply by entering the name SKWF_CTX_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: SKWF_CONTEXT
Program Name: SAPLSKWF_CONTEXT
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function SKWF_CTX_CREATE 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 'SKWF_CTX_CREATE'"Create Context.
EXPORTING
* CONTEXT_CLASS = "Context class
* X_REDUCE_TO_ONE = 'X' "
* DESCRIPTION = "Short Description
* X_TRANSIENT = "
IMPORTING
ERROR = "KW Framework: Error Object
CONTEXT_ID = "
TABLES
* INSTANCE_SELECTORS = "
IMPORTING Parameters details for SKWF_CTX_CREATE
CONTEXT_CLASS - Context class
Data type: SDOK_ENTOptional: Yes
Call by Reference: No ( called with pass by value option)
X_REDUCE_TO_ONE -
Data type: SKWF_FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DESCRIPTION - Short Description
Data type: SKWF_DESCROptional: Yes
Call by Reference: No ( called with pass by value option)
X_TRANSIENT -
Data type: SKWF_FLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SKWF_CTX_CREATE
ERROR - KW Framework: Error Object
Data type: SKWF_ERROROptional: No
Call by Reference: No ( called with pass by value option)
CONTEXT_ID -
Data type: SKWF_CTXIDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SKWF_CTX_CREATE
INSTANCE_SELECTORS -
Data type: SDOKCXSELOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for SKWF_CTX_CREATE 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: | ||||
| lv_error | TYPE SKWF_ERROR, " | |||
| lv_context_class | TYPE SDOK_ENT, " | |||
| lt_instance_selectors | TYPE STANDARD TABLE OF SDOKCXSEL, " | |||
| lv_context_id | TYPE SKWF_CTXID, " | |||
| lv_x_reduce_to_one | TYPE SKWF_FLAG, " 'X' | |||
| lv_description | TYPE SKWF_DESCR, " | |||
| lv_x_transient | TYPE SKWF_FLAG. " |
|   CALL FUNCTION 'SKWF_CTX_CREATE' "Create Context |
| EXPORTING | ||
| CONTEXT_CLASS | = lv_context_class | |
| X_REDUCE_TO_ONE | = lv_x_reduce_to_one | |
| DESCRIPTION | = lv_description | |
| X_TRANSIENT | = lv_x_transient | |
| IMPORTING | ||
| ERROR | = lv_error | |
| CONTEXT_ID | = lv_context_id | |
| TABLES | ||
| INSTANCE_SELECTORS | = lt_instance_selectors | |
| . " SKWF_CTX_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM SKWF_CTX_CREATE
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_x_reduce_to_one) | = 'X'. | |||
Search for further information about these or an SAP related objects