SAP FVAY_N_OBJECT_GET_REF_ADDR Function Module for
FVAY_N_OBJECT_GET_REF_ADDR is a standard fvay n object get ref addr SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 fvay n object get ref addr FM, simply by entering the name FVAY_N_OBJECT_GET_REF_ADDR into the relevant SAP transaction such as SE37 or SE38.
Function Group: FVAY_N
Program Name: SAPLFVAY_N
Main Program: SAPLFVAY_N
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FVAY_N_OBJECT_GET_REF_ADDR 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 'FVAY_N_OBJECT_GET_REF_ADDR'".
EXPORTING
* I_OBJTYP = ' ' "Object type
I_OBJNR = "Object Number (Virtual Object)
IMPORTING
E_ADDRESS = "
E_HANDLE = "
E_ADDRESS_ID = "
E_ADDR_REF = "
TABLES
* E_ADDR_REF_TAB = "
EXCEPTIONS
NOT_FOUND = 1 KEY_ERROR = 2
IMPORTING Parameters details for FVAY_N_OBJECT_GET_REF_ADDR
I_OBJTYP - Object type
Data type: VZOBJECT-ADROBJTYPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_OBJNR - Object Number (Virtual Object)
Data type: VZOBJECT-ADROBJNROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FVAY_N_OBJECT_GET_REF_ADDR
E_ADDRESS -
Data type: ADDR1_SEL-ADDRNUMBEROptional: No
Call by Reference: No ( called with pass by value option)
E_HANDLE -
Data type: ADDR1_SEL-ADDRHANDLEOptional: No
Call by Reference: No ( called with pass by value option)
E_ADDRESS_ID -
Data type: ADDR1_SELOptional: No
Call by Reference: No ( called with pass by value option)
E_ADDR_REF -
Data type: ADDR_REFOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FVAY_N_OBJECT_GET_REF_ADDR
E_ADDR_REF_TAB -
Data type: ADDR_REFOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NOT_FOUND - Object Not Found
Data type:Optional: No
Call by Reference: Yes
KEY_ERROR - Invalid Key
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FVAY_N_OBJECT_GET_REF_ADDR 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_i_objtyp | TYPE VZOBJECT-ADROBJTYP, " SPACE | |||
| lv_e_address | TYPE ADDR1_SEL-ADDRNUMBER, " | |||
| lv_not_found | TYPE ADDR1_SEL, " | |||
| lt_e_addr_ref_tab | TYPE STANDARD TABLE OF ADDR_REF, " | |||
| lv_i_objnr | TYPE VZOBJECT-ADROBJNR, " | |||
| lv_e_handle | TYPE ADDR1_SEL-ADDRHANDLE, " | |||
| lv_key_error | TYPE ADDR1_SEL, " | |||
| lv_e_address_id | TYPE ADDR1_SEL, " | |||
| lv_e_addr_ref | TYPE ADDR_REF. " |
|   CALL FUNCTION 'FVAY_N_OBJECT_GET_REF_ADDR' " |
| EXPORTING | ||
| I_OBJTYP | = lv_i_objtyp | |
| I_OBJNR | = lv_i_objnr | |
| IMPORTING | ||
| E_ADDRESS | = lv_e_address | |
| E_HANDLE | = lv_e_handle | |
| E_ADDRESS_ID | = lv_e_address_id | |
| E_ADDR_REF | = lv_e_addr_ref | |
| TABLES | ||
| E_ADDR_REF_TAB | = lt_e_addr_ref_tab | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| KEY_ERROR = 2 | ||
| . " FVAY_N_OBJECT_GET_REF_ADDR | ||
ABAP code using 7.40 inline data declarations to call FM FVAY_N_OBJECT_GET_REF_ADDR
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 ADROBJTYP FROM VZOBJECT INTO @DATA(ld_i_objtyp). | ||||
| DATA(ld_i_objtyp) | = ' '. | |||
| "SELECT single ADDRNUMBER FROM ADDR1_SEL INTO @DATA(ld_e_address). | ||||
| "SELECT single ADROBJNR FROM VZOBJECT INTO @DATA(ld_i_objnr). | ||||
| "SELECT single ADDRHANDLE FROM ADDR1_SEL INTO @DATA(ld_e_handle). | ||||
Search for further information about these or an SAP related objects