SAP Program RJGAUF00 - IS-M: Transfer BP Data (Roles GP,KU,EW,JZ,MK) with Address Changes

Description
This report enables you to generate a batch input session for use inimporting business partner data. Depending on the entry for field JPARVW(function key), the business partner is created or changed in the rolegeneral business partner, sales customer, advertising customer, retaileror carrier, or his/her address data is changed.
The data for import is taken from a text file in a directory that isaccessible to the application server.
The data must be stored record by record and in the form of one of thedata structures listed below in this file (
Details on creating a text file).
In some cases, particularly when making changes to existing data, it isnot possible to tell whether the old value in fields that areinitialized is not to be changed or deleted. You must either enter theold value in fields that are not to be changed or the symbol you enterfor the 'No data' indicator on the selection screen. Fields inthe data record for which this indicator is selected are ignored whenthe batch input session is created. Caution: for example, the field'Local customer indicator' is selected automatically for the adver
tising customer. If you now enter a blank in this field, this fieldwhich was selected automatically is overwritten with a blank. If you donot want this to happen, you must use the 'No data' indicator.
A record is interpreted using fields GP_SATZART and JPARVW.

The following actions are possible:
Rec.type ,,Role (JPARVW) ,,Action
'ND' ,, ,,(Optional) definition of
,, ,,NO DATA indicator to
,, ,,check value entered
'01' ,,GP,KU,EW,JZ,MK ,,Create BP in
,, ,,specified role
'02' ,,GP,KU,EW,JZ,MK ,,Change BP in
,, ,,specified role
'10' ,,GP,WE,RE,... ,,Define purchase address
,, ,,for subsequent action
,, ,,(rec.types '12' or '13')
,, ,,(reference record)
'11' ,,WE,RE,... ,,Create an additional
,, ,,address
'12' ,,GP,WE,RE,... ,,Change of address
'13' ,,GP,WE,RE,... ,,Correct address from
,, ,,a date
'14' ,,GP,WE,RE,... ,,Delete address
'15' ,,GP,WE,RE,... ,,Correct address
The '...' stands for all roles in table TJG66.
A record of record type 'ND' must be the first record in the inboundfile so that the NO DATA indicator specified on the selection screen ischecked. Later records are ignored.
If the duplicates check is active in the system (customizing), thesystem rejects duplicate records during creation of a business partner.These rejected records are stored in a separate data file. You mustcreate a logical/physical path for this data file as for the inboundfile (customizing). The system displays a list of the duplicates foundfor each business partner if this indicator is flagged on the selectionscreen. If duplicates are to be included in the system, you mustdeactivate the duplicate check and the data file created or a cleaned upfile can then be imported.
Records not imported as a batch input session are also placed in thedata file mentioned above. For example, it is not possible to create asession for a role that does not exist because a flow cannot be created.

Available data structures:
- Record type 'ND': RJGAU_ND.
- Record types '01' and '02'
Role,,Structure
GP,,RJGAU_GP
KU,,RJGAU_KU
EV,,RJGAU_EV
JZ,,RJGAU_ZU
MK,,RJGAU_MK
- Record types '10', '11', '12', '13' and '14':
RJGAU contains enough information (field 'JKTOKD'(= account group) is irrelevant here), but all other data structures canalso be used.

Notes on reference address
When creating or changing an address, you must specify the roles andtime slices to which the action applies. There are two possibilities:
In the case of a record not preceded by a reference record, the role iscombined with the start of validity as a reference to the existingaddresses. This is only unique if there is only one address history forthis role. This is always the case for the role 'GP'. There can be morethan one address progression for the other roles. Where this is thecase, the change affects the first address history.
If a record is preceded by a reference record, this reference recorddefines the address that is to be changed. This is defined using all thefields in structure RJGAU_ADR (role, validityperiod, address data).
The reference address (record type 10) can be checked when the batchinput session is created. However, this check can only be carried outproperly if the reference address already exists in the system at thetime at which the batch input session is created. This is for examplenot the case if it is to be created in this session.

Further notes:

  • The reference record that defines an address to be changed is not
  • required before every change record. The following rules apply:
    If an address is to be changed for a BP role, a preceding referencerecord is not required.
    If you want to change an address for any of the roles 'WE', 'RE' or'RG', you must ensure that the address to be changed is unique. Thefollowing scenarios are possible:
    - There is only one address history for the role to be changed.
    In this case, the above note on role 'GP' applies.
    - There are several address histories for the role to be changed.
    If there is no preceding reference record, the first address
    history for the role is modified. If you do not want this to
    happen, there must be a preceding reference record. If the only
    entries apart from the business partner number ('GPNR') are the
    role ('JPARVW') and the start ('WDAT1') and end of validity
    ('WDAT2'), only this data is used to determine the address history
    that is to be changed. If further data is entered (which must be
    the case if there are addresses with the same start and end dates
    in different address histories), these are also used to determine
    the address for change.
    • Upper and lower case should be taken into account for all 'name fields'.

    • The file must not/should not contain any duplicates if external/internal
    • number assignment has been used.
      • If business partners are copied with an address history (record types
      • 11, 12, 13) or carriers with an employment relationship, you should useexternal number assignment if at all possible. There is no other way ofensuring that the address history or employment relationship are createdfor the correct business partner if the records contain errors and youuse internal number assignment. (For example, BP1 created correctly, ER1contains errors, BP2 contains errors, ER2 correct but created for BP1instead of BP2; ER1 can also not be created simply by processing thesession.)
        • If the bank details are also to be copied, the bank master data should
        • be maintained first. The menu path is: Accounting -> Financialaccounting -> Accounts receivable|Accounts payable -> Master records ->Bank
          • It is not possible to change existing bank data when changing business
          • partner data. Instead, new bank data is created.
            • Dates must be entered in the form YYYYMMDD.

            • Amount fields can only contain a decimal point other than numbers and
            • plus/minus signs.
              • If you want to create an employment relationship when creating a
              • carrier, you should use external number assignment. In some cases,internal number assignment can lead to incorrect employmentrelationships. For example, if two session records that follow on fromeach other, 'Create employment relationship for carrier 1' and 'Createcarrier 2', contain errors, the employment relationship for carrier 2 iscreated with carrier 1.
                • It is easiest if you generate a structure description in a higher
                • programming language about the function Generate tabledescription directly from the system (menu path: Tools -> ABAP/4Workbench, ABAP/4 Dictionary, and Environment -> Generate tabledescription).

                  Data structures
                  RJGAU_GP
                  |
                  |-- RJGAU
                  | |
                  | |-- RJGAU_ADR (Address data)
                  | |-- Further fields
                  |-- Further fields
                  RJGAU_KU
                  |
                  |-- RJGAU_GP
                  |-- RJGAU_GPD (Customer data)
                  |
                  |-- RJGAU_GPDK (Customer and vendor data)
                  | |
                  | |-- RJGAU_GPBK (Bank data)
                  | |-- Further fields
                  |-- Further fields
                  |-- RJGAUK1 (Sales data 1)
                  |-- RJGAUK2 (Sales data 2)
                  RJGAU_EV
                  |
                  |-- RJGAU_KU
                  |-- RJGEUVW (Retailer data)
                  RJGAU_JZ
                  |
                  |-- RJGAU_GP
                  |-- RJGAU_GPK
                  | |
                  | |-- RJGAU_GPDK
                  | |-- Further fields
                  |-- RJGAUZ1 (Master data for carriers)
                  |-- RJGAUZ2 (Data for employment relationship 1)
                  |-- RJGAUZ3 (Data for employment relationship 2)
                  |-- Further fields
                  RJGAU_MK
                  |
                  |-- RJGAU_GP
                  |-- RJGAU_GPD
                  | |
                  | |--RJGAU_GPDK
                  | | |-- RJGAU_GPBK
                  | | |-- Further fields
                  | |--Further fields
                  | |-- RJGAUK1
                  | |-- RJGAUK2
                  | |-- RJGAUP0 (Credit cards)
                  | |-- RJGAUB1 (Company code dunning data)
                  |-- RJGAU_MKA (Append advertising customer data)

                  Notes
                  You imported business partners and now want to import their addresshistories. If a reference record is required in order to do this, itmust correspond exactly to the existing data in the system. However, ifthe address was corrected when the first import took place, this is onlypossible with difficulty.
                  You can use the function module ISP_ADDRESSES_READ to determine theaddress of a business partner for a particular role and within aparticular period. The reference record can be set up from the datadetermined.
                  Note on advertising customer fields
                  The fields Minor Amount Credit Memo and Minor Amount Debit Memo on theadvertising customer screen are numerical fields with decimal places. Inorder to be able to enter decimal places, the decimal point must also beentered on the screen (the same applies to batch input). If you do notspecify a decimal point in the transfer record, whole numbers arecreated, and if you specify a decimal point, it is possible to enteramounts with cents/pence.

                  Changes for 4.01
                  6 new fields have been added to the address include in the recordstructures. This has moved the record structures apart, so that you willhave to modify them in your legacy system. These are as follows (instructure RJGSADR):
                  STREET2 (for all country versions)
                  PREDIRECTIONAL (for US country version)
                  POSTDIRECTIONAL
                  ADDRSECABBREV
                  ADDRSECNUMBER
                  ALIASNAME
                  Fields 2 to 6 are only active in the US country version. If you make anyentries in these fields and the country version is not for the USA, theSystem will ignore these entries and they will not be transferred.
                  Field RJGMBK-ISPBNKSP was added to the bank data (for all versions) andRJGAU_GPAL-J_SOC_SECU to the general data (for the US country version).

                  Changes for 4.02
                  As of Release 4.02, the screen Company Code Data 2 and Payment Cards (onthe bank screen) have been added for customer business partner roles.These screens can also be filled with data by transfer programs. You cancopy 4 payment cards on the payment card screen. (Creation, no changes.)
                  The new fields have been inserted in the transfer structures so that thefront part of all transfer structures is always the same. However, youmust modify the structures you use to write the data from the legacysystem to a file to match the new structures.
                  The fields are included as structures RJGAUP0 and RJGAUB1 in INCLUDERJGAU_GPD.
                  The fields are as follows:
                  RJGAUB1: RJGAUP0:
                  MAHNA CCINS CCINS_1 CCINS_2 CCINS_3
                  MANSP CCNUM CCNUM_1 CCNUM_2 CCNUM_3
                  MADAT CCNAME CCNAME_1 CCNAME_2 CCNAME_3
                  MAHNS DATAB DATAB_1 DATAB_2 DATAB_3
                  KNRMA DATBI DATBI_1 DATBI_2 DATBI_3
                  GMVDT CCTYP CCTYP_1 CCTYP_2 CCTYP_3
                  BUSAB CCLOCK CCLOCK_1 CCLOCK_2 CCLOCK_3
                  MGRUP CCDEF CCDEF_1 CCDEF_2 CCDEF_3
                  BUSABB
                  EIKTOD
                  ZSABE
                  KVERM
                  XAUSZ
                  XDEZV
                  PERKZ
                  The bank data screen is always available in 4.02 (e.g. when creating anexisting sales customer as a media customer, creating a media customerwho already exists in a different sales area etc.). This has also beentaken into account in data transfer.