Using Company Address in the SAPGUI - trillium_quality - 17.1

Trillium Quality for SAP Reference Guide

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Quality
Version
17.1
Language
English
Product name
Trillium Quality
Title
Trillium Quality for SAP Reference Guide
Topic type
How Do I
Overview
Configuration
Reference
Administration
Installation
First publish date
2008

To pass company address data along with the Contact Person’s name when the duplicate check is called for type 3 addresses, you must modify SAP function group SZA5. Using the Modification Assistant, insert the following code into form routine CHECK_DUPLICATES (include LSZA5F60) at the specified location. This is only required for transaction BP in the SAPGUI.

<Context Block>

* Liste der indizierten Felder ermitteln  

CALL METHOD g_obj_ex_address_search read_index_field_list    

EXPORTING      

im_object_type          = lt_object_types_line      

im_current_address_type = '3'    

IMPORTING      

ex_field_list           = lt_field_list    

EXCEPTIONS      

internal_error          = 1      

OTHERS                  = 2.  

IF sy-subrc = 0.    

LOOP AT lt_field_list INTO ls_field_line.

<Context Block>

<Delete Block>

*{   REPLACE        C7DK900108                        1

*\      CONCATENATE 'ADDR3_DATA-' ls_field_line-fieldname

*\        INTO lv_fieldname.

<Delete Block>

<Insert Block>      

IF ls_field_line-tablename = 'ADRP'      

OR ls_field_line-tablename = 'ADCP'.        

CONCATENATE 'ADDR3_DATA-' ls_field_line-fieldname          

INTO lv_fieldname.      

else.        

CONCATENATE 'ADDR1_VAL-' ls_field_line-fieldname          

INTO lv_fieldname.      

endif.

*}   REPLACE

<Insert Block>

<Context Block>      

ASSIGN (lv_fieldname) TO <lv_fieldname>.      

IF sy-subrc = 0.        

MOVE   <lv_fieldname> TO ls_search_fields_line-content.        

MOVE ls_field_line-tablename TO ls_search_fields_line-tablename.        

MOVE ls_field_line-fieldname TO ls_search_fields_line-fieldname.        

APPEND ls_search_fields_line TO lt_search_fields.      

ENDIF.    

ENDLOOP.  

ENDIF.

* Falls das BAdI keine Feldliste liefert, Defaulteinstellungen aus* Tabelle TSAD10 nachlesen

<Context Block>