SAP STATUS_TEXT_EDIT Function Module for The 4 Character Status is Edited within One Line (40 Character)
STATUS_TEXT_EDIT is a standard status text edit SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for The 4 Character Status is Edited within One Line (40 Character) 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 status text edit FM, simply by entering the name STATUS_TEXT_EDIT into the relevant SAP transaction such as SE37 or SE38.
Function Group: BSVA
Program Name: SAPLBSVA
Main Program: SAPLBSVA
Appliation area:
Release date: 05-Jan-2000
Mode(Normal, Remote etc): Normal Function Module
Update:
![](https://www.se80.co.uk/training-education/wp-content/uploads/2019/07/normal-function-module.png)
Function STATUS_TEXT_EDIT 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 'STATUS_TEXT_EDIT'"The 4 Character Status is Edited within One Line (40 Character).
EXPORTING
* CLIENT = SY-MANDT "Client (Only for Exceptional Cases!)
* FLG_USER_STAT = ' ' "'Edit User Status' Flag
OBJNR = "Status Object Number
* ONLY_ACTIVE = 'X' "'Only Take Active Statuses into Account' Flag
SPRAS = "Language, in which Statuses are Edited
* BYPASS_BUFFER = ' ' "'Read from DB' Flag
IMPORTING
ANW_STAT_EXISTING = "'User Statuses Exist' Flag
E_STSMA = "Status Profile
LINE = "Line of Edited System Individual Statuses
USER_LINE = "Line of Edited User Individual Statuses
STONR = "Status Number
EXCEPTIONS
OBJECT_NOT_FOUND = 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_SAPLBSVA_001 User Exit PP Order Processing (Non-Order-Type-Specific)
IMPORTING Parameters details for STATUS_TEXT_EDIT
CLIENT - Client (Only for Exceptional Cases!)
Data type: SY-MANDTDefault: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_USER_STAT - 'Edit User Status' Flag
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJNR - Status Object Number
Data type: JEST-OBJNROptional: No
Call by Reference: No ( called with pass by value option)
ONLY_ACTIVE - 'Only Take Active Statuses into Account' Flag
Data type: XFELDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SPRAS - Language, in which Statuses are Edited
Data type: SY-LANGUOptional: No
Call by Reference: No ( called with pass by value option)
BYPASS_BUFFER - 'Read from DB' Flag
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for STATUS_TEXT_EDIT
ANW_STAT_EXISTING - 'User Statuses Exist' Flag
Data type: XFELDOptional: No
Call by Reference: No ( called with pass by value option)
E_STSMA - Status Profile
Data type: JSTO-STSMAOptional: No
Call by Reference: No ( called with pass by value option)
LINE - Line of Edited System Individual Statuses
Data type: BSVX-STTXTOptional: No
Call by Reference: No ( called with pass by value option)
USER_LINE - Line of Edited User Individual Statuses
Data type: BSVX-STTXTOptional: No
Call by Reference: No ( called with pass by value option)
STONR - Status Number
Data type: TJ30-STONROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
OBJECT_NOT_FOUND - Status Object does not Exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for STATUS_TEXT_EDIT 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_client | TYPE SY-MANDT, " SY-MANDT | |||
lv_object_not_found | TYPE SY, " | |||
lv_anw_stat_existing | TYPE XFELD, " | |||
lv_e_stsma | TYPE JSTO-STSMA, " | |||
lv_flg_user_stat | TYPE XFELD, " ' ' | |||
lv_line | TYPE BSVX-STTXT, " | |||
lv_objnr | TYPE JEST-OBJNR, " | |||
lv_user_line | TYPE BSVX-STTXT, " | |||
lv_only_active | TYPE XFELD, " 'X' | |||
lv_spras | TYPE SY-LANGU, " | |||
lv_stonr | TYPE TJ30-STONR, " | |||
lv_bypass_buffer | TYPE XFELD. " ' ' |
  CALL FUNCTION 'STATUS_TEXT_EDIT' "The 4 Character Status is Edited within One Line (40 Character) |
EXPORTING | ||
CLIENT | = lv_client | |
FLG_USER_STAT | = lv_flg_user_stat | |
OBJNR | = lv_objnr | |
ONLY_ACTIVE | = lv_only_active | |
SPRAS | = lv_spras | |
BYPASS_BUFFER | = lv_bypass_buffer | |
IMPORTING | ||
ANW_STAT_EXISTING | = lv_anw_stat_existing | |
E_STSMA | = lv_e_stsma | |
LINE | = lv_line | |
USER_LINE | = lv_user_line | |
STONR | = lv_stonr | |
EXCEPTIONS | ||
OBJECT_NOT_FOUND = 1 | ||
. " STATUS_TEXT_EDIT |
ABAP code using 7.40 inline data declarations to call FM STATUS_TEXT_EDIT
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."SELECT single MANDT FROM SY INTO @DATA(ld_client). | ||||
DATA(ld_client) | = SY-MANDT. | |||
"SELECT single STSMA FROM JSTO INTO @DATA(ld_e_stsma). | ||||
DATA(ld_flg_user_stat) | = ' '. | |||
"SELECT single STTXT FROM BSVX INTO @DATA(ld_line). | ||||
"SELECT single OBJNR FROM JEST INTO @DATA(ld_objnr). | ||||
"SELECT single STTXT FROM BSVX INTO @DATA(ld_user_line). | ||||
DATA(ld_only_active) | = 'X'. | |||
"SELECT single LANGU FROM SY INTO @DATA(ld_spras). | ||||
"SELECT single STONR FROM TJ30 INTO @DATA(ld_stonr). | ||||
DATA(ld_bypass_buffer) | = ' '. | |||
Search for further information about these or an SAP related objects