SAP EDITOR_PROGRAM Function Module for
EDITOR_PROGRAM is a standard editor program 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 editor program FM, simply by entering the name EDITOR_PROGRAM into the relevant SAP transaction such as SE37 or SE38.
Function Group: S38E
Program Name: SAPLS38E
Main Program: SAPLS38E
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function EDITOR_PROGRAM 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 'EDITOR_PROGRAM'".
EXPORTING
* APPID = ' ' "Application ID: PG = program, FB = function module
* TRDIR_INF = ' ' "
* STATUS = ' ' "ABAP: Program Status (Active, Saved, Transported...)
* ORIGINAL_POS_FLAG = 'X' "
* DISPLAY = ' ' "X = for display only
* FBNAME = ' ' "Name the function module for application FB
* LINE = '000001' "Cursor line
* MESSAGE = ' ' "Message displayed after call
* OFFSET = '00' "Cursor offset
PROGRAM = "Program name / Include name
* TOPLINE = '000000' "Upper line on editor screen
* VARIED = ' ' "
IMPORTING
DYNPRO = "
EVENT = "
FCODE = "Function code with which editor was terminated
MODULE = "
SUBRC = "
EXCEPTIONS
APPLICATION = 1
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLS38E_001 Exit for ABAP Editor
IMPORTING Parameters details for EDITOR_PROGRAM
APPID - Application ID: PG = program, FB = function module
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TRDIR_INF -
Data type: TRDIRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
STATUS - ABAP: Program Status (Active, Saved, Transported...)
Data type: PROGDIR-STATEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ORIGINAL_POS_FLAG -
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DISPLAY - X = for display only
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FBNAME - Name the function module for application FB
Data type: TFDIR-FUNCNAMEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LINE - Cursor line
Data type:Default: '000001'
Optional: Yes
Call by Reference: No ( called with pass by value option)
MESSAGE - Message displayed after call
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OFFSET - Cursor offset
Data type:Default: '00'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PROGRAM - Program name / Include name
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TOPLINE - Upper line on editor screen
Data type:Default: '000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
VARIED -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for EDITOR_PROGRAM
DYNPRO -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EVENT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FCODE - Function code with which editor was terminated
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MODULE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SUBRC -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
APPLICATION -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for EDITOR_PROGRAM 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_appid | TYPE STRING, " ' ' | |||
lv_dynpro | TYPE STRING, " | |||
lv_application | TYPE STRING, " | |||
lv_trdir_inf | TYPE TRDIR, " SPACE | |||
lv_status | TYPE PROGDIR-STATE, " SPACE | |||
lv_original_pos_flag | TYPE CHAR1, " 'X' | |||
lv_event | TYPE CHAR1, " | |||
lv_display | TYPE CHAR1, " SPACE | |||
lv_fcode | TYPE CHAR1, " | |||
lv_fbname | TYPE TFDIR-FUNCNAME, " SPACE | |||
lv_line | TYPE TFDIR, " '000001' | |||
lv_module | TYPE TFDIR, " | |||
lv_subrc | TYPE SY-SUBRC, " | |||
lv_message | TYPE SY, " SPACE | |||
lv_offset | TYPE SY, " '00' | |||
lv_program | TYPE SY, " | |||
lv_topline | TYPE SY, " '000000' | |||
lv_varied | TYPE SY. " SPACE |
  CALL FUNCTION 'EDITOR_PROGRAM' " |
EXPORTING | ||
APPID | = lv_appid | |
TRDIR_INF | = lv_trdir_inf | |
STATUS | = lv_status | |
ORIGINAL_POS_FLAG | = lv_original_pos_flag | |
DISPLAY | = lv_display | |
FBNAME | = lv_fbname | |
LINE | = lv_line | |
MESSAGE | = lv_message | |
OFFSET | = lv_offset | |
PROGRAM | = lv_program | |
TOPLINE | = lv_topline | |
VARIED | = lv_varied | |
IMPORTING | ||
DYNPRO | = lv_dynpro | |
EVENT | = lv_event | |
FCODE | = lv_fcode | |
MODULE | = lv_module | |
SUBRC | = lv_subrc | |
EXCEPTIONS | ||
APPLICATION = 1 | ||
. " EDITOR_PROGRAM |
ABAP code using 7.40 inline data declarations to call FM EDITOR_PROGRAM
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_appid) | = ' '. | |||
DATA(ld_trdir_inf) | = ' '. | |||
"SELECT single STATE FROM PROGDIR INTO @DATA(ld_status). | ||||
DATA(ld_status) | = ' '. | |||
DATA(ld_original_pos_flag) | = 'X'. | |||
DATA(ld_display) | = ' '. | |||
"SELECT single FUNCNAME FROM TFDIR INTO @DATA(ld_fbname). | ||||
DATA(ld_fbname) | = ' '. | |||
DATA(ld_line) | = '000001'. | |||
"SELECT single SUBRC FROM SY INTO @DATA(ld_subrc). | ||||
DATA(ld_message) | = ' '. | |||
DATA(ld_offset) | = '00'. | |||
DATA(ld_topline) | = '000000'. | |||
DATA(ld_varied) | = ' '. | |||
Search for further information about these or an SAP related objects