SAP UPSCP_SET_EDITMODE Function Module for
UPSCP_SET_EDITMODE is a standard upscp set editmode 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 upscp set editmode FM, simply by entering the name UPSCP_SET_EDITMODE into the relevant SAP transaction such as SE37 or SE38.
Function Group: UPSCP
Program Name: SAPLUPSCP
Main Program: SAPLUPSCP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function UPSCP_SET_EDITMODE 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 'UPSCP_SET_EDITMODE'".
EXPORTING
IM_INSTID = "ALE Distribution Packet: ID for Instantiation
* FLG_EXIST = KUPS_TRUE "
* IM_EDITMODE = KUPS_DISPLAY "Processing type
* IM_VRGNG = ' ' "Business Transaction
* FLG_ENQUEUE = KUPS_TRUE "
* FLG_MSGCOLLECT = KUPS_FALSE "Collect Messages
TABLES
* EX_MESSAGES = "
EXCEPTIONS
DISPLAY_ONLY = 1 NO_AUTHORITY = 2 FOREIGN_LOCK = 3 SYSTEM_FAILED = 4 FAILING_INSTANCE = 5
IMPORTING Parameters details for UPSCP_SET_EDITMODE
IM_INSTID - ALE Distribution Packet: ID for Instantiation
Data type: UPS_INSTIDOptional: No
Call by Reference: Yes
FLG_EXIST -
Data type: XFELDDefault: KUPS_TRUE
Optional: Yes
Call by Reference: Yes
IM_EDITMODE - Processing type
Data type: UPS_EDITMODEDefault: KUPS_DISPLAY
Optional: Yes
Call by Reference: Yes
IM_VRGNG - Business Transaction
Data type: TJ01-VRGNGDefault: ' '
Optional: Yes
Call by Reference: Yes
FLG_ENQUEUE -
Data type: XFELDDefault: KUPS_TRUE
Optional: Yes
Call by Reference: Yes
FLG_MSGCOLLECT - Collect Messages
Data type: XFELDDefault: KUPS_FALSE
Optional: Yes
Call by Reference: Yes
TABLES Parameters details for UPSCP_SET_EDITMODE
EX_MESSAGES -
Data type: TUPSBAPIRET2Optional: Yes
Call by Reference: Yes
EXCEPTIONS details
DISPLAY_ONLY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORITY - No Authorization
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FOREIGN_LOCK - Object already locked
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SYSTEM_FAILED - Error in lock management
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FAILING_INSTANCE - Object Instance Not Available
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for UPSCP_SET_EDITMODE 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_im_instid | TYPE UPS_INSTID, " | |||
| lt_ex_messages | TYPE STANDARD TABLE OF TUPSBAPIRET2, " | |||
| lv_display_only | TYPE TUPSBAPIRET2, " | |||
| lv_flg_exist | TYPE XFELD, " KUPS_TRUE | |||
| lv_no_authority | TYPE XFELD, " | |||
| lv_im_editmode | TYPE UPS_EDITMODE, " KUPS_DISPLAY | |||
| lv_foreign_lock | TYPE UPS_EDITMODE, " | |||
| lv_im_vrgng | TYPE TJ01-VRGNG, " ' ' | |||
| lv_system_failed | TYPE TJ01, " | |||
| lv_flg_enqueue | TYPE XFELD, " KUPS_TRUE | |||
| lv_failing_instance | TYPE XFELD, " | |||
| lv_flg_msgcollect | TYPE XFELD. " KUPS_FALSE |
|   CALL FUNCTION 'UPSCP_SET_EDITMODE' " |
| EXPORTING | ||
| IM_INSTID | = lv_im_instid | |
| FLG_EXIST | = lv_flg_exist | |
| IM_EDITMODE | = lv_im_editmode | |
| IM_VRGNG | = lv_im_vrgng | |
| FLG_ENQUEUE | = lv_flg_enqueue | |
| FLG_MSGCOLLECT | = lv_flg_msgcollect | |
| TABLES | ||
| EX_MESSAGES | = lt_ex_messages | |
| EXCEPTIONS | ||
| DISPLAY_ONLY = 1 | ||
| NO_AUTHORITY = 2 | ||
| FOREIGN_LOCK = 3 | ||
| SYSTEM_FAILED = 4 | ||
| FAILING_INSTANCE = 5 | ||
| . " UPSCP_SET_EDITMODE | ||
ABAP code using 7.40 inline data declarations to call FM UPSCP_SET_EDITMODE
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_flg_exist) | = KUPS_TRUE. | |||
| DATA(ld_im_editmode) | = KUPS_DISPLAY. | |||
| "SELECT single VRGNG FROM TJ01 INTO @DATA(ld_im_vrgng). | ||||
| DATA(ld_im_vrgng) | = ' '. | |||
| DATA(ld_flg_enqueue) | = KUPS_TRUE. | |||
| DATA(ld_flg_msgcollect) | = KUPS_FALSE. | |||
Search for further information about these or an SAP related objects