In Contact Person having Work Address as assignment block.
When I create new Work Address, it will open new window , there I feel all Contact Person information
There are two field
- Main Address (Its Check Box)
- Department (Department name as description text fields)
1)After filling all information when I click back at Work Address assignment block and try to click on save button.
Assignment block showing Main Address fields as always selected and in Gray color (Even user did not select check box or tick mark check box)
2) Second thing Department value is not coming when I select Back button and try to save Contact person information in Assignment block of Work Address.
I debug and found details like below for department.
In debugging
OBJECT_NAME = BuilContactPerson
when I click on ATTRIBUTE_REF ->{A:8769*\TYPE=CRMST_CONTACT_PERSON_OBJ_BUIL}
BP_NUMBER
DEPARTMENT = ?
For last nitration its shows value blank
Below is my piece of code
Method GET_ZZDHLDEPARTMENT (ZL_BP_ADDR_CONTACTWORKADD_CN06)
IF iterator IS BOUND.
current = iterator->get_current( ).
ELSE.
current = collection_wrapper->get_current( ).
ENDIF.
lr_entity ?= current.
lr_entity = lr_entity->get_parent( ).
IF lr_entity IS BOUND.
TRY.
lv_abtnr = lr_entity->get_property_as_string( iv_attr_name = 'DEPARTMENT' ).
SELECT SINGLE bez20
INTO value
FROM tb911
WHERE abtnr = lv_abtnr
AND spras = sy-langu.
RETURN.
CATCH cx_crm_cic_parameter_error.
ENDTRY.
…… … … …
End method.