The Quarterly Adjustment process is a set of three reports designed to update existing SAP address records. When using custom fields, you must modify one of these reports. (Refer to the Trillium for SAP Reference Guide for a detailed description of the Quarterly Adjustment process.)
To modify the quarterly adjustment process
-
Run transaction se38.
-
Copy the SAP standard quarterly update program RSADRQU3 to ZRSADRQU3. Do not vary from this program name.
-
In ZRSADRQU3 (which is the program that will be used when the add-on is enabled), make the modifications shown in bold font in the following example. There are four blocks of code that need to be inserted at the designated locations.
Context Block ----- "*499i- * Adreßtyp feststellen und Adresse abgleichen READ TABLE val1_tab INTO addr1_val * WITH KEY addrnumber = adrc_qu2_wa-addrnumber BINARY SEARCH."*989d WITH KEY addrnumber = adrc_qu2_wa-addrnumber nation = adrc_qu2_wa-nation BINARY SEARCH. "*989i IF sy-subrc <> 0. * Handelt es sich vielleicht um eine Personenadresse? READ TABLE val2_tab INTO addr2_val * WITH KEY addrnumber = adrc_qu2_wa-addrnumber BINARY SEARCH."*989d WITH KEY addrnumber = adrc_qu2_wa-addrnumber nation = adrc_qu2_wa-nation BINARY SEARCH. "*989i IF sy-subrc = 0. * Es handelt sich um eine Personenadresse CLEAR addr2_data. MOVE-CORRESPONDING addr2_val TO addr2_data. MOVE-CORRESPONDING adrc_qu2_wa TO addr2_data. Insert Block 1 ***/TSSERP/*********************************************************** * Update the names MOVE adrc_qu2_wa-/tsserp/name_las TO addr2_data-name_last. MOVE adrc_qu2_wa-/tsserp/name_fir TO addr2_data-name_first. ***/TSSERP/*********************************************************** Context Block MOVE adrc_qu2_wa-chckst_qu TO addr2_data-chckstatus. REFRESH return_tab. CLEAR returncode. CALL FUNCTION 'ADDR_PERSONAL_UPDATE' EXPORTING address_number = addr2_val-addrnumber address_personal_data = addr2_data * DATE_FROM = '00010101' * LANGUAGE = SY-LANGU nation = addr2_val-nation person_number = addr2_val-persnumber check_address = ' ' "*499u IMPORTING * ADDRESS_PERSONAL_DATA = returncode = returncode * DATA_HAS_CHANGED = TABLES error_table = return_tab EXCEPTIONS parameter_error = 1 personal_address_not_exist = 2 version_not_exist = 3 internal_error = 4 OTHERS = 5 . CASE sy-subrc. WHEN 0. Insert Block 2 ***/TSSERP/************************************************************ Update the phone numbers and email address CALL FUNCTION '/TSSERP/SET_EXT_QU3' EXPORTING i_idxqu2_ext = adrc_qu2_wa. * changing * ct_err_tab = return_tab ***/TSSERP/*********************************************************** Context Block IF returncode = 'E'. READ TABLE return_tab WITH KEY msg_type = 'E'. adrc_qu2_wa-error_flag = 'X'. adrc_qu2_wa-msg_id = return_tab-msg_id. adrc_qu2_wa-msg_type = return_tab-msg_type. adrc_qu2_wa-msg_number = return_tab-msg_number. adrc_qu2_wa-msg_var1 = return_tab-msg_var1. adrc_qu2_wa-msg_var2 = return_tab-msg_var2. adrc_qu2_wa-msg_var3 = return_tab-msg_var3. adrc_qu2_wa-msg_var4 = return_tab-msg_var4. APPEND adrc_qu2_wa TO error_tab. DELETE adrc_qu2. CONTINUE. *----------- "*471d+ * ELSE. * APPEND adrc_qu2_wa TO modif_tab. *----------- "*471d- ENDIF. WHEN 2. * Adresse ist nicht (mehr) vorhanden adrc_qu2_wa-error_flag = 'X'. adrc_qu2_wa-msg_id = 'AM'. adrc_qu2_wa-msg_type = 'I'. adrc_qu2_wa-msg_number = '010'. adrc_qu2_wa-msg_var1 = text-005. adrc_qu2_wa-msg_var2 = adrc_qu2_wa-addrnumber. adrc_qu2_wa-msg_var3 = package_no. adrc_qu2_wa-msg_var4 = space. APPEND adrc_qu2_wa TO error_tab. DELETE adrc_qu2. CONTINUE. WHEN OTHERS. * falscher Aufruf oder internal_error -> INTERNAL_ERROR WRITE:/ 'Interner Fehler: Abgleich konnte nicht abgeschlossen werden'(007). MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. error_occurred = 'X'. EXIT. "from loop ENDCASE. ELSE. * Adresse ist nicht mehr vorhanden; müßte oben durch den * array_get aber eigentlich schon rausgefiltert worden sein *ML evtl internal error ?????????? adrc_qu2_wa-error_flag = 'X'. adrc_qu2_wa-msg_id = 'AM'. adrc_qu2_wa-msg_type = 'I'. adrc_qu2_wa-msg_number = '010'. adrc_qu2_wa-msg_var1 = text-005. adrc_qu2_wa-msg_var2 = adrc_qu2_wa-addrnumber. adrc_qu2_wa-msg_var3 = package_no. adrc_qu2_wa-msg_var4 = space. APPEND adrc_qu2_wa TO error_tab. DELETE adrc_qu2. CONTINUE. ENDIF. ELSE. "SY-SUBRC ist also gleich 0 * Es handelt sich um eine Organisationsadresse CLEAR addr1_data. MOVE-CORRESPONDING addr1_val TO addr1_data. MOVE-CORRESPONDING adrc_qu2_wa TO addr1_data. MOVE adrc_qu2_wa-chckst_qu TO addr1_data-chckstatus. Insert Block 3 ***/TSSERP/************************************************************ Update the names MOVE adrc_qu2_wa-/tsserp/name1 TO addr1_data-name1. MOVE adrc_qu2_wa-/tsserp/name2 TO addr1_data-name2. ***/TSSERP/*********************************************************** REFRESH return_tab. CLEAR returncode. CALL FUNCTION 'ADDR_UPDATE' EXPORTING address_data = addr1_data address_number = addr1_val-addrnumber * DATE_FROM = '00010101' * LANGUAGE = SY-LANGU nation = addr1_val-nation check_empty_address = ' ' "*499u check_address = ' ' "*499u IMPORTING * ADDRESS_DATA = returncode = returncode * DATA_HAS_CHANGED = TABLES error_table = return_tab EXCEPTIONS address_not_exist = 1 parameter_error = 2 version_not_exist = 3 internal_error = 4 OTHERS = 5 . CASE sy-subrc. WHEN 0. Insert Block 4 ***/TSSERP/************************************************************ Update the phone numbers and email address CALL FUNCTION '/TSSERP/SET_EXT_QU3' EXPORTING i_idxqu2_ext = adrc_qu2_wa. * changing * ct_err_tab = return_tab ***/TSSERP/*********************************************************** Context Block IF returncode = 'E'. READ TABLE return_tab WITH KEY msg_type = 'E'. adrc_qu2_wa-error_flag = 'X'. adrc_qu2_wa-msg_id = return_tab-msg_id. adrc_qu2_wa-msg_type = return_tab-msg_type.
-
Save and activate the program.