cancel
Showing results for 
Search instead for 
Did you mean: 

Alternative method for DO_PREPARE_OUTPUT to clear off of the UI fields

Former Member
0 Kudos

Hi Experts,

We tried implementing a requirement to clear off the standard address fields that we were populating in contacts screen , on clearing off of the account field by system.

For this, we used method DO_PREPARE_OUTPUT of class

ZLBP_ADDR_STANDARDADDRES_IMPL.

In this method, we are initializing(clearing off) the address fieldslike STREET, HOUSE_NO etc...during the next BOL modify call,

the method CL_BUIL_ADDRESS->MODIFY is called and here, we see that

above address fields have changed and hence the API BUPA_ADDRESS_CHANGE

is called and duplicates are again determined and added to the

collection. This happens everytime when the Contact screen is loaded

even if address details are not actually changed.

So when the next BOL modify is triggered (either during press of Enter

or change in other address fields) the duplicate result gets invalidatedand hence this exception of data incosistency.

If we bypass these statements , then this exception of data incosistency

does not occur.

Any alternatvie methods or approaches to achieve the same would be highly appreciated.

Thanks

Swapna Viswanathan.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Solved myself.This thread remains closed.

former_member192716
Contributor
0 Kudos

Hi,

Method do_prepare_output will be triggered whenever the page is reloaded i.e whenever a server event takes place. Thats why your code gets executed everytime. You can insert your code in any particular event method or implement some validation in do_prepare_output and then clear the address fields only if the validation succeeds.

Regards,

Arun

Former Member
0 Kudos

Hi Arun,

Thanks for the reply.

But we have tried the same and have implemented a flag check for teh code execution.

But when the duplication check on the email happens for the contact,the exception fo data inconsistency results.

Thanks

Swapna Viswanathan.