CALCULATE_PRIORITY is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name CALCULATE_PRIORITY into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
IWO8
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'CALCULATE_PRIORITY' "Priority Calculation
EXPORTING
* i_qmtyp = " tq80-qmtyp Message Category
i_artpr = " t356-artpr Priority type
i_priok = " t356-priok Priority
i_strmn = " viqmel-strmn Start date - date
* i_strur = " viqmel-strur Start date - time
* i_ltrmn = " viqmel-ltrmn
* i_ltrur = " viqmel-ltrur
* i_calid = " thoci-ident Factory Calendar ID
* i_warpl = " viqmel-warpl Maintenance Plan
* i_flg_popup = 'X' " c
IMPORTING
e_strmn = " viqmel-strmn Start date - date
e_strur = " viqmel-strur Start date - time
e_ltrmn = " viqmel-ltrmn End date - date
e_ltrur = " viqmel-ltrur End date - time
e_priokx = " t356_t-priokx Priority text
EXCEPTIONS
INVALID_PRIO = 1 " Invalid priority type
INVALID_DATE = 2 " Invalid start date
DIMENSION_NOT_FOUND = 3 " No dimension maintained for specified exponents
UNIT_NOT_FOUND = 4 " Unit missing in the check table
. " CALCULATE_PRIORITY
The ABAP code below is a full code listing to execute function module CALCULATE_PRIORITY including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| ld_e_strmn | TYPE VIQMEL-STRMN , |
| ld_e_strur | TYPE VIQMEL-STRUR , |
| ld_e_ltrmn | TYPE VIQMEL-LTRMN , |
| ld_e_ltrur | TYPE VIQMEL-LTRUR , |
| ld_e_priokx | TYPE T356_T-PRIOKX . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_e_strmn | TYPE VIQMEL-STRMN , |
| ld_i_qmtyp | TYPE TQ80-QMTYP , |
| ld_e_strur | TYPE VIQMEL-STRUR , |
| ld_i_artpr | TYPE T356-ARTPR , |
| ld_e_ltrmn | TYPE VIQMEL-LTRMN , |
| ld_i_priok | TYPE T356-PRIOK , |
| ld_e_ltrur | TYPE VIQMEL-LTRUR , |
| ld_i_strmn | TYPE VIQMEL-STRMN , |
| ld_e_priokx | TYPE T356_T-PRIOKX , |
| ld_i_strur | TYPE VIQMEL-STRUR , |
| ld_i_ltrmn | TYPE VIQMEL-LTRMN , |
| ld_i_ltrur | TYPE VIQMEL-LTRUR , |
| ld_i_calid | TYPE THOCI-IDENT , |
| ld_i_warpl | TYPE VIQMEL-WARPL , |
| ld_i_flg_popup | TYPE C . |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CALCULATE_PRIORITY or its description.