SAP SO_USER_ADDRESS_INSERT Function Module for SAPoffice: Internal Address Assigned to Office User
SO_USER_ADDRESS_INSERT is a standard so user address insert SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for SAPoffice: Internal Address Assigned to Office User 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 so user address insert FM, simply by entering the name SO_USER_ADDRESS_INSERT into the relevant SAP transaction such as SE37 or SE38.
Function Group: SOA3
Program Name: SAPLSOA3
Main Program: SAPLSOA3
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SO_USER_ADDRESS_INSERT 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 'SO_USER_ADDRESS_INSERT'"SAPoffice: Internal Address Assigned to Office User.
EXPORTING
* COMPANY_ADR = ' ' "Company address (if not filled -> Profile )
USER = "
IMPORTING
ADDRESS_NAME = "
ADRNR = "
EXCEPTIONS
ADDRESS_EXIST = 1 ADDRESS_NOT_IN_PROFILE = 2 ADDR_NUMBER_OVERFLOW = 3 COMPANY_ADR_NOT_EXIST = 4 PARAMETER_ERROR = 5 PROFILE_NOT_EXIST = 6 USER_NOT_EXIST = 7 X_ERROR = 8
IMPORTING Parameters details for SO_USER_ADDRESS_INSERT
COMPANY_ADR - Company address (if not filled -> Profile )
Data type: SADR-ADRNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
USER -
Data type: SOUD-USRNAMOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SO_USER_ADDRESS_INSERT
ADDRESS_NAME -
Data type: SADR-NAME1Optional: No
Call by Reference: No ( called with pass by value option)
ADRNR -
Data type: SADR-ADRNROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ADDRESS_EXIST - Internal address already assigned to user
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ADDRESS_NOT_IN_PROFILE - No address entered in the profile
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ADDR_NUMBER_OVERFLOW -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
COMPANY_ADR_NOT_EXIST - Company address does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PARAMETER_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROFILE_NOT_EXIST - Profile does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
USER_NOT_EXIST - Office user does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
X_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SO_USER_ADDRESS_INSERT 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_company_adr | TYPE SADR-ADRNR, " SPACE | |||
| lv_address_name | TYPE SADR-NAME1, " | |||
| lv_address_exist | TYPE SADR, " | |||
| lv_user | TYPE SOUD-USRNAM, " | |||
| lv_adrnr | TYPE SADR-ADRNR, " | |||
| lv_address_not_in_profile | TYPE SADR, " | |||
| lv_addr_number_overflow | TYPE SADR, " | |||
| lv_company_adr_not_exist | TYPE SADR, " | |||
| lv_parameter_error | TYPE SADR, " | |||
| lv_profile_not_exist | TYPE SADR, " | |||
| lv_user_not_exist | TYPE SADR, " | |||
| lv_x_error | TYPE SADR. " |
|   CALL FUNCTION 'SO_USER_ADDRESS_INSERT' "SAPoffice: Internal Address Assigned to Office User |
| EXPORTING | ||
| COMPANY_ADR | = lv_company_adr | |
| USER | = lv_user | |
| IMPORTING | ||
| ADDRESS_NAME | = lv_address_name | |
| ADRNR | = lv_adrnr | |
| EXCEPTIONS | ||
| ADDRESS_EXIST = 1 | ||
| ADDRESS_NOT_IN_PROFILE = 2 | ||
| ADDR_NUMBER_OVERFLOW = 3 | ||
| COMPANY_ADR_NOT_EXIST = 4 | ||
| PARAMETER_ERROR = 5 | ||
| PROFILE_NOT_EXIST = 6 | ||
| USER_NOT_EXIST = 7 | ||
| X_ERROR = 8 | ||
| . " SO_USER_ADDRESS_INSERT | ||
ABAP code using 7.40 inline data declarations to call FM SO_USER_ADDRESS_INSERT
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 ADRNR FROM SADR INTO @DATA(ld_company_adr). | ||||
| DATA(ld_company_adr) | = ' '. | |||
| "SELECT single NAME1 FROM SADR INTO @DATA(ld_address_name). | ||||
| "SELECT single USRNAM FROM SOUD INTO @DATA(ld_user). | ||||
| "SELECT single ADRNR FROM SADR INTO @DATA(ld_adrnr). | ||||
Search for further information about these or an SAP related objects