SAP EWO_REPORTNAME_CONSTRUCT Function Module for NOTRANSL: Konstruiert einen Reportnamen aus Prefix, Mandant, magic und Suf
EWO_REPORTNAME_CONSTRUCT is a standard ewo reportname construct SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Konstruiert einen Reportnamen aus Prefix, Mandant, magic und Suf 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 ewo reportname construct FM, simply by entering the name EWO_REPORTNAME_CONSTRUCT into the relevant SAP transaction such as SE37 or SE38.
Function Group: EWO2
Program Name: SAPLEWO2
Main Program: SAPLEWO2
Appliation area: E
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function EWO_REPORTNAME_CONSTRUCT 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 'EWO_REPORTNAME_CONSTRUCT'"NOTRANSL: Konstruiert einen Reportnamen aus Prefix, Mandant, magic und Suf.
EXPORTING
* X_MAGIC = '01' "Call context ID for editor step
X_KEY = "Suffix for report name of a generated report (CCPROCED)
IMPORTING
Y_REPORTNAME = "ABAP Program Name
EXCEPTIONS
KEY_IS_INITIAL = 1
IMPORTING Parameters details for EWO_REPORTNAME_CONSTRUCT
X_MAGIC - Call context ID for editor step
Data type: EBAGEN-MAGIC_EDIT_CNTXTDefault: '01'
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_KEY - Suffix for report name of a generated report (CCPROCED)
Data type: EBAGEN-RNAME_SUFFIXOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for EWO_REPORTNAME_CONSTRUCT
Y_REPORTNAME - ABAP Program Name
Data type: TRDIR-NAMEOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
KEY_IS_INITIAL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EWO_REPORTNAME_CONSTRUCT 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_x_magic | TYPE EBAGEN-MAGIC_EDIT_CNTXT, " '01' | |||
lv_y_reportname | TYPE TRDIR-NAME, " | |||
lv_key_is_initial | TYPE TRDIR, " | |||
lv_x_key | TYPE EBAGEN-RNAME_SUFFIX. " |
  CALL FUNCTION 'EWO_REPORTNAME_CONSTRUCT' "NOTRANSL: Konstruiert einen Reportnamen aus Prefix, Mandant, magic und Suf |
EXPORTING | ||
X_MAGIC | = lv_x_magic | |
X_KEY | = lv_x_key | |
IMPORTING | ||
Y_REPORTNAME | = lv_y_reportname | |
EXCEPTIONS | ||
KEY_IS_INITIAL = 1 | ||
. " EWO_REPORTNAME_CONSTRUCT |
ABAP code using 7.40 inline data declarations to call FM EWO_REPORTNAME_CONSTRUCT
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 MAGIC_EDIT_CNTXT FROM EBAGEN INTO @DATA(ld_x_magic). | ||||
DATA(ld_x_magic) | = '01'. | |||
"SELECT single NAME FROM TRDIR INTO @DATA(ld_y_reportname). | ||||
"SELECT single RNAME_SUFFIX FROM EBAGEN INTO @DATA(ld_x_key). | ||||
Search for further information about these or an SAP related objects