cancel
Showing results for 
Search instead for 
Did you mean: 

Customer Master - ADRNR field details.

rajesh_chavan
Active Participant
0 Kudos

Hi SDiens,

This is regarding Customer Master data.

Use T-code "SE16" then enter Table Name "KNA1" to see values for any particular Master record for eg. 1000.

In this you will find some Values in field "ADRNR, MCOD1, MCOD2". whereas if you open the same record with "XD02" you cannot see this values.

Even I am not entering this vause while creating records using "XD01". Can someone explain where can I see this Values.

Matter urgent.

Helpful answers will be rewarded.

Cheers

RC

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I looked in to this issue and got this information sto you please go through ADRNR number is the number provided internally by the system.and the remaining 2 fields MCOD1, MCOD2 are there in General data tab.

Address number

Internal key for identifying a Business Address Services address.

For more information about the meaning and use of the address number and the Business Address Services concepts, see the function group SZA0 documentation.

Business Address Services

I. General

You can manage addresses conveniently using a standard function module interface with Business Address Services. There are interfaces for maintenance with or without dialog and an address maintenance transaction.

Address attributes

An address in Business Address Services is a complex attribute of a primary object which saves only the reference to the address key. (In certain constellations, controlled redundancy is possible).

The address management distinguishes between addresses on the basis of time dependency and international formats.

The database structures allow for the date-dependency of addresses, but all function modules currently use date-independent addresses (the default validity range is 1.1.00001 - 31.12.9999).

Address types

Addresses are distinguished according to the application context in which they are used:

"Normal" addresses (Address type 1): This type of address can either be associated with an application object or be on its own.

Typical examples are the addresses of organizational units (for example, company code, plant), delivery address, functional location, and so on.

Such an address is identified in the DB by a 10-digit address number.

Examples: company code 0001 has address 4711

customer MIKE has address 5678

Private addresses of persons (Address type 2): These are addresses which are assigned to exactly one natural person, with extended attributes compared to the normal addresses (title, part of name, etc.) for the person. The person with the address-relevant attributes is an independent object, which is maintained in Business Address Sercices.

Personal addresses are assigned to exactly one person, and can not be referred to by other application objects. The complete address object (person with address) can have several uses.

For identification, a 10-digit number for the person and a 10-digit number for the address are required.

A person (identified by the 10-character address) can have several addresses.

Example: business partner CHARLY is a natural person and has two addresses:

a) the first address is identified by person number 1234 and address number 3333.

b) the second address is identified by person number 1234 and address number 3357.

Addresses of persons in companies (Address type 3): These are addresses which contain the properties of a person in a company, with attributes such as Department, room number, extension.

Any normal address (address type 1), but not a private address, can be the company address.

The address of a person in a company is identified, like a private address by a 10-digit number each for the person and for the address.

Example: business partner CHARLY (see above) is contact person at business partner SAP_AG with company address 4444; CHARLY's contact person address is identified by person number 1234 (see above) and address number 4444.

These three address objects constitute an abstract data structure. The function group SZA0 contains function modules for accessing these address types. There are function modules for maintenance (create, change and delete), and to read and to search for each address type. There are also function modules to maintain and read all communication types which are supported by R/3, for each address type.

Function modules for private addresses begin with the prefix 'ADDR_PERSONAL_', those for addresses of a person in a company begin with 'ADDR_PERS_COMP'. Other function modules which begin with 'ADDR_' are for normal address maintenance, or in some cases, function group management.

The function modules manage the data structure using a maintenance interface. The underlying tables must not be accessed directly. This could lead to inconsistencies in data structures which contain fields from several tables.

Address maintenance

Addresses should be maintained as far as possible using standard dialogs which are available in other function groups.

Popup, subscreen and full screen dialog techniques are used.

The parameter transaction SADR can also be used for maintaining normal addresses which do not depend on an application object. These addresses cannot be distributed by ALE.

For more information, see the SZA1, SZA5 and SZA7 function group documentation.

For information about address validation see the documentation of function group SZAR.

If addresses are to be maintained without dialog, or if a user maintenance dialog is necessary for special requirements, addresses can also be maintained directly using the function modules of the function group SZA0. The standard dialogs of the function groups SZA1, SZA5 and SZA7 are also implemented with them.

Conversion of existing SADR/SADRP addresses

Most old addresses will be converted for the new central address management (Business Address Services) for Release 4.0.

From Release 4.5, all SD document addresses (previously SADR), customer addresses (previously only KNA1), supplier addresses (previously only LFA1), business and private addresses of (customer) contact persons (previously SADR) and bank addresses (previously SADR) will also be in Business Address Services (central address management).

Release notes Central address management for 4.0A and Central address management in Release 4.5 contain detailed information.

II. Maintenance without dialog (function group SZA0)

The contents of the function group can be classified as follows: management modules, which either apply to the function group as a whole or ensure correct database storage, address object maintenance (create, change, delete) modules, and address object communications address processing, for example, telephone, fax, or mail addresses.

Organization

Local memory:

Save

ADDR_MEMORY_SAVE: Saves the local memory contents in the database. All address data changes made since the first call of any function module in the function group are then permanent. Numbers must have been assigned to all addresses and persons before storing.

Delete

ADDR_MEMORY_CLEAR: Deletes the local memory contents. All address data changes made since the first call of any function module, or the last local memory save, are discarded. This module should be called after extensive read operations or when returning to the application.

Number assignment:

When assigning numbers to addresses or persons, their (first) use must be specified.

ADDR_NUMBER_GET

Assigns an address number, i.e. converts a temporary address number (address handle) into a permanent address number which is saved in the database key.

ADDR_PERSON_NUMBER_GET

Assigns a person number, i.e. converts a temporary person number (person handle) into a permanent person number which is saved in the database key.

Where used:

A permanent address or person number must have been assigned before a (further) use can be entered.

ADDR_REFERENCE_INSERT

Inserts a new use in an existing address.

ADDR_REFERENCE_DELETE

Deletes a use of an existing address.

ADDR_PERSON_REFERENCE_INSERT

Enters another use for an existing person.

ADDR_PERSON_REFERENCE_DELETE

Deletes a use for an existing person.

Applications are also deleted by the normal delete operations when the application passed to the delete modules is not the only one, or most recent one.

Address object methods

Read:

Read address objects

<Address object>_GET: Reads a (fully qualified) address. All versions of this address are read into local memory, and are subsequently accessible without database access.

ADDR_PERSONAL_GET_ALL: Reads all private addresses for a person. All versions of this person's private address are read into local memory, and are subsequently accessible without database access.

Read address object block

<Address object>_GET_ARRAY: Reads several (fully qualified) addresses. The database and the local memory are read. All address versions read are subsequently in local memory and can be accessed without database access.

Insert:

<Address object>_INSERT

Inserts an address.

<Address object>_VERSION_INSERT

Inserts a version of an address.

ADDR_PERSONAL_COMPLETE_INSERT

Inserts a private address with full specification of personal and address data, in contrast to ADDR_PERSONAL_INSERT, where the person data already exist.

ADDR_PERS_COMP_ASSIGN

Assigns a company address to an existing person, in contrast to ADDR_PERS_COMP_INSERT, where the person is also newly entered.

Change:

<Address object>_UPDATE

Changes an address version. (In particular the standard version, "the" address, is changed.)

Delete:

<Address object>_DELETE

Deletes an address. All existing address versions are deleted.

<Address object>_VERSION_DELETE

Deletes one version of an address.

Search:

<Address object>_SEARCH

Searches for addresses, which can be partially qualified (e.g. by attribute value specification). Only the database contents are searched (the local memory should be saved first, under certain circumstances).

Communication addresses

Read:

<Address object>_COMM_GET

Reads the communication addresses of an address object for a particular communication type. All communications addresses of the specified communication type, for the specified address object are read into local memory, from where they can subsequently accessed without database access.

Maintain:

<Address object>_COMM_MAINTAIN

Maintains the communications addresses of an address object for a particular communications type. Maintenance comprises: create, change and delete. All communications addresses thus maintained can be accessed in local memory without database access.

III. Maintenance with dialog

Function groups SZA1, SZA5, SZA6, SZA7 and the parameter transactions SADR and SADP

--> Overview in the SZA1, SZA5 and SZA7 function group documentation.

IV. Application examples

0. General

- The function group does not need explicit initialization.

- Address data changes are only written to the database after

'ADDR_MEMORY_SAVE' has been called.

- Before the 'ADDR_MEMORY_SAVE' call, all temporary

address and person handles must be converted to external

numbers.

1. Read access to normal address (address object 1)

  • Selection parameter for a normal address

data: begin of selection

include structure addr1_sel.

data: end of selection.

  • Attributes of a normal address

data: begin of result.

include structure addr1_val.

data: end of result.

  • Specify selection parameters

clear selection. "no handle, default nation, today

selection-addrnumber = t001-adrnr.

  • Read normal address

call function 'ADDR_GET'

exporting address_selection = selection

importing address_value = result

exceptions address_not_exist = 1

parameter_error = 2

version_not_exist = 3

internal_error = 4.

case sy-subrc.

...

endcase.

  • Result output

write: / result-name1,

/ result-street, result-house_num1,

/ result-post_code1, result-city1.

  • Delete local memory after end of processing

call function 'ADDR_MEMORY_CLEAR'

exceptions unsaved_data_exist = 1

internal_error = 2.

case sy-subrc.

...

endcase.

2. Search for a normal address (address object 1)

  • Search parameters for a normal address

data: begin of selection

include structure addr1_find.

data: end of selection.

  • Result table for a normal address search

data: begin of result occurs 0.

include structure addr1_val.

data: end of result.

  • Address group table

data: begin of dummy occurs 0.

include structure adagroups.

data: end of dummy.

  • Number of addresses found

address_count like sy-tabix.

  • Specify search parameters

clear selection.

selection-name1 = 'SAP*'.

selection-city1 = 'Walldorf'.

  • Search for normal address

call function 'ADDR_SEARCH'

exporting search_in_all_groups = 'X'

search_for = selection

importing addresses_found_count = address_count

tables search_result = result

address_groups = dummy

exceptions parameter_error = 1

internal_error = 2.

case sy-subrc.

...

endcase.

  • Result output

loop at result.

write: / result-name1,

/ result-street, result-house_num1,

/ result-post_code1, result-city1.

endloop.

3. Bulk processing of normal addresses (address object 1)

  • Table of selection parameters for a normal address

data: begin of selection occurs 20.

include structure addr1_sel.

data: end of selection.

  • Table of attributes for a normal address

data: begin of result. occurs 20.

include structure addr1_val.

data: end of result.

  • Error table

data: begin of errors occurs 0.

include structure addr_error.

data: end of errors.

  • Specify selection parameters

clear selection. "no handle, default nation, today

selection-addrnumber = t001-adrnr.

append selection.

clear selection.

selection-addrnumber = vbpa-adrnr.

append selection.

... enter further selections in table selection ...

  • Read normal address in blocks

call function 'ADDR_GET_ARRAY'

tables address_selection = selection

address_value = result

error_table = errors

exceptions parameter_error = 1

internal_error = 2.

case sy-subrc.

...

endcase.

  • Result output

loop at result.

write: / result-name1,

/ result-street, result-house_num1,

/ result-post_code1, result-city1.

endloop.

  • Delete local memory after end of processing

call function 'ADDR_MEMORY_CLEAR'

exceptions unsaved_data_exist = 1

internal_error = 2.

case sy-subrc.

...

endcase.

4. Create a normal address (address object 1)

  • Address number, address handle, address group, address data

data: address_number like adrc-addrnumber.

data: address_handle like szad_field-handle.

data: address_group like addr_ref-addr_group value 'DEBI'.

data: begin of address_data.

include structure addr1_data.

data: end of address_data.

  • Use details

data: begin of usage.

include structure addr_ref.

data: end of usage.

  • Error table

data: begin of errors occurs 0.

include structure addr_error.

data: end of errors.

  • Return codes

data: rc_insert like szad_field-returncode.

data: rc_number_get like inri-returncode.

data: rc_memory_save like sy-subrc.

data: lv_check_address like szad_field-flag.

  • Fill address record and determine temporary address identifier

address_data = ...

address_handle = ...

  • Deactivate address check if required

lv_check_address =

  • Insert address in local memory

call function 'ADDR_INSERT'

exporting address_data = address_data

address_group = address_group

address_handle = address_handle

check_address = lv_check_address

importing address_data = address_data

returncode = rc_insert

tables error_table = errors

exceptions address_exists = 1

parameter_error = 2

internal_error = 3.

case sy-subrc.

when 0.

if rc_insert = 'E'.

Analyze error_table and call special further processing

because the address has errors and was not created.

endif.

...

endcase.

... process other application objects

or modify Business Address Services

local memory ...

... before saving potential application objects:

  • Declare final use to address management

usage-appl_table = ...

usage-appl_field = ...

usage-appl_key = ...

usage-addr_group = address_group.

  • Assign address number

call function 'ADDR_NUMBER_GET'

exporting address_handle = address_handle

address_reference = usage

importing address_number = address_number

returncode_numberrange = rc_number_get

exceptions address_handle_not_exist = 1

internal_error = 2

parameter_error = 3.

case sy-subrc.

...

endcase.

... immediately afterwards:

  • save local memory after processing

call function 'ADDR_MEMORY_SAVE'

exceptions address_number_missing = 1

person_number_missing = 2

internal_error = 3

database_error = 4

reference_missing = 5.

case sy-subrc.

...

endcase.

  • delete local memory

call function 'ADDR_MEMORY_CLEAR'

exceptions unsaved_data_exist = 1

internal_error = 2.

case sy-subrc.

...

endcase.

V. Terms/Glossary

Address/Person group

Addresses and persons can be assigned to an address or person group. One address or person can be assigned to several groups (multiple assignment). This allows e.g. the same address to occur as customer and supplier address, and also allows searches to be limited to certain groups, instead of always searching all addresses.

Logical groups of addresses and persons can be formed.

The address groups required by applications are established by the application developer in consultation with the SAP Business Address Services. Customers can define their own groups in the customer name range for their own developments.

Address/Person handle

Address data are saved in the database and address and person numbers are assigned only when the application data are saved. Application programs must call the appropriate function modules. Business Address Services hold the data in internal tables in the local memory of the function group SZA0. Before saving after creation, addresses or persons are identified by an address or person handle, via which address objects can be accessed until the data are saved in the database.

The handle of a person, a normal address or a person in a company is determined by the application program.

The following procedure is recommended for both the address and person handles:

The first 10 places contain the name of the table in which the address or person is referred to. The next 10 places are used for the name of the field containing the reference, and the application data set key can be written in the remaining 120 places. This can be a temporary key, as the database key is only completed when saving in many application areas.

In this way the application developer can manage the addresses with the data which he or she is accessing anyway.

Ambiguities are avoided in complex transactions in which addresses for different applications are kept simultaneously in the same roll area for SZA0 (a serial number may not be sufficient as a handle).

Communication addresses

A communication addresse in the central address management is the identification number or address of a communication connection of one of the following communication types: telephone, fax, teletex, telex, SMTP, R/Mail, X.400 or RFC.

e.g. the complete telephone number (dialling code + telephone number) is the identification of the communication address of type telephone.

Address/Person number range

The address and person number range defines the valid external identifications (database key value range) for addresses or persons. For reasons of compatibility, the same number range applies as for 'old' SADR and SADRP addresses. Specifically, address and person numbers are drawn from the same number range. This simplifies the conversion of old SADRF and SADRP addresses.

Address versions

The (international) version of an address is an independent address object data set, in which a different display style of an address can be maintained in a code page (e.g. in Japan in Kanji, Katakana or Hiragana).

These are not independent addresses

The part of the address object which does not depend on the display style is always in the standard version.

In customizing (transaction SADV or under Cross-application components -> General application functions -> Address management -> Maintain address version display formats) you can set which other versions, in addition to the normal display style, are to be offered for maintenance.

Where-used list

In the where-used list, the application objects in which an address or a person are referred to is recorded. The where-used list is a technical support for the repeated use of addresses or persons in the three address types and therefore refers to the (sub)object address and person.

Immediately before calling the function module 'ADDR_MEMORY_SAVE', the function modules 'ADDR_NUMBER_GET', or 'ADDR_PERSON_NUMBER_GET' must be called once for every normal address and once for each person (for private addresses and addresses of a person in a company). The (permanent) use of the address or the person in the application must be specified. In exchange the calling program gets the assigned numbers of the addresses and persons for the references in the application data records.

Then (still before the 'ADDR_MEMORY_SAVE' call), other uses of addresss or persons can be specified via the function modules 'ADDR_REFERENCE_INSERT' or 'ADDR_PERSON_REFERENCE_INSERT' for multiple use.

This is always possible once the address or person number is assigned.

At the end of processing, the data must be saved in the database (as for all other address data) with the function module 'ADDR_MEMORY_SAVE'.

Thanks,

Sree.Manam

Edited by: manam narayana on Jun 18, 2008 9:00 AM

rajesh_chavan
Active Participant
0 Kudos

Need to close the question.

rajesh_chavan
Active Participant
0 Kudos

closed

Former Member
0 Kudos

Hi,

in table Customer master MCOD1, MCOD2, MCOD3 Are for Name, Name2, and city respectfully. While creating cutomer master these fields comes under general data and these are manadatory,

If u want to see this value u can see in the general data tab in xd02 under the address tab, these are the values u want to see.

Hope this will help.

Reward point if helpful.

Thanks,

Raja