Addresses and master data – ADRMAS – CREMAS – DEBMAS
I really thought that all people who entered into SAP with or after 4.5 release should be used to the Central Address Management
Far from it when looking at all the questions and confusions still posted in SCN nowadays.
Not sure if this is caused by old instructors or just by the fact the rumors can’t be blown away easily.
Here is a screenshot of the old address view from vendor master:
All those fields have been stored in table LFA1 Vendor master general data (in case of customer master in table KNA1)
And this is the new address screen that came with Central Address Management (aka BAS Business Address Services). It has replaced the above old screen in vendor and customer master, and got even added to data which had not even a qualified address screen in earlier releases like plant and storage location.
About 25 fields are equal in old and new address screen, all others are new fields, needed for the international business and countries where the address is more descriptive “road from A to B,at the bus stop right, close to the church”
All this data is stored in the new tables that came along. The main table is ADRC with the addresses.
As you can see – or already know – the communication fields like Telephone, Fax, Email have a multiple selection button, which means you can maintain countless records for these fields while it was a fixed number in the old releases.
This also means that each of this fields has its own table to store this information. ADR2 for telephone, ADR3 for fax, ADR6 for Email
Just if you wonder about ADR4 and ADR5, they are used for Teletext and Telex, I guess people who remember those are already retired or close to or museum attendants.
Even the field length has changed for example for Name fields, street fields and search term.
To keep the SAP customers happy, and their self-developed programs alive, the address fields from LFA1 and KNA1 did not get removed, contrary the entries made in the new screen is copied over to the corresponding fields and kept redundantly.
As some fields are longer now, their content gets truncated when it is copied to the old tables. Others, that have now extra fields like the house numbers is concatenated with the street into the old street field.
Link between master data table and new address table
The link from the old tables to the central address tables is established via the address number ADRNR which is stored in the old master data tables.
In new self-developed reports you should take the address information from the ADR* tables instead of the old master data tables. You never know if they will stay forever.
Of course for quick and dirty one-time analysis the address from LFA1 and KNA1 tables should be sufficient, except you want some of the fields which are new and don’t exist in the old tables, since they did not get enhanced for those fields.
If you use SQVI QuickViewer then the link does not establish by itself, since the field names are not equal. You have to set this link manually: ADRNR <=> ADDRNUMBER
If you use International Address Versions , then you may even find 2 or more records with the same address number in the ADRC table. In this case you have to include the NATION field in your selection to filter the results to a certain Version only.
LSMW and addresses
In case you decide to load vendors or customers by a recording method into SAP then it is very important to select a small undocumented box in the selection screen. Certainly the root cause for most problems with the address data posted to SCN.
The online transactions (e.g. XK01, XK02, FK01, FK02, MK01,MK02) as well as the recording (if the box was activated) care about updating the ADR* tables as well as the master data table.
The Idoc import method for vendors and customers was unfortunately not changed, which means that you have to load vendors and customers with 2 LSMW objects, the CREMAS Idoc to update the vendor master data tables, and the ADRMAS Idoc to update the central address table.
If you do not follow the same approach as SAP (remember the concatenated Street and House number) then you actually create an inconsistency. It may not be recognized by most users, but if you take address fields from LFA1 in some of your reports then users can get confused when this values do not match with the shown data in vendor master transaction.
When you load dependent data then a mapping table is indispensable. A little experienced LSMW users already know that master data which is loaded by batch input method (recording is a batch input method) gets its new number in moment of posting. With Idoc method it is possible to determine and assign an internal number already before posting, hence it is possible to store a mapping old number to new number in a mapping table automatically while doing the conversion step.
While loading address data you have to tell the address to which master record it belongs. This is done by moving the new vendor number from this mapping table into OBJ_ID field or the ADRMAS Idoc.
While posting the ADRMAS Idoc SAP will automatically add the address number to the vendor master mentioned in the OBJ_ID field.
Caution: this only works for the main vendor and customer address. It does not work for addresses of customer contacts.
ALE distribution
The ALE distribution of vendors and customers became more complex with business address services. SAP provides a proposal for the distribution model in the SALE customizing transaction. The name for this particular transaction is WYL2.
Make sure you read the docu which can be found next to the activity in IMG.
The ALE distribution needs serialization, which means address Idocs together with its master data Idoc in one package, the address Idocs are posted prior to the master data Idoc.(Unfortunately serialization cannot be achieved with LSMW). This is all automatically setup with this WYL2 transaction.
Since there is now a dependency between the master data object and the addresses you have to take care about this fact as well when you filter the distribution of Idocs. You need to add a small coding in the user exit to the function module VENDOR_FILTEROBJ_GET_VALUE (CUSTOMER_FILTEROBJ_GET_VALUE in case of customer master distribution). A code example can be found in SAP note 306275 – Transferring address data
Further detailed information can be found in the following SAP notes
384462 – Master data and addresses
354107 – ALE: Customers or vendor-dependent distribution
Hi Jurgen,
Nice document and very well explained. Thanks for sharing.
Regards,
Prasoon
Hi all ;
There ara a lot of new implementations to be awere of them , this document is well explained with details. Thanks to Mr.Jurgen.
Regards.
M.Ozgur Unal
Thank you very much for this exceptional doc! 😉
Bookmarked
Regards,
Oswal
thanks for sharing, it's very well explained.
there are two ways to import vendor master into SAP, one is LSMW, another is IDOC import, if we use LSMW to record, for example XK01, we need to tick "use central management" which will make data consistent, othervise the data will be inconsistent.
Am I correct?
besides, we don't use IDOC import method, could you provide details how it works.
You are mixing the degree of detail. LSMW is workbench - Idoc is just one import method among 4 which can be chosen. So you cannot compare LSMW with Idoc, this does not make sense, it is like comparing locomotion with a family car.
I explained the LSMW with Idoc method in my earlier blogs LSMW Material master by BAPI method
and LSMW migration with IDOC method and using IDOC
Dear Jurgen,
Nice document sharing with detailed explanation.
Thanks for sharing....
Regards,
Karna J
Excellent document and very useful
Regards,
Ram
Hi,
Is that possible to control international address verison show in customer or vendor related business document in SAP like sales order , purchase order?
if not the right version is displayed then you may have the bug that got fixed with OSS note
1749942 - Incorrect Adress Version is displayed
Hi Jürgen,
Great document, helped me a lot.
Still I'm having trouble creating a Vendor with Address Management via Idocs. As email addresses are used, I need to use ADRMAS and CREMAS. I cannot seem to link the ADRC record to the LFA1 record, no matter what I try.
As the current setting for Vendor number range is internal, I used BAPI 'BAPI_VENDOR_GETINTNUMBER' to get a Vendor Number.
Then I created the Address record via ADRMAS03 Idoc where LIFNR is used in OBJ_ID field.
Then I created the Vendor record via CREMAS06 Idoc where LIFNR is used and ADRNR is of previous created Address.
Still 2 records a are created in the ADRC table, despite 99% of the data is equal. Even creating the records the other way around, CREMAS first and then ADRMAS, makes no difference.
Am I missing something here?
Regards, Remko
Hard to answer as I don't really know from where you actually start.
If you do Idocs then you should use serialization, which is not possible if you start from LSMW.
However, using LSMW I always loaded addresses after the master object in the past and never had double records in ADRC, I can only imagine that your keys do not match. Currently we are not using ADRMAS in migrations for other internal organization and distributed work process reasons.
Following OSS note has some reports to remove orphans: 510820 - Deletion report for addresses that are no longer referenced
Hi Jürgen,
I presume that by key fields you mean the fields which SAP will check to determine that the address already exists and therefore updates the existing one and links it to the vendor record.
I haven't been able to find anything on which fields these are, can you inform me?
I guess that not all fields are taken into account, as i.e. street between LFA1 and ADRC are different. (LFA1 has houdnumber in it, ADRC has separate houdnumber).
Regards, Remko
Have you access to SAP Notes? What is the starting point?
Yes, I've started on 0000306275, then 0000384462. After that I came across your Blog.