SAP OIU_3D_GET_PREV_NODE Function Module for Get the previous node
OIU_3D_GET_PREV_NODE is a standard oiu 3d get prev node 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 the previous node 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 3d get prev node FM, simply by entering the name OIU_3D_GET_PREV_NODE 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_3D_GET_PREV_NODE 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_3D_GET_PREV_NODE'"Get the previous node.
EXPORTING
I_REF_NO = "From OIU_DN_EXPAND
* I_UP_DOWN = 1 "1 = Up, 2=Down (stream)
IMPORTING
E_TYPE = "MP, WC
E_MP = "Measurement Point
E_WL = "Well
E_WC = "Well Completion
EXCEPTIONS
REF_NOT_FOUND = 1 NODE_NOT_FOUND = 2
IMPORTING Parameters details for OIU_3D_GET_PREV_NODE
I_REF_NO - From OIU_DN_EXPAND
Data type: SY-SUBRCOptional: No
Call by Reference: Yes
I_UP_DOWN - 1 = Up, 2=Down (stream)
Data type: IDefault: 1
Optional: No
Call by Reference: Yes
EXPORTING Parameters details for OIU_3D_GET_PREV_NODE
E_TYPE - MP, WC
Data type: ROIU_DN_NODES-TYPEOptional: 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)
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_3D_GET_PREV_NODE 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_type | TYPE ROIU_DN_NODES-TYPE, " | |||
| lv_i_ref_no | TYPE SY-SUBRC, " | |||
| lv_ref_not_found | TYPE SY, " | |||
| lv_e_mp | TYPE OIU_PR_MP-MP_NO, " | |||
| lv_i_up_down | TYPE I, " 1 | |||
| lv_node_not_found | TYPE I, " | |||
| lv_e_wl | TYPE OIU_PR_WC-WL_NO, " | |||
| lv_e_wc | TYPE OIU_PR_WC-WC_NO. " |
|   CALL FUNCTION 'OIU_3D_GET_PREV_NODE' "Get the previous node |
| EXPORTING | ||
| I_REF_NO | = lv_i_ref_no | |
| I_UP_DOWN | = lv_i_up_down | |
| IMPORTING | ||
| E_TYPE | = lv_e_type | |
| E_MP | = lv_e_mp | |
| E_WL | = lv_e_wl | |
| E_WC | = lv_e_wc | |
| EXCEPTIONS | ||
| REF_NOT_FOUND = 1 | ||
| NODE_NOT_FOUND = 2 | ||
| . " OIU_3D_GET_PREV_NODE | ||
ABAP code using 7.40 inline data declarations to call FM OIU_3D_GET_PREV_NODE
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 TYPE FROM ROIU_DN_NODES INTO @DATA(ld_e_type). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_i_ref_no). | ||||
| "SELECT single MP_NO FROM OIU_PR_MP INTO @DATA(ld_e_mp). | ||||
| DATA(ld_i_up_down) | = 1. | |||
| "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