SAP ADRT10_GET_PRIO_FOR_ORPRT Function Module for Get Priority for rotable order on operation level (lights)
ADRT10_GET_PRIO_FOR_ORPRT is a standard adrt10 get prio for orprt SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get Priority for rotable order on operation level (lights) 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 adrt10 get prio for orprt FM, simply by entering the name ADRT10_GET_PRIO_FOR_ORPRT into the relevant SAP transaction such as SE37 or SE38.
Function Group: ADRT10
Program Name: SAPLADRT10
Main Program: SAPLADRT10
Appliation area: I
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ADRT10_GET_PRIO_FOR_ORPRT 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 'ADRT10_GET_PRIO_FOR_ORPRT'"Get Priority for rotable order on operation level (lights).
EXPORTING
IS_AFVGD = "order operation data (1st op!)
IV_ORCOD = "order header rotable code
* IV_COMPONENT = "material/equipment of order header
* IV_LGORT = "main st.loc. of order header
IS_CAUFVD = "order header
IV_PRVAL_ORDER = "Priority for SM/PM orders with rotable type
* IS_ADPMPRIOPRF = "CMC Profile
IMPORTING
EV_PRVAL_OP = "traffic light alert
EV_MISENDCF = "Ind : Missing Endconfirmation
EV_MISCNF = "Ind : Missing (partial-) confirmation
TABLES
* IT_AFVGD = "contains all operations
EXCEPTIONS
WRONG_INPUT = 1 WRONG_ORCOD = 2 NO_PRIORITIES_MAINTAINED = 3 INTERNAL_ERROR = 4 PROFILE_NOT_FOUND = 5
IMPORTING Parameters details for ADRT10_GET_PRIO_FOR_ORPRT
IS_AFVGD - order operation data (1st op!)
Data type: AFVGDGETOptional: No
Call by Reference: No ( called with pass by value option)
IV_ORCOD - order header rotable code
Data type: ADPMPRIOHD-ORCODOptional: No
Call by Reference: No ( called with pass by value option)
IV_COMPONENT - material/equipment of order header
Data type: MARA-MATNROptional: Yes
Call by Reference: No ( called with pass by value option)
IV_LGORT - main st.loc. of order header
Data type: MARD-LGORTOptional: Yes
Call by Reference: No ( called with pass by value option)
IS_CAUFVD - order header
Data type: CAUFVDOptional: No
Call by Reference: No ( called with pass by value option)
IV_PRVAL_ORDER - Priority for SM/PM orders with rotable type
Data type: ADPMPRIOSUB-PRVALOptional: No
Call by Reference: No ( called with pass by value option)
IS_ADPMPRIOPRF - CMC Profile
Data type: ADPMPRIOPRFOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for ADRT10_GET_PRIO_FOR_ORPRT
EV_PRVAL_OP - traffic light alert
Data type: ADPMPRIOSUB-PRVALOptional: No
Call by Reference: Yes
EV_MISENDCF - Ind : Missing Endconfirmation
Data type: ADPM_MISENDCNFOptional: No
Call by Reference: Yes
EV_MISCNF - Ind : Missing (partial-) confirmation
Data type: ADPM_MISCNFOptional: No
Call by Reference: Yes
TABLES Parameters details for ADRT10_GET_PRIO_FOR_ORPRT
IT_AFVGD - contains all operations
Data type: AFVGDGETOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
WRONG_INPUT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_ORCOD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_PRIORITIES_MAINTAINED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROFILE_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ADRT10_GET_PRIO_FOR_ORPRT 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_is_afvgd | TYPE AFVGDGET, " | |||
| lt_it_afvgd | TYPE STANDARD TABLE OF AFVGDGET, " | |||
| lv_ev_prval_op | TYPE ADPMPRIOSUB-PRVAL, " | |||
| lv_wrong_input | TYPE ADPMPRIOSUB, " | |||
| lv_iv_orcod | TYPE ADPMPRIOHD-ORCOD, " | |||
| lv_ev_misendcf | TYPE ADPM_MISENDCNF, " | |||
| lv_wrong_orcod | TYPE ADPM_MISENDCNF, " | |||
| lv_ev_miscnf | TYPE ADPM_MISCNF, " | |||
| lv_iv_component | TYPE MARA-MATNR, " | |||
| lv_no_priorities_maintained | TYPE MARA, " | |||
| lv_iv_lgort | TYPE MARD-LGORT, " | |||
| lv_internal_error | TYPE MARD, " | |||
| lv_is_caufvd | TYPE CAUFVD, " | |||
| lv_profile_not_found | TYPE CAUFVD, " | |||
| lv_iv_prval_order | TYPE ADPMPRIOSUB-PRVAL, " | |||
| lv_is_adpmprioprf | TYPE ADPMPRIOPRF. " |
|   CALL FUNCTION 'ADRT10_GET_PRIO_FOR_ORPRT' "Get Priority for rotable order on operation level (lights) |
| EXPORTING | ||
| IS_AFVGD | = lv_is_afvgd | |
| IV_ORCOD | = lv_iv_orcod | |
| IV_COMPONENT | = lv_iv_component | |
| IV_LGORT | = lv_iv_lgort | |
| IS_CAUFVD | = lv_is_caufvd | |
| IV_PRVAL_ORDER | = lv_iv_prval_order | |
| IS_ADPMPRIOPRF | = lv_is_adpmprioprf | |
| IMPORTING | ||
| EV_PRVAL_OP | = lv_ev_prval_op | |
| EV_MISENDCF | = lv_ev_misendcf | |
| EV_MISCNF | = lv_ev_miscnf | |
| TABLES | ||
| IT_AFVGD | = lt_it_afvgd | |
| EXCEPTIONS | ||
| WRONG_INPUT = 1 | ||
| WRONG_ORCOD = 2 | ||
| NO_PRIORITIES_MAINTAINED = 3 | ||
| INTERNAL_ERROR = 4 | ||
| PROFILE_NOT_FOUND = 5 | ||
| . " ADRT10_GET_PRIO_FOR_ORPRT | ||
ABAP code using 7.40 inline data declarations to call FM ADRT10_GET_PRIO_FOR_ORPRT
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 PRVAL FROM ADPMPRIOSUB INTO @DATA(ld_ev_prval_op). | ||||
| "SELECT single ORCOD FROM ADPMPRIOHD INTO @DATA(ld_iv_orcod). | ||||
| "SELECT single MATNR FROM MARA INTO @DATA(ld_iv_component). | ||||
| "SELECT single LGORT FROM MARD INTO @DATA(ld_iv_lgort). | ||||
| "SELECT single PRVAL FROM ADPMPRIOSUB INTO @DATA(ld_iv_prval_order). | ||||
Search for further information about these or an SAP related objects