Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

CRM WEB UI: Getting the current value of a certain field

Hello,

im rather new to the CRM_UI and i would really appreciate some help.

Situation:

In CRM_UI, on the PARTNER web mask i have a certain field that is NOT "connected" to any of the fields in standard CRM tables (i.e. CRMD_PARTNER). I want to save the value of this field into my own non-standard table.

For now i have this this:

In transaction BSP_WD_CMPWB i load the component BTPARTNER. I select a View called BTPARTNER/PartnerEF. Under Context i have 2 Context Nodes:

- ZBP ... in the Attributes there are listed variables that are not "directly connected" to any of the CRM tables

- BTPARTNER (Base Entity BTPartner) ... in the Attributes there are listed variables that are "directly connected" to CRMD_PARTNER

In ZBP node i defined a new field Z_TAX_VALUE. When i load the web mask, the method GET_Z_TAX_VALUE is ran, in which i read the value from my non-standard table and put it into the Z_TAX_VALUE. When i change the value on web mask and press back, the GET_Z_TAX_VALUE method is again run and i can save the changed value of Z_TAX_VALUE into my non-standard table. To read the current value of Z_TAX_VALUE i use this code in GET_Z_TAX_VALUE:


dref                 = current->get_property( 'Z_TAX_VALUE' ).

l_current_value = if_bsp_model_util~convert_to_string( data_ref         = dref

                                                                               attribute_path = attribute_path ).


Problem:

When i change the value of Z_TAX_VALUE, i have to press ENTER to save the value into Z_TAX_VALUE. Otherwise when reading the current value, old value is getting returned into l_current_value.

Example:

- Current value of a field in my non-standard table is 100

- I load the PARTNER web mask and Z_TAX_VALUE shows 100

- I change the value to 200. If i press ENTER and go back, the field in my non-standard table is getting updated to 200. If i dont press ENTER and go back, the field is not updated to the new value

What should i do ? How can i overcome this mandatory ENTER ? Should i do this completely differently ?

Thank you

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question