SAP INST_CREATE_COMPANY_ADDRESS Function Module for Create entry for company address









INST_CREATE_COMPANY_ADDRESS is a standard inst create company address SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create entry for company address 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 inst create company address FM, simply by entering the name INST_CREATE_COMPANY_ADDRESS into the relevant SAP transaction such as SE37 or SE38.

Function Group: SAIO
Program Name: SAPLSAIO
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function INST_CREATE_COMPANY_ADDRESS 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 'INST_CREATE_COMPANY_ADDRESS'"Create entry for company address
EXPORTING
COMPANYNAME = "Company address, cross-system key
* COMPANY_CITY = "City
* COMPANY_POSTCODE = "City postal code
* COMPANY_STREET = "Street
* COMPANY_HOUSENUM = "House Number
* COMPANY_COUNTRY = "Country key
* COMPANY_TIMEZONE = 'CET' "Time Zone

EXCEPTIONS
ADDRESS_EXISTS = 1 COMPANY_ALREADY_EXISTS = 10 ADDRESS_HANDLE_NOT_EXIST = 2 INTERNAL_ERROR = 3 PARAMETER_ERROR = 4 ADDRESS_NOT_EXIST = 5 PERSON_NOT_EXIST = 6 ADDRESS_NUMBER_MISSING = 7 REFERENCE_MISSING = 8 DATABASE_ERROR = 9
.



IMPORTING Parameters details for INST_CREATE_COMPANY_ADDRESS

COMPANYNAME - Company address, cross-system key

Data type: BAPIUSCOMP
Optional: No
Call by Reference: No ( called with pass by value option)

COMPANY_CITY - City

Data type: AD_CITY1
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMPANY_POSTCODE - City postal code

Data type: AD_PSTCD1
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMPANY_STREET - Street

Data type: AD_STREET
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMPANY_HOUSENUM - House Number

Data type: AD_HSNM1
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMPANY_COUNTRY - Country key

Data type: LAND1
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMPANY_TIMEZONE - Time Zone

Data type: TIMEZONE
Default: 'CET'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

ADDRESS_EXISTS - Address to this handle still exists

Data type:
Optional: No
Call by Reference: Yes

COMPANY_ALREADY_EXISTS - Company still exists

Data type:
Optional: No
Call by Reference: Yes

ADDRESS_HANDLE_NOT_EXIST - Address handle does not exist

Data type:
Optional: No
Call by Reference: Yes

INTERNAL_ERROR - internal Error (MESSAGE A...)

Data type:
Optional: No
Call by Reference: Yes

PARAMETER_ERROR - invalid parameter values

Data type:
Optional: No
Call by Reference: Yes

ADDRESS_NOT_EXIST - Address not in locale mind

Data type:
Optional: No
Call by Reference: Yes

PERSON_NOT_EXIST - Person not found

Data type:
Optional: No
Call by Reference: Yes

ADDRESS_NUMBER_MISSING - missing Address number by new Address

Data type:
Optional: No
Call by Reference: Yes

REFERENCE_MISSING - missing reference

Data type:
Optional: No
Call by Reference: Yes

DATABASE_ERROR - Error by writing to database

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for INST_CREATE_COMPANY_ADDRESS 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_companyname  TYPE BAPIUSCOMP, "   
lv_address_exists  TYPE BAPIUSCOMP, "   
lv_company_already_exists  TYPE BAPIUSCOMP, "   
lv_company_city  TYPE AD_CITY1, "   
lv_address_handle_not_exist  TYPE AD_CITY1, "   
lv_internal_error  TYPE AD_CITY1, "   
lv_company_postcode  TYPE AD_PSTCD1, "   
lv_company_street  TYPE AD_STREET, "   
lv_parameter_error  TYPE AD_STREET, "   
lv_company_housenum  TYPE AD_HSNM1, "   
lv_address_not_exist  TYPE AD_HSNM1, "   
lv_company_country  TYPE LAND1, "   
lv_person_not_exist  TYPE LAND1, "   
lv_company_timezone  TYPE TIMEZONE, "   'CET'
lv_address_number_missing  TYPE TIMEZONE, "   
lv_reference_missing  TYPE TIMEZONE, "   
lv_database_error  TYPE TIMEZONE. "   

  CALL FUNCTION 'INST_CREATE_COMPANY_ADDRESS'  "Create entry for company address
    EXPORTING
         COMPANYNAME = lv_companyname
         COMPANY_CITY = lv_company_city
         COMPANY_POSTCODE = lv_company_postcode
         COMPANY_STREET = lv_company_street
         COMPANY_HOUSENUM = lv_company_housenum
         COMPANY_COUNTRY = lv_company_country
         COMPANY_TIMEZONE = lv_company_timezone
    EXCEPTIONS
        ADDRESS_EXISTS = 1
        COMPANY_ALREADY_EXISTS = 10
        ADDRESS_HANDLE_NOT_EXIST = 2
        INTERNAL_ERROR = 3
        PARAMETER_ERROR = 4
        ADDRESS_NOT_EXIST = 5
        PERSON_NOT_EXIST = 6
        ADDRESS_NUMBER_MISSING = 7
        REFERENCE_MISSING = 8
        DATABASE_ERROR = 9
. " INST_CREATE_COMPANY_ADDRESS




ABAP code using 7.40 inline data declarations to call FM INST_CREATE_COMPANY_ADDRESS

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_company_timezone) = 'CET'.
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!