cancel
Showing results for 
Search instead for 
Did you mean: 

If I use F4-help, the change does not appear in change-log

daniel_humberg
Contributor
0 Kudos

When I save the changes of my application, I use the method get_changes( ) to get all recent changes of the user.


lt_changes = wd_this->get_changes( ).

This worked fine so far.

No, I have attached an F4-help to one input field.

Unfortunately, if I use the F4-help, the change is not returned by get_changes( ), while it is returned correctly if I enter it manually.

What can I do?

Do I have to adapt the F4-help in a way?

The F4 help looks like this:


Input Help Mode =	Freely Programmed
Input Help Component Usage = VH_VALUE_HELP

Regards, Daniel.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

check <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/5d/395e4254139041e10000000a1550b0/frameset.htm">this</a> out,

solution is in this part of <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/ae/f95e42ff93c153e10000000a1550b0/frameset.htm">documentation</a>

grtz,

Koen

daniel_humberg
Contributor
0 Kudos

The docu sais:

> Context Change Log for Freely Programmed Input Help

> When you work with a freely programmed input help, you can still use the

> function Context Change Log. Note, however, that the values selected by the

> user are not automatically written to the change table; you need to program this > explicitly (see OVS Input Help and Context Change Log).

Good to know....

Former Member
0 Kudos

Hi,

the second link also says:

In the case of OVS input help or freely programmed input help, the new value is not entered automatically into the table but must be entered actively using the method ADD_CONTEXT_ATTRIBUTE_CHANGE of the interface IF_WD_CONTEXT – provided an entry is desired.

You will find an example application DEMO_CONTEXT_CHANGES in your system in the package SWDP_DEMO.

grtz,

Koen

Answers (1)

Answers (1)

daniel_humberg
Contributor
0 Kudos

Thx for the help. Now it works.

I entered this in the event handler for the DATA_SELECTED event of the search help:


*     tell the change log about it (needed for all freely programmed search helps)
*     (needed before writing it to the context)
      lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
      lv_rv_entry_added = lo_componentcontroller->add_context_attribute_change(
                                                          element           = ls_my_element
                                                          iv_attribute_name = 'MY_ATTRIBUTE'
                                                          iv_new_value      = l_data_selected-my_attribute ).
      ls_prstd->set_attribute( name  = 'MY_ATTRIBUTE'
                               value = l_data_selected-my_attribute ).