SAP OIU_DN_GET_NEXT_NODE_UPSTRM Function Module for Get next node upstream
OIU_DN_GET_NEXT_NODE_UPSTRM is a standard oiu dn get next node upstrm 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 next node upstream 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 oiu dn get next node upstrm FM, simply by entering the name OIU_DN_GET_NEXT_NODE_UPSTRM into the relevant SAP transaction such as SE37 or SE38.
Function Group: OIU_DN_COMMON
Program Name: SAPLOIU_DN_COMMON
Main Program: SAPLOIU_DN_COMMON
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OIU_DN_GET_NEXT_NODE_UPSTRM 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 'OIU_DN_GET_NEXT_NODE_UPSTRM'"Get next node upstream.
EXPORTING
I_REF_NO = "From OIU_DN_EXPAND
* I_LVL = "Stay at or above this level
IMPORTING
E_LVL = "Level in hierarchy
E_FUN = "Furtherest Upstream Node (1=yes, 0=no
E_DSS = "Down stream split (1=yes, 0=no
E_TYPE = "Measurement Point, Well Completion
E_MP_TYPE = "Measurement Point type
E_MP = "Measurement Point
E_WL = "Well
E_WC = "Well Completion
EXCEPTIONS
REF_NOT_FOUND = 1 END_OF_NETWORK = 2 END_OF_THE_LEG = 3 NODE_NOT_FOUND = 4
IMPORTING Parameters details for OIU_DN_GET_NEXT_NODE_UPSTRM
I_REF_NO - From OIU_DN_EXPAND
Data type: SY-SUBRCOptional: No
Call by Reference: Yes
I_LVL - Stay at or above this level
Data type: IOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for OIU_DN_GET_NEXT_NODE_UPSTRM
E_LVL - Level in hierarchy
Data type: IOptional: No
Call by Reference: Yes
E_FUN - Furtherest Upstream Node (1=yes, 0=no
Data type: IOptional: No
Call by Reference: Yes
E_DSS - Down stream split (1=yes, 0=no
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
E_TYPE - Measurement Point, Well Completion
Data type: ROIU_DN_NODES-TYPEOptional: No
Call by Reference: Yes
E_MP_TYPE - Measurement Point type
Data type: OIU_PR_MP-TYPE_CDOptional: No
Call by Reference: Yes
E_MP - Measurement Point
Data type: OIU_PR_MP-MP_NOOptional: No
Call by Reference: Yes
E_WL - Well
Data type: OIU_PR_WC-WL_NOOptional: No
Call by Reference: Yes
E_WC - Well Completion
Data type: OIU_PR_WC-WC_NOOptional: No
Call by Reference: Yes
EXCEPTIONS details
REF_NOT_FOUND - Object not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
END_OF_NETWORK - No more nodes
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
END_OF_THE_LEG - No more nodes for this leg
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NODE_NOT_FOUND - Starting point not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for OIU_DN_GET_NEXT_NODE_UPSTRM 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_e_lvl | TYPE I, " | |||
| lv_i_ref_no | TYPE SY-SUBRC, " | |||
| lv_ref_not_found | TYPE SY, " | |||
| lv_e_fun | TYPE I, " | |||
| lv_i_lvl | TYPE I, " | |||
| lv_end_of_network | TYPE I, " | |||
| lv_e_dss | TYPE I, " | |||
| lv_end_of_the_leg | TYPE I, " | |||
| lv_e_type | TYPE ROIU_DN_NODES-TYPE, " | |||
| lv_node_not_found | TYPE ROIU_DN_NODES, " | |||
| lv_e_mp_type | TYPE OIU_PR_MP-TYPE_CD, " | |||
| lv_e_mp | TYPE OIU_PR_MP-MP_NO, " | |||
| lv_e_wl | TYPE OIU_PR_WC-WL_NO, " | |||
| lv_e_wc | TYPE OIU_PR_WC-WC_NO. " |
|   CALL FUNCTION 'OIU_DN_GET_NEXT_NODE_UPSTRM' "Get next node upstream |
| EXPORTING | ||
| I_REF_NO | = lv_i_ref_no | |
| I_LVL | = lv_i_lvl | |
| IMPORTING | ||
| E_LVL | = lv_e_lvl | |
| E_FUN | = lv_e_fun | |
| E_DSS | = lv_e_dss | |
| E_TYPE | = lv_e_type | |
| E_MP_TYPE | = lv_e_mp_type | |
| E_MP | = lv_e_mp | |
| E_WL | = lv_e_wl | |
| E_WC | = lv_e_wc | |
| EXCEPTIONS | ||
| REF_NOT_FOUND = 1 | ||
| END_OF_NETWORK = 2 | ||
| END_OF_THE_LEG = 3 | ||
| NODE_NOT_FOUND = 4 | ||
| . " OIU_DN_GET_NEXT_NODE_UPSTRM | ||
ABAP code using 7.40 inline data declarations to call FM OIU_DN_GET_NEXT_NODE_UPSTRM
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 SUBRC FROM SY INTO @DATA(ld_i_ref_no). | ||||
| "SELECT single TYPE FROM ROIU_DN_NODES INTO @DATA(ld_e_type). | ||||
| "SELECT single TYPE_CD FROM OIU_PR_MP INTO @DATA(ld_e_mp_type). | ||||
| "SELECT single MP_NO FROM OIU_PR_MP INTO @DATA(ld_e_mp). | ||||
| "SELECT single WL_NO FROM OIU_PR_WC INTO @DATA(ld_e_wl). | ||||
| "SELECT single WC_NO FROM OIU_PR_WC INTO @DATA(ld_e_wc). | ||||
Search for further information about these or an SAP related objects